Mozzarino Posted October 2, 2018 Share Posted October 2, 2018 Lately I have been trying to wrap my head around transforming point positions with the use of matrices in VOPs. To do that, I tried the following: Lets assume I have 3 points with their position vectors A, B and C which come from an alembic and are constantly changing values. I use a time shift and set it to $F + 1, and extract the same points position vectors, which are now called D, E, F. Then I set A,B and C into a 3x3 matrix, transposing it (to get the vectors in columns instead of rows) and do the same with D, E, F. After all this, I multiplied the inverse of the matrix containing ABC with the one containing DEF (this was not inverted). The resulting matrix was multiplied with new Position inputs, but the resulting transformations didn't match the original ones... What am I doing wrong? Thank you. Quote Link to comment Share on other sites More sharing options...
Aizatulin Posted October 2, 2018 Share Posted October 2, 2018 (edited) Hi, usually it should work this way, but you have to make sure, that A,B,C are linear indepedent or the matrix will be not invertable. The transposed matrix is only the inverse matrix, if A, B, C are orthogonal (use invert instead). matrix_test.hipnc Edited October 2, 2018 by Aizatulin Quote Link to comment Share on other sites More sharing options...
Mozzarino Posted October 3, 2018 Author Share Posted October 3, 2018 (edited) Guess I will have to have a more in-depth look at this... Thank you! Edited October 3, 2018 by diogomgf Quote Link to comment Share on other sites More sharing options...
gui Posted October 6, 2018 Share Posted October 6, 2018 I didn´t understand your equation. If you are using positions DEF, you should multiply them by (DEF)-1 * ABC to get positions, A, B and C. If you are using positions A, B and C to go to D, E and F, you math should work, just check if your matrix is correct (use a make xform vop node and compare them). Quote Link to comment Share on other sites More sharing options...
Mozzarino Posted October 8, 2018 Author Share Posted October 8, 2018 On 10/6/2018 at 10:49 PM, gui said: I didn´t understand your equation. If you are using positions DEF, you should multiply them by (DEF)-1 * ABC to get positions, A, B and C. If you are using positions A, B and C to go to D, E and F, you math should work, just check if your matrix is correct (use a make xform vop node and compare them). Thank you for the insight, will do it as soon as I have time! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.