Formatting BSP Imports

taskmgr
Posts: 1
Joined: Wed May 13, 2009 9:39 am

Formatting BSP Imports

Post by taskmgr »

Hey, I'm new to Bullet - thanks for all the great tools.

I'm looking at the text output of GTKRadiant and both the map and bsp formats differ greatly from the expected import format used in tutorials like the jBullet example here.

Can someone please help me understand how Bullet handles bsp maps, and how I can go about formatting and integrating a bsp file with a Bullet application?

Thanks!

PS: I scanned the forums before posting with both Google and the integrated search tool, and I didn't see anything answering a question like this. If it does exist and I missed it, please point me to it if you don't mind.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: Formatting BSP Imports

Post by Erwin Coumans »

Bullet/Demos/BspDemo includes a Quake3 BSP reader, have you checked it? You can copy and use BspLoader.cpp and BspConverter.cpp into your own project. Note that those files are based on the official idSoftware BSP tools, so those files are released under the GPL license.

It should be able to parse any Quake3 BSP and turn the brushes into Bullet btRigidBody/btCollisionObject with a btConvexHullShape.

Hope this helps,
Erwin