matrix and look at

   2907   4   0
User Avatar
Member
9 posts
Joined: 6月 2014
Offline
hi guys.
i have big trouble i can't understand look at nod in vex and what is concept martix?.
how work matrix in vex? look i know matrix is a chart of information but i can't understand it like vector or float or anyone and why we need vector4?
I know i can put four number in that but why 4 number .and what is relationship between vector 4 and matrix all these questions are for understand orient attribute.all sorry, for my poor english i'm working on it.
User Avatar
Member
7899 posts
Joined: 7月 2005
Offline
matrix4 is a 4x4 matrix, which is what's commonly used in computer graphics to represent 3D affine transformations. See: http://en.wikipedia.org/wiki/Transformation_matrix [en.wikipedia.org]

When you take a vector in Houdini and multiply it by a matrix on its right-ride, then you're transforming that vector using that matrix. eg. v *= M. The values in that matrix dictate how that vector will be transformed.

Now, sometimes you will want to v to by both rotated/scaled and translated as well. In that case you can extend vx,y,z) to v4x,y,z,1) before multiplying v4 with that matrix. If you want to exclude the translation (say because v represents a direction, not a position), then you use v4x,y,z,0) and multiply that by the matrix.
User Avatar
Member
9 posts
Joined: 6月 2014
Offline
edward
matrix4 is a 4x4 matrix, which is what's commonly used in computer graphics to represent 3D affine transformations. See: http://en.wikipedia.org/wiki/Transformation_matrix [en.wikipedia.org]

When you take a vector in Houdini and multiply it by a matrix on its ….
Thanks edward.
so you say if i want transform data from a vector like x y z and rotation i should use vector 4,right? therefor matrix help us for better understand vector and work it?
edward what means last number in v4? you say vector4 is not just position and that is a position and direction so i can say first 3 number in vector4 are information of position and last number in direction?
if this sentence is true so how can find direction? i mean i can see position a point in the 3d space(x,y,z) but i can't imagine direction.
you told me (x,y,z,1) or (x.y,z,0) how you can find last number?
User Avatar
Member
7899 posts
Joined: 7月 2005
Offline
The last number is 1 for position, 0 for direction.
User Avatar
Member
9 posts
Joined: 6月 2014
Offline
edward
The last number is 1 for position, 0 for direction.
Thanks edwar i handle it
  • Quick Links