Wednesday, November 27, 2019

Applying a transform into Normal vector.


Applying a transform into normal vector
When we apply a transform into normal vector, we can't use N * M. Because we don't want scale effect like below.


We represent basic transform like below. 




We want to apply R(rotation) only not S(scale). Our expected transform needs to be like below.



If we take inverse of rotation matrix and then take transpose, result matrix will be same as original rotation matrix. so we can represent above formula like below.


As we know, scale transform is a diagonal matrix. If we take a transpose of it, result will be same as original scale transform.


Our expected matrix can be like this.

In the transpose matrix, there is a property.


matrix can be represented like below.


In the inverse matrix, there is a property.


matrix can be represented like below.


R1 * S * R2 is a transform matrix M. As a result, we can have a matrix down below.


The transform matrix what we want is Mwant and it is a inverse of original matrix M and take transpose.

No comments:

Post a Comment

Task in UnrealEngine

 https://www.youtube.com/watch?v=1lBadANnJaw