码迷,mamicode.com
首页 > 其他好文 > 详细

Matrix in Houdini

时间:2019-12-27 18:09:05      阅读:90      评论:0      收藏:0      [点我收藏+]

标签:bsp   app   val   creat   sla   eth   ide   numbers   one   

  Matrix in houdini is still just a collection of numbers, the only different is :How you apply this data determines what kind of matrix it is.

  There is always 3x3 or 4x4 or QxQ matrix in houdini.

0.3x3 Matrix is:

技术图片 

1.Main type of matrix in houdini.

技术图片

2.If you want to rotate some points using matrix......

技术图片

 

3.If you want to translate something......

技术图片

 

The meaning of this matrix is:

 

 技术图片

 

 

 4.Identity matrix is a matrix which keeps your positions the same

技术图片

 

 

 5.Example rotate geometry using wrangle node.

技术图片

.In the wrangle node ,the vex script is:

1 //create a identity matrix ‘rotY‘
2 matrix3 rotY = ident();
3 
4 //Applies a rotation value to the given matrix, here is rotY.
5 //Channel ‘rotY_value‘ is the rotation degree.
6 rotate(rotY, radians(chf(rotY_value)), {0,1,0});
7 
8 @P *= rotY;

6. Set a component of a matrix.

. We can use ‘setcomp‘ in VEX to modify a single component of a exist matrix.

 

 

 技术图片

X.* is the X Axis direction vector of this Axis.

Y.*  is the Y Axis direction vector of this Axis.

Z.*   is the Z Axis direction vector of this Axis.

P.* is the position of this Axis.

Matrix in Houdini

标签:bsp   app   val   creat   sla   eth   ide   numbers   one   

原文地址:https://www.cnblogs.com/vfxJerry/p/12108565.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!