Is collision geometry even necessary?

Post » Sat May 28, 2011 6:31 am

I made a new piece for the bone cave tileset in blender, added a collision mesh to it and pulled it up in the cs. Connected it to the some other pieces of the bone cave saved it and pulled it up in morrowind. I noticed there were a few places that my character got stuck in. So I took out the collision mesh and then exported it. I was thinking my character would fall through the floor into oblivion, but I was able to walk around just fine, and I didn't get stuck in the place I had gotten stuck in earlier. So I just want to know is collision geometry even necessary?
User avatar
Charlotte Henderson
 
Posts: 3337
Joined: Wed Oct 11, 2006 12:37 pm

Post » Sat May 28, 2011 7:45 am

I made a new piece for the bone cave tileset in blender, added a collision mesh to it and pulled it up in the cs. Connected it to the some other pieces of the bone cave saved it and pulled it up in morrowind. I noticed there were a few places that my character got stuck in. So I took out the collision mesh and then exported it. I was thinking my character would fall through the floor into oblivion, but I was able to walk around just fine, and I didn't get stuck in the place I had gotten stuck in earlier. So I just want to know is collision geometry even necessary?


That really depends on the mesh. In the case of a model that has high complexity and small faces a collision mesh can simplify the processing and prevent the character from passing through a hole he shouldn't be able to pass through. In the case of a furniture model processing a cube for collision takes effort than processing collssion on a 700 face or more object. In the case of an interior tile set piece collision is rarely necessary.
User avatar
Guinevere Wood
 
Posts: 3368
Joined: Mon Dec 04, 2006 3:06 pm

Post » Fri May 27, 2011 7:56 pm

That makes sense, I'll remember that.

I found out i need to learn how to use nifscope. I think I was getting stuck because my main mesh had collision turned on (which must be default on blender export). So I was walking into 2 pieces of collision that were stacked on top of each other.
User avatar
Michelle Smith
 
Posts: 3417
Joined: Wed Nov 15, 2006 2:03 am

Post » Sat May 28, 2011 3:53 am

Nic is correct, but I would like to add a bit more detail.

If you don't have a collision node, and no extra data stating that the object shouldn't have collision, the engine will assume that every face should collide with respect to its normal. (this is why you can walk through the "back" of most set pieces if you ever manage to get out)

As mentioned previously, this is fine as long as the number of faces is reasonable, and the shape isn't very complex. However, if the shape is complex, you can effectively create a "briar patch". I actually did this inadvertently with a shrub model - it would literally trap the player. While intriguing, this isn't very nice - because you have to console your way out. So, I added a simple, conical collision shape to resolve the issue. The other possibility is that your shape has "holes" in it that you can't see. At just the right angles, the player can escape the collision, and end up in that oblivion you were talking about.

Further, you can prune collision on objects such as trees, shrubs with large, woody stems, etc. For example, I found some philodendron models that I really liked. Using the default collision, the player would have been blocked, or able to walk on, the leaves. I really didn't like that, so I added a collision model for the stem only. In fact, I even reused the nitrishape - I just linked to it in the collision node. Now, only the woody stem has collision, but the leaves do not collide. This allows for a dense jungle that you can actually walk in.

Note that this technique works very well with Vurt's (and stock) pine trees. You don't want to collide with the branches in general, because it makes it too easy to get confined in a dense forest.
User avatar
Kat Lehmann
 
Posts: 3409
Joined: Tue Jun 27, 2006 6:24 am

Post » Sat May 28, 2011 6:03 am

Collision geometry isn't necessary, you don't have to collide with the object. If you want collision, dedicated collision geometry (also known as a proxy or hull) is designed to simplify collision and line of sight.

There are also some speed increases you can get by using simpler collision. Traditional collision tests per-poly, so fewer polys means better speed. MW also support AABB and sphere collision, which are both simpler and faster.

For simple concave meshes, it's recommended that you use per-poly collision. For complex, use a collision hull. For simple convex meshes, use box or sphere collision.
User avatar
Helen Quill
 
Posts: 3334
Joined: Fri Oct 13, 2006 1:12 pm


Return to III - Morrowind