Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

For example, Havok Content Tools allows you to define physic bodies, properties, connections, etc in Maya, 3d Studio Max, etc.

For creating full scenes/levels is this really the correct approach or is there some better way to do things.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Are you using Havok Content Tools to import your meshes as well or are you importing obj counterparts? How are you connecting them together in your engine? What engine are you using?

In complex scenes, you will find that many objects in the scene are repeating. If you export through fbx for example, it converts all instances into objects. And AFAIK the content tools ignore instances when exporting. If your engine supports mesh instancing (which it should) then this is a big performance loss as now you will be creating several objects (for example a bunch of crates) in your engine as separate mesh objects instead of taking advantage of mesh instancing. This applies to movable and fixed objects.

One approach is to model all the objects separately, which will be your meshes and create the physics hulls for them. Although the Havok Content Tools does a decent job of creating that hull for you, you are better of making your own as this will give you more control (this is assuming your object is complex and not a simple shape such as a box or a sphere). Now you have a relatively higher poly graphics mesh, with a lower poly convex hull (both are meshes at this point). The hull is the one that is made into a rigid body while the mesh is not (inside Maya/Max). In your engine, you simply attach the two using a wrapper so that the hkpRigidBody now moves the graphical counterpart.

I am using the Ogre3D graphics engine for example. I use the same technique as above. I can have several instances of the same mesh and it results in a performance boost.

To visualize the placement of the objects in the scene, I place the actual objects (which are in a separate layer) with dummy locators.The locators are then used to grab the transformations that are applied to the object when I import the object separately and place it in the scene within the engine (the objects on the separate layer are ignored when exporting).

There are of course several way to go about it, this is only one of them.

share|improve this answer
    
Thanks for the response Samaursa. I currently use the same approach you do using Ogre3D and a wrapper that binds an Ogre Entity with a Havok Rigid Body for example. How much of the scene would you build on the programming side of things. Lets say if you were to make a rope bridge? Would you model it all in Havok Content Tools or piece it together in code? –  David Young Nov 16 '10 at 0:06
1  
Ideally, I would piece it all in code with a simple world editor, with all the modeling (including hulls, rigid bodies and constraints) done in Maya/Max. If you are talking about highly complex levels, that is definitely the way to go. Otherwise (and this is what I did before a world editor) create simple naming conventions, such as Box_Mesh and Box_RB. Both are meshes in Maya. Box_Mesh is imported separately so that you can instance it. Box_RBs are imported via hkx and then tied with Box_Mesh by simply attaching an entity that is a Box_RB - _Rb + _Mesh. –  Samaursa Nov 16 '10 at 0:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.