Game Development Community

Error, ran over the shapebase assumptions about convex hulls.

by Igor G · in Torque Game Engine · 03/22/2007 (6:26 am) · 9 replies

Hi,

AssertFatal(vertRemaps.size() < 256 && faces.size() < 256 && edges.size() < 256,
"Error, ran over the shapebase assumptions about convex hulls.");

I'm getting this fatal assert error running in debug mode when loading up my level. It currently contains a big model ~ 55,000 polys in DTS format. This error gets generated inside TSShape::computeAccelerator(S32 dl).

First - does anybody have any idea what the error means?

Second - what does compute accelerator actually do? What is a detailed collision accelerator? Is it supposed to precompute all the collision shapes in my model?

Any help is appreciated! Thanks!

#1
03/22/2007 (6:42 am)
Hi Igor,
The problem is most likely in your collision mesh. Collision meshes should be as simple as possible, and convex -- if there are any dents or holes or concave areas in the collision mesh, you'll run into trouble. And if your collision mesh is too detailed, you'll run into problems there as well.

How many polys are in your collision shape?

I'm afraid I don't know enough about the engine to even begin answering your other questions, but maybe some of the Torque illuminati can shed some light on it for you. =)
#2
03/22/2007 (7:58 am)
Hi John,

Looks like you're right - I'm looking at my model in the show tool and my collision mesh is 422 polys and all convex. My collision meshes are already as simple as possible, but I guess I'll see if I can make some changes to make that number even smaller.

Thanks.
#3
03/22/2007 (8:46 am)
Keep in mind that you can use multiple meshes for your collision shapes. The 256 hull limit is per collision mesh, if I'm not mistaken.

And worst case scenario, you can break your model into small pieces, and mount one to another if they need to be a cohesive unit.

Good luck!
#4
03/22/2007 (11:24 am)
Yikes 422 polys for a collision mesh is WAY to high. It should be about 20 polys *max*! The GJK algorithm will not do well at all with that high a poly count (from memory it will scale exponentially, bad news for that big ol collision mesh).

I'm trying hard to think of any shape that you would need that many polys for. Are you auto generating the hulls or crafting them by hand? Either way pics will help.

As John suggests, multiple collision meshes may be in order. You might also consider rolling in the poly soup collision resource Ben Garney released a few months ago if you cannot drastically simplify your collision meshes.

Good luck!
#5
03/22/2007 (4:54 pm)
Rolling in poly soup sounds nasty... like wallowing in your own filth. =D
#7
03/23/2007 (10:03 am)
Just for the record, a dts of that size (number of polys) and that big of a collision mesh will bring your game to it's knees.

It's -way- too big and complex for a single dts. That's why the Assert is there--to tell you that something about the shape is beyond the expected scope of dts shapes--in this case, your poly count and collision hull size/complexity.
#8
03/23/2007 (11:02 am)
@Stephen

Really? I'll buy that a 400 poly collision mesh is pretty heavy, but 55K polys for drawing doesn't seem that heavy on modern hardware. What causes the slowdown?

I guess I'd better do some benchmarking to figure out how I'm going to build stuff.
#9
03/23/2007 (11:19 am)
1) Even with modern video cards, your poly budget is still going to be in the 100,000 to 300,000 range. So you are using from 1/2 to 1/12th your poly budget for a single model.

2) As the original warning mentioned, while the video card itself might be able to handle the rendering, the video card isn't what does the node transforms for animation, swapping the memory about for simply keeping the node transform lists, or a variety of things the TSShape has to do (which is the class that supports dts models).

3) One of the main reasons modern hardware has the capability of pushing massive polys is a combination of cpu side render management, GPU side shader manipulation, and more advanced design analysis of data bandwidth between the CPU and GPU. Torque Game Engine is not designed to take advantage of modern hardware--you would need to move to TGE-Advanced for that type of leverage.