Some resourcesuggestions/help

Started by
1 comment, last by PhiberOptic 18 years, 4 months ago
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?
----------------------------------------------Petter Nordlander"There are only 10 kinds of people in the world. They who understand binary and those who do not"
Advertisement
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
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
----------------------------------------------Petter Nordlander"There are only 10 kinds of people in the world. They who understand binary and those who do not"

This topic is closed to new replies.

Advertisement