[Closed] Exporting Normals for skinned mesh
Hi all,
We are into gaming & are developing our own game engine.
For unskinned meshes, the normals were exported & lighting works fine in our engine.
But, we are stuck in skinned meshes.
Currently for skinned meshes, I’ve exported the normals of the mesh at frame 0 in world space. For the other frames, I tried to multiply the normals by the bone’s transformation. But this does not seems to work.
Please share any ideas and techniques to export & calculate normals.
Currently, we use 1-bone-per-vertex for slower mobile devices & 2-bones-per-vertex for nextgen mobiles & handheld consoles.
Thank you.
is this face normals or vertex ones? You want to get the normal every face on each frame?
It is vertex normals. Also, I don’t want to export the normals for every frame, as it will bloat the data & heap size too much for a mobile game.
I am looking for ways to export only in 1 frame. Then recalculate the normals for each frame depending on the skin & bone information and maybe something I don’t know still.
How are you calculating the vertex position for the skinning? I’m thinking u can use the same math – get each face, for each vert use the other two that make the face and do a cross product to get the normal of that vert.
Very rough, throwing ideas out.
I’m able to export the normals for the 1st frame properly.
The problem arises, when I start to calculate the normals for other frames.