Sign in to follow this  
PhiberOptic

Some resourcesuggestions/help

Recommended Posts

PhiberOptic    128
Hi! I like to hear some suggestions. I have a nice litte graphicsengine with huge use of directx. For my gameworld, I'm using vertex and indexbuffers to store all of the geometry data. That gives nice performance. But when it comes to things like collision detection and other things, I can't really use them (the buffers). How are you guys solving this? Keeping the geometrydata in two separate places, one for cd and one for gfx?

Share this post


Link to post
Share on other sites
Illco    928
Usually you will be using different geometry for collision detection -- so there is no copy; there is just different data. For example, one could use axis-aligned bounding boxes or object-oriented bounding boxes. Once computed, they can be used separate from the vertex/face geomtry of the mesh. When using complex per-face collision detection, the cd data comes closest to the actual mesh data. But even then, you can usually gain a lot since you don't need to have duplicate vertices (otherwise required for multi-texturing or materials) and you don't need to have extra triangles in flat surfaces. In such a case it is still best to store it separately.

Greetz,

Illco

Share this post


Link to post
Share on other sites
PhiberOptic    128
Ohh.. I see! Thanks!

My world geometry was pretty simple (mostly blocks/"houses" and some flat road), so I didn't even think of optimizing it. But of course you are right!

Thanks again

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this