Game Development Community

Model Collision Mesh Question - Why So Simple/Complex?

by Ian Smithers · in Torque Game Engine · 12/25/2008 (3:48 am) · 2 replies

Hi guys,

I've been steadily working through lots of tutorials and docs and wanted to ask a question that I haven't seen addressed anywhere (so far anyhow) what is a good rule of thumb about collision meshes in terms of how to create them?

Allow me to elaborate, I watched a tutorial video on creating a model in Blender with a collision mesh, and noticed that the object was quite small, and that a simple cube shape pretty much allowed for a good collision mesh since the player wouldn't likely notice if he was not -precisely- matching up to the model collision. However I've made a larger model, just mucking around, and as a result of the tutorials I was following it's ended up being more complex, having rounded egdes and so forth, so the player would notice if there was just a massive cube encompassing the entire thing. Here is a screenshot to illustrate, with me triumphantly standing upon my steel man. :)

[IMG]http://i279.photobucket.com/albums/kk144/DigitalDecadence/Giantman.jpg[/IMG]

Now in order to make that collision mesh, I simple duplicated my shape, along with the Subsurfs and all. Since I'm new to this, I'm going to go ahead and assume that was bad. ;)

Does anyone have some general rules of thumb to follow, or a resource I could read about it? I imagine somewhere, complex collision meshes have an impact, on memory, performance, load times, something. I'm just a bit new to realise where exactly. So any help appreciated.

Cheers!
Ian

#1
12/26/2008 (10:16 am)
The general "rule" is to keep them as simple as possible. Depending on your gametype, you may never need an advanced collision mesh; at least most of the games I play seem to keep it really, really simple. RPG's and action games like Devil May Cry keep their environmental collision meshes quick and dirty and concentrate on extremely accurate collision with enemies.

Doubling the mesh would not give you any benefits since it is the exact same mesh and collision points as the original one...with twice the polygons for the engine to process. Creating a simplified mesh around the ledges, etc will. Just break them down into convex shapes that are a good fit to the geometry without being as complex as the geometry.

Or you could implement the opcode "polysoup" patch to TGE (if that is the version of the engine you are using) to use the original mesh for collision. Complex meshes can be a performance killer, especially if you have extremely detailed curved surfaces.
#2
12/26/2008 (6:03 pm)
Hey David, thanks for your reply. :)

Yes I am using TGE 1.5 and I just did a quick search for Polysoup. It sounds interesting, and I will bookmark that resource and see how I go. For now I get the impression it would be easier to implement my own meshes in Blender and export them as I already know how to do that. ;)

I will just keep them fairly simple and see how it goes. Thanks!

Just as an afterthought, the reason I thought to dupe the model is so that the collision would be accurate. I was worried my character would be seen floating in the air above it or something.