sergio Posted April 23, 2015 Share Posted April 23, 2015 Hello everyone, I am trying to recreate the per primitive rotation example i found here with VEX for learning purposes. The example file uses VOP to calculate a quaternion to rotate the points but when i do it in vex something weird happens and points doesn't behave as expected. I have also used qrotate() but no luck. Can you please take a look at file? Am i calculating the quaternion wrong? Thanks in advance Per_prim_rot_vex.hipnc 1 Quote Link to comment Share on other sites More sharing options...
sadhu Posted April 24, 2015 Share Posted April 24, 2015 (edited) Hello Sergio, I am not sure but following seems to be the issue In your pointvop_rotate_prims, makeinstancexform1 vop has no input P connection. Connect P from global inputs to P param on makeinstancexform1 vop and you will notice that your vop output is matching to vex output. I am guessing when no input is connected to P it assumes (0,0,0) value for P and trans para is taking care of the position. In instance expression, pivot is giving you position so don't need to specify P = @P, set it to (0,0,0). Make following changes in your code. vector origin = (0,0,0); final = instance(origin,@N,scale,rotate,Q,pivot); Edited April 24, 2015 by sadhu Quote Link to comment Share on other sites More sharing options...
sergio Posted April 24, 2015 Author Share Posted April 24, 2015 Yes that's it. I assumed it would default to position if none is fed but apperently it was 0,0,0. Thank you Sandeep, much appreciated. 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.