View Full Version : Exporting Normals for skinned mesh

 Augustine04 April 2009, 04:00 AMHi 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.
Augustine
04 April 2009, 08:39 AM

eek
04 April 2009, 03:59 AM
is this face normals or vertex ones? You want to get the normal every face on each frame?

Augustine
04 April 2009, 04:35 AM
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.

eek
04 April 2009, 05:13 AM
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.

Augustine
04 April 2009, 07:22 AM
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.

CGTalk Moderation
04 April 2009, 07:22 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.

1