Complex Collision as simple?

Hi All,

I figured out the architecture samples collide without collision meshes using the “Use Complex Collision As Simple” option in the static mesh settings.

My question, since this ‘generated’ collision isn’t shown, how does it work? Is it similar to the per vertex collision option of a skeletal mesh making my 15k poly tree an extremely taxing asset? Is there a way of showing this collision or finding out just how taxing it is?

If it works similar enough to the per vertex collision of a skeletal mesh I’m certain I’m better off with another method! I know a couple of other ways already. I looked through the static mesh docs and didn’t see this method covered so I had to ask.

How make collision with my imported object? - Content Creation - Unreal Engine Forums :wink:

Here you can find two other ways how you can create a collision:

That thread is packed full of goodies! Thanks.

That’s pretty much what I thought was happening, just wasn’t sure if it was in any way optimized. I’ll just import one since my tree has a little more shape than a cylinder.

The static mesh complex collision uses a regular trimesh which is passed into PhysX. This mesh is never updated at runtime and can be used for scene queries as well as static collision. The mesh is cooked offline so that various optimizations are done, for example building a BVH and cleaning up vertices etc…

A simulated object cannot use this complex collision as PhysX needs to store various values (for example velocity) for each vertex, and this is way too expensive for a trimesh.

In the skeletal mesh per poly case we use a similar approach but we actually need to update the trimesh per frame to match the skinning of the skeltal mesh. This can be fairly expensive as the vertex position needs to be updated. This trimesh is only cooked once offline, so various optimizations like the BVH will not update at runtime.

For these reasons we recommend that you use simple collision whenever possible. Per poly skeletal mesh is a new feature which can be avoided for most cases.

Hope that helps, let me know if you have any further questions.

That does help. Complex collision does have some degree of optimization. Though not enough for my 15k poly tree! I knew it wasn’t exactly rendered twice, but all that data is stored again, passed along again often as needed, and lots and lots of crunching.

I could sort of see it working like the skeletal mesh per poly after posting and messing around some more. Shooting my tree with the default weapon bounced off of any part of it. Leafy parts too. Not necessary! Knowing what my trees wireframe looks like pretty much means that your looking at your collision model. Just without the spiffy coloring that the skeletal mesh editor shows. Good to know for sure now.

Also good to know that it doesn’t work with PhysX. That’ll save some frustration later!


Can someone help me. I’m having trouble putting collision on this city model, i’m not sure if i have to do it manually or…?
Here is the link.

Wow! That is one massive model.
Do you really need collision? A background piece in the distance really doesn’t.
Are you importing it as one mesh or did you cut it up?
Are all of the detail pieces like the water towers on the rooftops all part of the same mesh?

If it is all one piece I think you should really find a way to break it into to smaller meshes first. I don’t know of a way to simply apply collision to something that complex, aside from the ‘Complex Collision as Simple’. Some of those things like the water towers would be much more efficient as instances. Also, being a single mesh, I don’t believe any part of it would be occluded if any part of it were visible. Though I could be wrong on that. Maybe by distance?

It depends on what you need to collide with as well.

Since your looking into collision I’m guessing you want to be able to run the streets or fly around between buildings at least. If the mesh is one piece and you don’t want to mess around with cutting it up then the best suggestion I can think of would be to tediously place blocking volumes. If you break it up first and import smaller pieces then you could choose to use blocking volumes for the larger parts as you go and possibly for the smaller parts as well, or create collision models for the parts you want to before you import them.

I would not use the ‘Complex Collision as Simple’! Maybe someone else knows a better way.

You will have to split up the city -> not because of the collision, but so many meshes are not good for the performance -> so you will need to cull smaller buildings which wont be seen from the distance. You can use “compelx as simple” but it wont be so good for the performance. So you could do it with collision boxes (1st way: but it will take pretty long ^^ but you will get a better performance, because you can just place 1 cube around 1 building (12 tris)

Thank you so much. I’m going to try the complex collision as simple. I know it’ll hurt me on performance, but I’m just testing the engine out.