Importing Terrain

Post Reply
cyber
Posts: 1
Joined: Wed Dec 17, 2014 6:01 pm

Importing Terrain

Post by cyber »

I have done a fair bit of searching and can't seem to find anything regarding importing terrain data. The two most common things I see about creating terrain in Bullet is making a

Code: Select all

btHeightfieldTerrainShape
or more commonly a

Code: Select all

btBvhTriangleMeshShape
.

If I have terrain data of some other form, such as JPEG 2000, ArcGrid, IMG, GeoTiff, etc, how can I go about creating either of the above two objects in Bullet? I'm not really familiar with handling terrain data in general, so I apologize if this is a common question.
tmason
Posts: 19
Joined: Wed Aug 27, 2014 5:02 pm

Re: Importing Terrain

Post by tmason »

cyber wrote:If I have terrain data of some other form, such as JPEG 2000, ArcGrid, IMG, GeoTiff, etc, how can I go about creating either of the above two objects in Bullet? I'm not really familiar with handling terrain data in general, so I apologize if this is a common question.
You can't and in the examples you gave it wouldn't make sense. The examples you gave are images; Bullet deals in 3D space so only 3D objects will work.

And even then they would have to be loaded and converted from their original formats in memory before you can use the appropriate Bullet classes.
xexuxjy
Posts: 225
Joined: Wed Jan 07, 2009 11:43 am
Location: London

Re: Importing Terrain

Post by xexuxjy »

not quite true, btTerrainShape can be updated pretty easily to use either of those formats as all you really want from them is a height value at x,y which can correspond to a grayscale (or whatever) value from your image.
tmason
Posts: 19
Joined: Wed Aug 27, 2014 5:02 pm

Re: Importing Terrain

Post by tmason »

xexuxjy wrote:not quite true, btTerrainShape can be updated pretty easily to use either of those formats as all you really want from them is a height value at x,y which can correspond to a grayscale (or whatever) value from your image.
Fair enough; I stand corrected.
Post Reply