# Terrain Bounds

This topic is 4005 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

In my previous FPS game i made a complete mesh in Blender that was my level, a big mesh with rooms and stuff. all with 90 degree angle. because of the angle i could use boxes (vector4) with values that was representeing where the player could move and som vector4 with values that represented bounds (tables, chairs etc) This is the only way i know for making a level with bounderies for the player. Now i am making a new Game and i wonder if there is a better way to do this? If its not to complicated i would have outside terrain where there are some hills and other stuff, and not only straight angles. any suggestions?

##### Share on other sites
Just out of curiousity, why did this end up in DirectX? I moved a very similar thread of yours from here to 'Maths & Physics' a few days ago... Guess where this one is going [wink]

You need to define how your data is to be represented before you can tackle this problem with any specific detail.

Simplifying your terrain to being a perturbed plane (aka "height map") makes things very easy - both physics and rendering. However it trades this in against being slightly less flexible (e.g. overhangs and caves become difficult to represent).

If you take this route then you'll either be using a "higher order surface" that you can compute the derivatives of in order to work out changes of elevation (useful for moving an object over a surface), or you can just run a complex ray/plane intersection. Alternatively, if you take the conventional "height map" approach you just need to determine which cell the ray intersects on and solve a simple ray-plane test on the potential list of triangles it intersects.

If you want a more general surface made out of arbitrary polygonal data then you're back to using general "collision mesh" and other collision detection algorithms. As was briefly suggested in a reply to your other thread.

Terrain rendering is a well covered subject and what you describe is a common problem. A bit of searching around the internet should reveal plenty of examples.

hth
Jack

##### Share on other sites
tnx for all the help and info.

1. 1
Rutin
24
2. 2
JoeJ
20
3. 3
4. 4
5. 5

• 9
• 46
• 41
• 23
• 13
• ### Forum Statistics

• Total Topics
631749
• Total Posts
3002043
×