Collision environment inside a mesh (e.g. cave)

Started by
4 comments, last by Ashaman73 11 years, 6 months ago
I was wondering how one would go about creating a collision system
for an environment inside an object - such as a cave.

The problem is the cave is too bumpy and hence complex to model it's bounding volume
by hand (although possible, so it is my last resort).

I am familiar with BVH, AABB, and OBB, but again, the shape complexity doesn't allow
easy creation of such objects, and i'm unsure of how to do.
Any advice/tips are welcome.


Note:
I am not 100% this is the right forum to post in, but it seem like it would fit most.



Yours,
SawSGM
Advertisement
How accurate does it need to be? You may be able to do it with overlapping convex collision surfaces. A flat surface, some walls and a few spherical lumps and bumps. Will your players notice a lack of exact collision geometry?
It should be accurate enough, doesn't have to be 100%.

I'm not I understood your idea, but it sounds like i'll have to test against many shapes
(surface, walls, spheres), not to mention it will have to be created through the
modeling application as well (which is possible, but only if it's not complex,
and I still prefer not to) - sounds like it will be better if i'll just check collision of the player box
against the cave faces.

I might misunderstood your idea.
I would appreciate it if you could post some kind of picture
that would explain your idea better.

Yours,
SawSGM
There's no such thing as "accurate collision". Even AAA games such as Unreal Tournament uses simplified collision geometry (end of the page).
In the past, I've experimented using two heightfields to model the cave with minor success. I'm currently way more inclined to use simple convex hulls.
Testing against a generic tri-mesh is considerably more involved. It's often not performance-prohibitive, but I'd take it as a last resort.

As a side note, I don't really encourage your idea of doing this yourself. While physics is cool, collision is just taken for granted and won't buy you much.

Previously "Krohm"

In most of the games I've worked on where artists have been modelling the environments -- from space-ship corridors to mountains, to caves -- they've just created another "LOD" of their model, which we called the physics mesh. This mesh wouldn't be used by the renderer at all, but would be fed into the physics system as a tri-mesh.
For my game (in the current state it consists only of caves) I use a terrain mesh (calculated on the fly) and a low resolution tri-mesh of the cave walls. The benefit of using this combination is, that you have really good accuracy for the ground (render mesh ~ collision mesh) and an acceptable accuracy for walls and ceilings. As long as you don't use very exact collision reprensentations of your characters which interact with the world, you don't need hi-accuracy for the environment. There will be always some tails or ears sticking in the walls.

This topic is closed to new replies.

Advertisement