hkxVertexP4N4W4I4C1Q2 and Quant'd texture co-ords

hkxVertexP4N4W4I4C1Q2 and Quant'd texture co-ords


I'm exporting a mesh from Max using the content tool.

The exporter has classed the mesh as heavyweight and has quant'd the texture u/v's.

I'm using OGRE as the rendering engine which doesnt support having these values pumped straight into its vertex buffer. Is there a ay of getting the mesh out of Max using something like hkxVertexP4N4T4B4C1T2 which will give me the correct u/v co-ords or could you suggest a workaround for the following problem?

I wondered about re-iterating the buffer and un-quanting the co-ords, but was told that woul dbe a bad idea.



5 posts / 0 nouveau(x)
Dernière contribution
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

Hi Nick,

Are you using the same mesh for both rendering and physics simulation? This is done in our demos but usually in games there are separate assets for rendering and for physics. This is definitely the recommended approach as concave geometry collision detection is very slow in physics simulation and can often be simplified to convex geometry. The same goes for geometry with lots of triangles: more triangles means more time spent simulating physics when it could be simplified to simple primitives or low-poly meshes.

If you keep your render and physics assets separate, you won't need to worry about textures and Havok at all.



Do you mean that render meshes and animations should be exported with something native to OGRE and not using the hka side of things or do you just mean that I shouldnt create everything under the physics tab of the exporter in the same hkx file?

Looking through the data it seemed to make sense that all of the render
data is there on the animation side of things and it was quite simple to code something up to import the meshes.

The mesh is a player character. I'm exporting animation data using the content tool with the following options selected:

Transform Scene
Remove Texture paths
Create Skeletons
Create Animations
Create Skins
Prune Types ( None are actually selected atm )
Write to Platform
View XML

I can use OGRE's exporter to export the mesh and all the animations etc come through fine but I was hoping to figure out the Havok animation system to use the animation transitions ( i'm actually nearly there with that bit ) but i still remain hindered by the fact that I cant pass u/v's into the renderer.

As I grow more familiar with the issue it looks like the quanting has been done because we are exporting using 16bit values to export and I expect the mesh is more complex than that ( I bought it from a mesh site )



Render meshes should be imported into OGRE using some format designed for render meshes. OGRE has its own mesh format for this. Havok can handle animation and physics, and the Havok Content Tools will export animations and physics meshes for you, but it's important that you don't physically simulate your render meshes.

Player characters are usually physically simulated by a simple model made with a couple of capsules for each arm, a couple for each leg, and a few boxes or spheres for the torso for "high quality" and often a simple capsule surrounding your render mesh is enough for acceptable physical interaction.

You shouldn't be passing anything from hkx files to the renderer. Use the hkx file data to create your Havok world, and then you use the Havok-animated/Havok-physically-simulated object transforms to set the transforms of your render-meshes.

Have a look at Havok Physics->Physics Articles->Physics Primer in the docs and hopefully it'll make a little more sense to you as to how to implement what you're trying to do.


Ok cheers Dan, thanks for clearing that up :)

Connectez-vous pour laisser un commentaire.