Transformation
-
Where can I get information as to the meaning of each variable in a SU components transformation matrix? Starting at [0], I think that [9], [10], and [11] are the component's origin.x, origin.y, and origin.z coordinates in the model. Where can I find a lay-person's description of, or can someone tell me what the other values stand for?
-
Yeah, Martin just recently put together something of a tutorial on this. Maybe in the last 3 weeks and posted it here. Search for it and it should help.
But essentially you got the location info correct. The last element in the array is a global multiplier for elements 0,1,2,4,5,6,8,9,10. It should be left at 1, but it gets changed sometimes unfortunately.
Then those 9 listed elements above are the rotation and scale of the transformation. 0,1,2 are the x vector, 4,5,6 are the y vector and 8,9,10 are the z vector.
But Martin explains it much nicer than that, if you can find the link.
Chris
-
Thanks Chris, my guess for the first 9 elements was that, and I will look for Martin's post. Not good being mathematically imparted, however if you ask me to draw
as follows (doing from memory, hope it's right):[0] [1] [2] [12]
[3] [4] [5] [13]
[6] [7] [8] [14]
[9][10][11][15]where 0, 1, 2 are the x vector, 4, 5, 6 are the y vector, 6, 7, 8 the z vector, 9, 10, 11 the component origin in the model, 12, 13, 14 are user variables, and 15 is essentailly 1. Can I actually put stuff in 12, 13, and 14?
-
-
Honolulu, I think the matrix should look like this:
[0][1][2][3]
[4][5][6][7]
[8][9][10][11]
[12][13][14][15]I think it lines up in rows not columns. And for sure elements 0,4,8 are the starts (the x length) of each axial vector (not elements 0 3 and 6 like you have shown).
Chris
-
Chris, Opps, you are right. Thanks.
Martin, Thanks for the link.
-
@chris fullmer said:
[0][1][2][3]
[4][5][6][7]
[8][9][10][11]
[12][13][14][15]Yes. OpenGL and SketchUp use row-major order. Microsoft's DirectX (and Fortran!) use column-major order.
@honoluludesktop said:
[0] [1] [2] [12]
[3] [4] [5] [13]
[6] [7] [8] [14]
[9][10][11][15]Odd mistake, that. In that order you can extract the 3x3 array from the 4x4 array in almost no clocks. Any idea where that might have come from, Honolulu?
-
I was drawing the matrix from memory of a screen dump the night before and thought elements [9], [10], and [11] were the component's origin. So I tried to make that fit the illustration of your matrix, and erroneously guessed at the order:-)
-
I was drawing the matrix from memory of a screen dump the night before and thought elements [9], [10], and [11] were the component's origin. So I tried to make that fit the illustration of your matrix, and erroneously guessed at the order:-)
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement