Jump to content
  • Advertisement
Sign in to follow this  
Krohm

World representation structure and dynamics

This topic is 2326 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've been playing Portal2 recently and the spherical weight gives me the creeps. It's just a ball and it rolls around. Am I getting excited because of standard rigid body dinamics? Yes I am.
Main problem is that I still have no idea how to produce that stable behaviour.
For the game I'm currently working on, I'm targeting low-end hardware. 1st gen Atoms to be clear.
It appears world should be loaded as triangle soups with marked internal edges. In my case, that did not quite cut it performance-wise. I plan to repeat the benchs as soon as the physics code stabilizes again. Odds are I might afford it now but in the last tests, the overhead of processing the triangle mesh appeared too much compared to the simplified hulls and boxes.
So the world was made out of hulls, and this means my ball would never roll correctly as it would get stuck in (I guess) the minimal FP approximations between adjacent rigid bodies.
At least it appeared to work like that last time I tried and yes, I will test that again.

In the meanwhile, I would like to read opinions on how to represent the world. It appears there's a growing trend in just making it a GIMPACT polysoup - apparently, Erwin Coumans himself seems to advice for this. It is my understanding it used to be hulls out of BSPs. If I look at some UDN articles about collisions, most things appear to work on hulls to me.

Note: my current world features lots of non-manifold geometry so... I'm unsure how convex extraction would work.

Share this post


Link to post
Share on other sites
Advertisement
There're several ways, BSP might not be the best.

You should always utilise mutli-level collision detection, that is, first test against its AABB, then again the primitives or polysoup. The trick for a polysoup is, to subdivide the poly-set into some really compact AABBs with a reasonable number of polys inside. The AABBs could be put into an oct-tree like structures or some other data-structure(sweep'n'prune etc). This way you will have a very fast and constant access to your polysoup (gimpact does something similar ?).

An other way is to utilise callbacks (i.e. when using bullet). My terrain collision detection works only with callbacks, I calculate the mesh (only a hand full of polys per collision object for terrain-object collision) on-the-fly. Edited by Ashaman73

Share this post


Link to post
Share on other sites

There're several ways, BSP might not be the best.

You should always utilise mutli-level collision detection, that is, first test against its AABB, then again the primitives or polysoup. The trick for a polysoup is, to subdivide the poly-set into some really compact AABBs with a reasonable number of polys inside. The AABBs could be put into an oct-tree like structures or some other data-structure(sweep'n'prune etc). This way you will have a very fast and constant access to your polysoup (gimpact does something similar ?).
I've never looked at GIMPACT, rumor has it there is some kind of hierarchical representation. I don't know the details.
Bullet does indeed what you mean. AABB testing is the so called broadphase, then a narrowphase follows resolving an exact hit using the internal collision shape. The collision shape can be trasformed by a rigid transform. There are a variety of shapes, polysoup being one of them.
An other way is to utilise callbacks (i.e. when using bullet). My terrain collision detection works only with callbacks, I calculate the mesh (only a hand full of polys per collision object for terrain-object collision) on-the-fly.
As far as I know this will wreak havoc for dynamic objects. I will look again at the documentation but from what I recall, I don't see how callbacks could help me there.

As a side note, were never part of the picture. What I meant to say was that BSP leafs were conveted into hulls. Edited by Krohm

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!