zhyravetsky Posted November 8, 2013 Share Posted November 8, 2013 need help Quote Link to comment Share on other sites More sharing options...
mangi Posted November 8, 2013 Share Posted November 8, 2013 (edited) Pop Torque DOP_POP_ROT.mov Edited November 8, 2013 by mangi Quote Link to comment Share on other sites More sharing options...
zhyravetsky Posted November 9, 2013 Author Share Posted November 9, 2013 hip..? Quote Link to comment Share on other sites More sharing options...
mangi Posted November 9, 2013 Share Posted November 9, 2013 (edited) POP Torque particle_rot_HOU13a.hipnc Edited November 9, 2013 by mangi 3 Quote Link to comment Share on other sites More sharing options...
zhyravetsky Posted November 10, 2013 Author Share Posted November 10, 2013 rand expresion..? vex code ? for example i whant to rotate each particle random..? Quote Link to comment Share on other sites More sharing options...
mangi Posted November 10, 2013 Share Posted November 10, 2013 (edited) v@torque = rand(i@id); DOP_POP_ROT_code.mov Edited November 10, 2013 by mangi 2 Quote Link to comment Share on other sites More sharing options...
zhyravetsky Posted November 10, 2013 Author Share Posted November 10, 2013 THANKS Quote Link to comment Share on other sites More sharing options...
venator11387 Posted January 23, 2014 Share Posted January 23, 2014 (edited) I’m learning to use vex in the Pop Torque based on expressions I use in the Rotate POP. -In the angle parameter, I put the following expression: if ( $NUMHIT == 0, fit01(rand($ID),$T * 40, $T * 720), fit01(rand($ID), $T * 1000,$T * -120)) -In the axis parameters of Rotate POP, I would put $VX and $VZ of the particles in each respective value. I’d like to know if this is the proper vex form for the above. I've been having trouble finding the vex variable for particle velocity so I guessed: amount = amount; if (i@hitnum == 0);{ amount = fit01(rand(@id),@Time * 40, @Time * 720); }else{ amount = fit01(rand(@id),@Time * 1000, @Time * -120); } axisx = v@vel.x; axisz = v@vel.z; Edited January 23, 2014 by venator11387 2 Quote Link to comment Share on other sites More sharing options...
magneto Posted January 23, 2014 Share Posted January 23, 2014 Particle velocity is v. Quote Link to comment Share on other sites More sharing options...
venator11387 Posted January 23, 2014 Share Posted January 23, 2014 Here is the code now and I keep getting an error, which is attached below. Bit of a noob at what's going on. amount = amount; if (@hitnum == 0) { amount = fit01(rand(i@id),@Time * 40, @Time * 720); } if (@hitnum == 0) { amount = fit01(rand(i@id),@Time * 1000, @Time * -120); } @axisx = v@v.x; @axisz = v@v.z; Quote Link to comment Share on other sites More sharing options...
magneto Posted January 23, 2014 Share Posted January 23, 2014 (edited) That's because in VEXpressions, you can't use @ for setting parameters. So in your case, you need to use this: axis.x = @v.x; axis.z = @v.z; Edited January 23, 2014 by magneto 1 Quote Link to comment Share on other sites More sharing options...
venator11387 Posted January 23, 2014 Share Posted January 23, 2014 (edited) Thank you, one more simple thing. I'm trying to stop the amount based on velocity, but it doesn't work because of this syntax prompt for the bolded. I've tried various ways based on the "Using VEX expressions" guide with no luck. Implicit cast from vector to float. Use explicit cast instead. if (@v <= .3){ amount = 0; } Edited January 23, 2014 by venator11387 Quote Link to comment Share on other sites More sharing options...
anim Posted January 23, 2014 Share Posted January 23, 2014 @v is a vector .3 is a float what you want to do is compare speed to threshold, not the velocity vector, so you need to get the length of v vector length(@v) <= .3 Quote Link to comment Share on other sites More sharing options...
venator11387 Posted January 24, 2014 Share Posted January 24, 2014 Thanks, I was able to make the syntax work, but I’m still unable to get the effect working right. Whatever expression line is acting first on the particles, it seems they stay affected by it despite the other lines I put in the code. Attached below is the scene. TorqueRotate_Test.hipnc Quote Link to comment Share on other sites More sharing options...
anim Posted January 24, 2014 Share Posted January 24, 2014 I'm not sure you understand what POP Torque does it's not setting rotation of the particles, but spinning force so setting amount on POP Torque to 0 will not set particles rotation to 0 not even make it to stop, it will simply not introduce any more spinning force on that particle that means that the particle will still remain spinning at constant speed unless there is something else affecting it (like POP Drag Spin or any custom nodes) so if you want the particle to stop spinning when the speed is below threshold just remove that if condition from POP Torque and add POP Wrangle node with following: if (length(@v) <= .1){ v@w = 0; } w is angular/spinning velocity so if you set it to 0, no more spinning will occur and particle will stay at it's current rotation if you want however reset it's rotation enter the following instead: if (length(@v) <= .1 || @age<=@TimeInc) { p@orient = {0,0,0,1}; } Quote Link to comment Share on other sites More sharing options...
venator11387 Posted January 24, 2014 Share Posted January 24, 2014 Great thanks! Until they make a POP Rotate in dops, would you say that this is the best alternative for rotating particles or do you know a better method? Quote Link to comment Share on other sites More sharing options...
anim Posted January 24, 2014 Share Posted January 24, 2014 since POPs are about simulation, it makes sense to affect rotation by introducing rotational force (torque) but for explicitly setting rotation I would use POP VOP or POP Wrangle to manipulate orient attribute directly (as showed above), you can even build "POP Rotate" or "POP Orient" very easily with them so that it does exactly what you need you can have a look at POP Lookat, it modifies orient and torque inside, it may give you some inspiration Quote Link to comment Share on other sites More sharing options...
andrewlowell Posted June 16, 2014 Share Posted June 16, 2014 (edited) It was a little funny there is a pop drag spin, but not a pop spin .. so I made one. It puts spin on particles, just use a birth group to put spin on the first born frame. There are features for randomization . It can be followed by a pop drag spin. popspin_v01.otl Edited June 16, 2014 by andrewlowell 2 Quote Link to comment Share on other sites More sharing options...
NSugleris Posted October 28, 2014 Share Posted October 28, 2014 It was a little funny there is a pop drag spin, but not a pop spin .. so I made one. It puts spin on particles, just use a birth group to put spin on the first born frame. There are features for randomization . It can be followed by a pop drag spin. Strange with that pop drag spin without the spin. Thanks Andrew 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.