cudarsjanis Posted July 27, 2016 Share Posted July 27, 2016 Hey guys! Does anyone knows how could I align 2 polygons and then somehow access those angle values so I could reference it on another transform node. because using just align node, I can`t any attributes form it. I added some screen shots so you get what I`m doing. Basically I have 2 characters. One in rest position and other one animated. The animated one changes through out the shots. So i deleted out 1 polygon from each of them and by comparing them I could transform rest position to match first frame of animation. with position it`s no problem I just use centroid expression, but I`m stuck with rotation. I thought this one approach worked with attribute wrangle: vector n1 = prim_normal(0, 0, 0.5, 0.5); vector n2 = prim_normal(1, 0, 0.5, 0.5); matrix3 rot_matrix = dihedral(n1, n2); @P *= rot_matrix; vector rotate = cracktransform(0,0,1,@P,rot_matrix); v@out = rotate; Where I compare normals, But I discovered that if angle difference is quite big it does not work. Basically I would like to do what align node does, but through vex or vops, so I could get some usable attributes out. Thank you Quote Link to comment Share on other sites More sharing options...
f1480187 Posted July 28, 2016 Share Posted July 28, 2016 It may be not what you are looking for, but try Extract Transform OBJ first. It extracts transform from geometry differences, not by simply subtracting object-level transforms, as I thought earlier. Quite powerful tool, may be used to align geometry at sop level also. extract_transform.hipnc It should help. Otherwise, another link may be useful: Quote Link to comment Share on other sites More sharing options...
cudarsjanis Posted July 29, 2016 Author Share Posted July 29, 2016 Not exactly what I was looking for but thank you for the answer. Went with a bit different approach. 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.