Mopping my Landscapes

Mopping my Landscapes

Imagen de dagbud

I am currently in the process of integratingHavok physics into my game and so far so good. I am at the point now where I must start designing my landscapes and environment and have run into a snag. My game is going to take place in a city type environment and I will be creating an editor that will add streets, buildings, and other city type objects into the world. I am tooling around with the idea that my city streets will be created by placing instances of the streets into the world and connecting them together. Items to be modeled and placed are things like Streets, Corners, T-Intersections, and 4-way intersections along with other types of objects. After the level is created, I was going tocompile all of mycity entities into an hkpMoppBvTreeShape for use in the actual game.


My questions:
In order to export my shape for these objects from my editing tool, do I export the objects as a rigid body?


Is there a better way of doing it for more optimal performance?


Thanks for any help or suggestions on this.

publicaciones de 6 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.
Imagen de sean.thurston

Hi dagbud,

The recommended way to go about using Mopps is to try to get all your fixed geometry into one fixed rigid body(usually an hkpExtendedMeshShape) and then wrap that rigid body with a Mopp. You are going to want to generate your Mopp code before runtime as it can take some time to generate. The docs have some good information on Mopps, specifically Havok Physics/Collision Detection/Offline generation of data and Havok Physics/Collision Detection/Creating Shapes/Landscapes. I hope this helps.

Thanks,
Sean

Developer Support Engineer Havok www.havok.com
Imagen de dagbud

Thanks for the reply Sean.


I will simplify the task by requiring the basic landscape to be pre-built in some DCC tools and generate the Mopp information from this. Then my level editing util will be used to manage the actual game objects from there.


Just so I'm clear thought, I would need to export the landscape as a rigid body from the content tools then use this information to generate the Mopp. Is that correct?

Imagen de sean.thurston

Hi dagbud,

You are going to want to export the rigid body and create the Mopp at the same time. If you look at the section Havok Content Tools/Havok Filter Pipeline/Physics Filter documentation, it tells you how to do this. You are going to want all your fixed geometry in one rigid body and therefore one Mopp in order to get the best performance. The Mopp is really just a bounding volume tree wrapper that you can put around a rigid body(usually hkpExtendedMeshShapes).

It is possible to generate the Mopp in code, but you should not generate Mopps at runtime. You can look in the MoppCodeStreamingDemo.cpp for an example of how to do this. I hope this helps.

Thanks,
Sean

Developer Support Engineer Havok www.havok.com
Imagen de mseare

Sean,

You said, "You are going to want to export the rigid body and create the Mopp at the same time." Don't the Havok Content Tools do that for you if you tag the fixed geometry as a mesh?

-Michael

Imagen de sean.thurston

Hi Michael,

Yes, the Havok Content Tools create the Mopp data when you export as long as you have the box checked and so forth. I was trying to say that you don't need to do it in two steps, export the fixed rigid body and then create the Mopp. You can do this operation all at once from the exporter.

Thanks,
Sean

Developer Support Engineer Havok www.havok.com

Inicie sesión para dejar un comentario.