Jump to content
  • Advertisement
Sign in to follow this  
Itun

dual quaternion skinning normal transformation

This topic is 2787 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I use this paper to make dual quaternion skinning. They use this algorithm:

Input: dual quaternions ˆq1,...,ˆqp (uniform parameters)
vertex position v and normal vn
joints indices j1,..., jn and weights w1,...,wn
Output: transformed vertex position v` and normal vn`
ˆb = w1 ˆqj1 +...+wnqˆ jn
// denote the non-dual part of ˆb as b0 and the dual one as b?
c0 = b0/||b0||
c? = b?/||b0||
// denote the scalar part of c0 as a0 and its vector part as d0
// denote the scalar part of c? as a? and its vector part as d?
v` = v+2d0 ×(d0 ×v+a0v)+2(a0d? ?a?d0 +d0 ×d?)
vn` = vn +2d0 ×(d0 ×vn +a0vn)
// note that vn` must be transformed by the inverse transpose matrix


They have noted that I must use the inverse transpose matrix, but what matrix and Why do they use direct normal transformation without changes ( If it will be the matrices they must to use inverse transpose matrix), I think that quaternion must be changed, but don`t know how.

Share this post


Link to post
Share on other sites
Advertisement
I am not sure if this will answer your question as I didn't check the link to the paper.
However, the inverse transpose is needed in case there is non-uniform scaling involved.

Dual quaternions only represent rotation and translation, by basically using two quaternions.
As you can see the skinning of the normal is also simpler than skinning the position, because the translation transformation can be skipped as that doesn't influence the normal.

There are some techniques/methods to support scaling when using dual quaternion skinning.
One way is to build a scaling matrix with just the scale inside it and transform the skinned vertex by the scale matrix.

In that case if you use non-uniform scale, so where x,y,z don't have the same scale value, you have to multiply by the inverse transpose of that scaling matrix in order to get correctly scaled normal.

That is probably why they mention that.

Share this post


Link to post
Share on other sites

I am not sure if this will answer your question as I didn't check the link to the paper.
However, the inverse transpose is needed in case there is non-uniform scaling involved.

Dual quaternions only represent rotation and translation, by basically using two quaternions.
As you can see the skinning of the normal is also simpler than skinning the position, because the translation transformation can be skipped as that doesn't influence the normal.

There are some techniques/methods to support scaling when using dual quaternion skinning.
One way is to build a scaling matrix with just the scale inside it and transform the skinned vertex by the scale matrix.

In that case if you use non-uniform scale, so where x,y,z don't have the same scale value, you have to multiply by the inverse transpose of that scaling matrix in order to get correctly scaled normal.

That is probably why they mention that.



One thing to note, if you are doing this in a shader(or other time critical code) is you can use the adjoint transpose, since it is the same except for a scale factor and much cheaper to compute.


David

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!