Bounding box/collision flexibility for animated models

Feedback on past, current, and future development.
Post Reply
User avatar
DestinedToDie
Posts: 1181
Joined: 29 Jun 2015, 09:08

Bounding box/collision flexibility for animated models

Post by DestinedToDie »

So when you want to give an animated creature collision in Morrowind, you simply make a bounding box around it. However this has some limits that become more and more noticeable when making bigger creatures.

Let's say I make a huge dragon with wings. Now I add the bounding box... which has to cover all of the dragon area in which I want to have collision. However this box is extremely unflexible, leading to this:

http://i.imgur.com/VRNo6BX.png

As you can see, with a bounding box like that there is no way to jump on the wing of this dragon. Also, because the head and feet are so far away, I have to set the bounding box farther from the feet if I want collision in the head, resulting in the player running against an invisible wall 10 meters away from the feet. Furthermore, if I wanted collision for the entirety of the wings, I would have to scale the bounding box even bigger!

There seems to be no way to modify the shape of the bounding box to a satisfiable degree. Please tell me I am wrong, because I want to be. And this is a problem EVERY added model with a bounding box is going to have.

----------------------------------------------


However. If you use a nif with no animation, what the game does on default seems to be that it uses the mesh as collision. No bounding box involved. This has a slight problem with the player possibly getting stuck when running against the mesh, but at least it's not a cube-shaped box. In other words, if I add the dragon into CS as a static, you can jump on its wings and run below its feet, which is awesome!

Which leads me to my request. Would it be possible to add collision without a bounding box to animated creatures/NPCs/etc? Also, if this is done, reduce the getting stuck factor?
Last edited by DestinedToDie on 25 Jul 2015, 22:49, edited 1 time in total.
User avatar
Ace (SWE)
Posts: 887
Joined: 15 Aug 2011, 14:56

Re: Bounding box/collision flexibility for animated models

Post by Ace (SWE) »

What seems to be a popular way to do this in some projects I've seen, is that they basically attach OBBs (Oriented Bounding Box) to the skeleton. So the collision only has to deal with simpler moving boxes instead of advanced model geometry, while still allowing collisions against animated models.

I've got no idea how hard such a thing would be to do for OpenMW though, but I imagine it would be one of the easier ways to solve the problem.
User avatar
wareya
Posts: 338
Joined: 09 May 2015, 13:07

Re: Bounding box/collision flexibility for animated models

Post by wareya »

>What seems to be a popular way to do this in some projects I've seen, is that they basically attach OBBs (Oriented Bounding Box) to the skeleton.

This is vastly the most common solution to this problem for things like hit detection and attack hitboxes, but it's just not practical for things like movement etc which really need a hull to work the way the player expects.

I think that the hull for large objects should be cylindrical or at least octagonal, because the diagonal size difference of a box becomes too noticeable at that scale.

Most modern games engines support separate hulls and hitboxes.
Post Reply