Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


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


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
5 replies to this topic

#1 SawSGM   Members   -  Reputation: 106

Like
0Likes
Like

Posted 29 September 2012 - 08:31 PM

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

Sponsor:

#2 jefferytitan   Crossbones+   -  Reputation: 2242

Like
0Likes
Like

Posted 29 September 2012 - 10:45 PM

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?

#3 SawSGM   Members   -  Reputation: 106

Like
0Likes
Like

Posted 30 September 2012 - 04:47 AM

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

#4 Krohm   Crossbones+   -  Reputation: 3245

Like
0Likes
Like

Posted 01 October 2012 - 01:13 AM

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.

#5 Hodgman   Moderators   -  Reputation: 31786

Like
0Likes
Like

Posted 01 October 2012 - 01:23 AM

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.

#6 Ashaman73   Crossbones+   -  Reputation: 7987

Like
0Likes
Like

Posted 01 October 2012 - 01:27 AM

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.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS