blur959 Posted July 26, 2011 Share Posted July 26, 2011 Hi, I was wondering if anyone could tell me what is wrong with this file? I get very weird rotations going on. All help provided is very much appreciated. coping_problem.hipnc Quote Link to comment Share on other sites More sharing options...
anim Posted July 27, 2011 Share Posted July 27, 2011 there is no N on your points, so vopsop4 cannot compute correct rotation make sure you have correct N and v before that node or even before popnet to initialize values even for the first frame Quote Link to comment Share on other sites More sharing options...
blur959 Posted July 27, 2011 Author Share Posted July 27, 2011 there is no N on your points, so vopsop4 cannot compute correct rotation make sure you have correct N and v before that node or even before popnet to initialize values even for the first frame Hi, I was wondering how do I make sure that they are correct? Could you build a simple help file as a demo? It will very much be appreciated. Quote Link to comment Share on other sites More sharing options...
stephenl Posted July 27, 2011 Share Posted July 27, 2011 (edited) cant dl your file right now but use a facet sop somewhere before your vopsop for N and check the pre-compute normals Edited July 27, 2011 by stephenl Quote Link to comment Share on other sites More sharing options...
anim Posted July 27, 2011 Share Posted July 27, 2011 (edited) I used word correct, but I meant correct for you. It can be set to any non zero vector to behave correctly, but if you want your pieces to start as they are, you need to set N to 0,0,-1 and v to 0,1,0 with point SOP before popnet2 (facet sop will not help here since it's just pointcloud) then it may surprise you that the pieces will rotate 90° immediatelly when they start moving, since v is then changed to correct this a little you may want to change vopsop4's behavior to use N and up instead of N and v since v is reset in popnet2 to zero vectors when point is not moving, causing the abrupt change in rotation just after first move since up is automatically updated in pop networks according to v it will rotate pieces a bit too and it may or may not be what you want see the file or if you just don't want any rotations to happen, just create float4 orient attribute 0,0,0,1 instead of vopsop4 the question is, how you want to rotate the pieces? and according to this you may chose correct way the best would be to compute rotations directly in popnet2 and then just use them in vopsop3? did you make vopsop4 and vopsop3 nodes? if yes then you probably know how to do this, if no then maybe we can help you further if you specify your needs coping_proble_fix.hipnc Edited July 27, 2011 by anim Quote Link to comment Share on other sites More sharing options...
blur959 Posted July 27, 2011 Author Share Posted July 27, 2011 I used word correct, but I meant correct for you. It can be set to any non zero vector to behave correctly, but if you want your pieces to start as they are, you need to set N to 0,0,-1 and v to 0,1,0 with point SOP before popnet2 (facet sop will not help here since it's just pointcloud) then it may surprise you that the pieces will rotate 90° immediatelly when they start moving, since v is then changed to correct this a little you may want to change vopsop4's behavior to use N and up instead of N and v since v is reset in popnet2 to zero vectors when point is not moving, causing the abrupt change in rotation just after first move since up is automatically updated in pop networks according to v it will rotate pieces a bit too and it may or may not be what you want see the file or if you just don't want any rotations to happen, just create float4 orient attribute 0,0,0,1 instead of vopsop4 the question is, how you want to rotate the pieces? and according to this you may chose correct way the best would be to compute rotations directly in popnet2 and then just use them in vopsop3? did you make vopsop4 and vopsop3 nodes? if yes then you probably know how to do this, if no then maybe we can help you further if you specify your needs Hi, thanks for the replies and help file. I did not build both vopsops. Hence I was wondering if whether I could re-define the rotation values in SOP level( maybe by using a group node and a primitive sop to rotate the pieces with an expression?) or is there a much easier way of doing it? Regarding computing rotations in popnet, I tried that by using a rotation node in POPs, but it doesn't really seem to be working. Thank you. Quote Link to comment Share on other sites More sharing options...
anim Posted July 27, 2011 Share Posted July 27, 2011 the best method is using VOPs either VOP POP or VOP SOP to create 'orient' or 'rot' attribte directly on points but in POPs you have the advantage of simulation environment so rotation from previous step is available in current step, therefore you can add up your rotations step-by-step in SOPs you need to compute rotation based on something, like velocity, or make it totally independent of your simulation rotation POP works, but you will not see it on fragments since you are not using 'rot' attribute in "your" custom setup see the file (I used angular velocity POP instead of rotation POP, but the same applies, vopsop3 needed to be changed a little to accept 'rot' attribute) It is maybe difficult for you to imagine what you are doing since you are using very custom setup, which requires a little knowledge or insight if you want to modify it or tweak with rotations it's always about what you want, since you still didn't specify how you expect them to react it's just random rotation according to speed for now coping_proble_rot.hipnc Quote Link to comment Share on other sites More sharing options...
blur959 Posted July 28, 2011 Author Share Posted July 28, 2011 the best method is using VOPs either VOP POP or VOP SOP to create 'orient' or 'rot' attribte directly on points but in POPs you have the advantage of simulation environment so rotation from previous step is available in current step, therefore you can add up your rotations step-by-step in SOPs you need to compute rotation based on something, like velocity, or make it totally independent of your simulation rotation POP works, but you will not see it on fragments since you are not using 'rot' attribute in "your" custom setup see the file (I used angular velocity POP instead of rotation POP, but the same applies, vopsop3 needed to be changed a little to accept 'rot' attribute) It is maybe difficult for you to imagine what you are doing since you are using very custom setup, which requires a little knowledge or insight if you want to modify it or tweak with rotations it's always about what you want, since you still didn't specify how you expect them to react it's just random rotation according to speed for now Hey anim, thanks alot for the help provided, I've learnt alot too. 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.