halion Posted July 6, 2004 Share Posted July 6, 2004 I have this scene where I want particles to rotate once their age is at 8. I have life expectancy at 10 and variance at 2 which is where I got the value 8 from. Now I can't figure how to write a expression where it will read each particles age and then rotate once it gets to 8. Heres what I have right now. In the rotate pop activation field: if($F>1,ageCheck($MYAGE),0) Variables: $MYAGE = $AGE and $TESTAGE = 0 float ageCheck(float x) { if($MYAGE>=8) execute("setenv $TESTAGE=1"); else execute("setenv $TESTAGE=0"); return $TESTAGE; } It only evaluates to 0. Am I using the age variable right? I know that in the age pop, age is in seconds. Quote Link to comment Share on other sites More sharing options...
deecue Posted July 6, 2004 Share Posted July 6, 2004 well i think you're complicating it slightly more than you should be do this: throw down a group pop and give it a name.. something like "Age_Over_2".. Check off "Rule" and "Enable" and put "$AGE > 2" in for the rule. Throw down your rotation pop.. keep activation to 1 and as your source group, put "Age_Over_2" Thats about it (of course omit all " " ) EDIT: and if you want to see the change in rotation, go to the spreadsheet and you will see those particular ones gain a different rotation value. Quote Link to comment Share on other sites More sharing options...
halion Posted July 6, 2004 Author Share Posted July 6, 2004 Thanks for the reply. Funny that no more than 2 minutes ago I had the same idea. I started thinking I had these groups that group particles depening on their tx values and I thought wait what if I added age to that too. So $TX < 0 && $AGE >= 8 and there it goes. Now I feel bad that I wasted so much time yelling and punching my monitor when the answer was right in front of me. Quote Link to comment Share on other sites More sharing options...
Marc Posted July 6, 2004 Share Posted July 6, 2004 I find Houdini will do that to you . You come up with all these grand ideas on how to achieve something and charge off on some complex method of getting it done. And then when the dust settles you look at the result and realise that you could've achieved the same thing in about 4-5 SOPs (and it would be quicker too). Well.... in my experience anyway Marc 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.