Jump to content
  • Advertisement
Sign in to follow this  

What are efficient ways to represent your static environment?

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

I was wondering what the most popular methods are for representing the static environment.

I first though to construct the environment from a group of simple convex polyhedra (cubes, pyramids, etc) to create more elaborate structures. Therefore a landscape could be the combination of several simpler shapes that can be reduced through a simple broadphase detection algorithm. This seems the simplest to implement but for complex shapes i could see a lot of unneeded vertices that are unneccessarily tested. Also, what do you do if the object is intersecting two shapes at the same time? How would you go about correcting its position?

I also read about polysoups or surfaces of triangles? This seems like the most efficient way of giving a detailed structure with minla vertices but Im curious as to what type of algorithm would deal with this.

Share this post

Link to post
Share on other sites

i could not answer all of your questions,
so i only try my best to attempt to it.

first of all,
for your complex shapes with vertices redundancy,
there are always tradeoff between accuracy of shapes and redundancy of vertices.

what it means is ,
you could actually optimize the vertices distribution by reducing the closest vertices,
and re-grouped them together to form a closer-look shape which has reduced the use of vertices.
but the tradeoff is its accuracy in describing the detail of shapes.

if you are interested,
u can do some research on it with 3D vertices reduction or filtering --- related topics.

To your second question,
there is no absolute solution to this,
you can either interpolate the collision response from the two objects,
or you decide which object takes more penetration and should react more response,
or you could even try to eliminate which object time factor is more important (for e.g,the time of impact is earlier)

hope it helps,


Share this post

Link to post
Share on other sites
The representation you choose depends on the particular traits and constraints of your project. In my game, I just divide the level into a grid of squares, and store a list of edge chains which intersect each square.

As for the physics, just look at Box2d and Bullet and see how they did things. In particular, an iterative solver with impulse accumulation is useful for resolving multiple simultaneous contacts.

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!