Collision Meshes for Complex indoor levels

Collision Meshes for Complex indoor levels

Ritratto di mauro78

Hi All! I'm wondering what's the best strategy to create/handle the build of "Collision Meshes" for a complex indoor level (doors/stairs/walls...etc...etc). Let's say around 200K triangles. Since now we've been pre-computing collision info just before starting the level processing all the triangles in the scene, and using: hkpExtendedMeshShape +hkpMoppBvTreeShape as optimization problem was that some shape generate some bad collsion data...so it was not very robust (we need too many test to see if the whole level-related collision were generated correctly using teh Havok Debugger). I think it's becouse some artist created object intersect with level geometry; so to solve the problem we've removed some objects and after that this strategy was successfull. I'm wondering what's the best strategy to handle that scenario. I'm guessing: a) Create collision shape with MAX plugin and save collision info in a .hkx file; read that file in realtime to create collision shape for static geometry. This will also allow us to choose which objects have collsion info and which objects are just needed for rendering and also we can choose if we need shape geometry (expensive) or just a bounding box (cheap) for some level assets. Also I suppose memory footprint is better. b) Use an alternative tohkpExtendedMeshShape +hkpMoppBvTreeShape or just learn how to tweak what've been using since now. But really don't have many ideas about possible solution so I would need some advice. Thanks in advance Mauro Ion6 Games

4 post / 0 new
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione
Ritratto di mauro78

I think I solved the problem of generation collision withhkpExtendedMeshShape; now I'm using 32bit indicies and everything is generated correctly.
Anyway I'm wondering if a) is the best way to handle static level geometry and offers a better memory footprint

Regards

Mauro Ion6 Games

Ritratto di havokTyler
The Havok Content Tools docs have a good section for 'Artist Best Practices' for collision detection that's worth reading. I would definitely recommend creating collision/physics specific shapes via Max for all of your geometry. Simple shapes are faster to processes and require less memory. Keep in mind though that you still want to combine static level geometry. If you're using version 2011_2 then I would recommend using hkpStaticCompoundShape(*) to wrap your level geometry. Otherwise you can stick with hkpExtendedMeshShape + hkpMoppBvTreeShape. Another option is to use a 'mopp of mopps' (meshes built to mopps and then all geometry wrapped in a mopp) which is best for minimizing the required disk space in cases where you are instancing a lot of shapes. The docs in 'Havok Physics/Hello World!/Creating Physics Objects/Shapes/Landscapes' (and the docs on Container Shapes) describe this topic. If you're wanting to reduce memory overhead you can also look in to using the 'Optimize Shape Hierarchy' physics filter when exporting. This will instance duplicate or cloned shapes in the scene. (*) hkpStaticCompoundShape has a known issue with raycasts failing to return a valid hit in 2011_2. This is fixed in 2011_3 though, which will be coming out soon. 'Havok Physics/Hello World!/Creating Physics Objects/Shapes' has a good description of hkpStaticCompoundShape and how to use it. I hope this helps! Let me know if you have any questions, -Tyler
Ritratto di mauro78

We're still on Havok 6.6 :-) very deep response thank you Tyler we'll support both (run-time generation and "offline") Best Regards Mauro Ion6

Accedere per lasciare un commento.