2

I created my own skinned mesh loader. It's working fine, but my problem is I don't know how to transform (scale & rotate) the skinned mesh so that the transformations are "baked" onto the vertices. If it were just a geometry, transforming the vertices are a piece of cake, but now that skinning info is involved, if I do a scale for example, my mesh gets all stretched. I know I need to transform my skinning data too, but which parts? All the Bind Pose matrices? The Inverse Bind Pose Matrices? I can't seem to understand how to go about this.

My implementation is in C# & OpenTK and I am specifically loading Skinned Collada files exported from Blender 2.6.

Thanks in advance.

atamocius
  • 23
  • 3

1 Answers1

0

I don't know C# and OpenTK, but I try to help on the theoretical side. Vertices are transformed by weighted global transform matrix. To form a global transform, you need to concatenate local transform of each joints. To create a local transform, you need to concatenate the local translate, rotate and scale. The weight would come from the joint. So I think you need to get joint local rotation/translation/scaling of your bind pose, then manipulate those local matrix and form them to global matrix. After that, you apply weights to the global transformation then transform the vertices.

The following link may be similar to your question. COLLADA: Inverse bind pose in the wrong space?

I created this collada file player, but use C++. http://www.youtube.com/watch?v=bXBfVl-msYw

Community
  • 1
  • 1
sirian_ye
  • 610
  • 6
  • 11