How to load a mesh from file?

User avatar
Lorian
Posts: 4
Joined: Wed Feb 14, 2007 4:20 pm

How to load a mesh from file?

Post by Lorian »

Hi, this is quite a noobish question, but so far I have just been playing around with cubes. How would I go about loading a mesh (say from a 3ds file) into the Bullet world?

Cheers.
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Re: How to load a mesh from file?

Post by Erwin Coumans »

Bullet demos support import of 3 different file formats in the samples:

- Collada Physics (.dae), there exist exporters for 3ds Max, Maya and Blender. This supports constraints, rigid body information and most collision shapes, including compound shapes.

Just for static mesh geometry:
- .obj files (most 3d packages can export this format), see ConvexDecompositionDemo for import sample code
- Quake .bsp files, see Demos/BspDemo

Hope this helps,
Erwin

Lorian wrote:Hi, this is quite a noobish question, but so far I have just been playing around with cubes. How would I go about loading a mesh (say from a 3ds file) into the Bullet world?

Cheers.
User avatar
Lorian
Posts: 4
Joined: Wed Feb 14, 2007 4:20 pm

Post by Lorian »

Great, thanks for your help. :)
User avatar
Lorian
Posts: 4
Joined: Wed Feb 14, 2007 4:20 pm

Post by Lorian »

Hm, does Bullet support height maps for terrain?
User avatar
Erwin Coumans
Site Admin
Posts: 4221
Joined: Sun Jun 26, 2005 6:43 pm
Location: California, USA

Post by Erwin Coumans »

You can use the triangle mesh for terrain. There is some preparation for 2d heightmap terrains, but this is not finished. Someone wanted to do a contribution for this, we have to check about the status.

Thanks,
Erwin

Lorian wrote:Hm, does Bullet support height maps for terrain?