cloudfx Posted June 24, 2008 Share Posted June 24, 2008 (edited) Hi all, I have Copy Sop which have a sphere to its left input and pop network to its right input. In Copy Sop, I have 2 stamp inputs, one for $ID, and other for $LIFE. Variable names are id and life. Of course, I turned the stamp inputs on. In the sphere's radius, I write an expression like this: fit01(rand(stamp("../copy1","id",0)),0.01,0.3) / (stamp("../copy1","life",0)*10) "fit01(rand(stamp("../copy1","id",0)),0.01,0.3)" <-- this part is working great. which is just give random radius based on its random ID. However, the life thing is not working quite well.. I wanted to make the sphere get smaller and smaller as particles life get smaller until it dies. I posted hip file too, HELP!!!! copySopQuestion_houdini9.1.001.hip BIG Thanks, --additional question-- when I opened spreadsheet of popnet, I see "life[0] , life[1]", life[0] is current particle's life and life[1] is maximum life of the particle? age? Thanks, Edited July 24, 2008 by Jae Yoo Quote Link to comment Share on other sites More sharing options...
cloudfx Posted June 24, 2008 Author Share Posted June 24, 2008 abs(fit01(rand(stamp("../copy1","id",0)),0.01,0.3) / (stamp("../copy1","life",0)* 200)) I revised the expression like that and it seems like it getting smaller by time but, since maximum particle life is around 2.5, even though I divide it by its life * 200, it doesnt go to size 0.0. Plus, when it starts, the particle size gets really big like popping. I thought the scale was going negative value, so, I used abs(), but its still not working. Here is the new version of the hip file. copySopQuestion_houdini9.1.002.hip thank you very much! Quote Link to comment Share on other sites More sharing options...
SpencerL Posted June 24, 2008 Share Posted June 24, 2008 (edited) Hi all,I am have Copy Sop which have a sphere to its left input and pop network to its right input. In Copy Sop, I have 2 stamp inputs, one for $ID, and other for $LIFE. Variable names are id and life. Of course, I turned the stamp inputs on. In the sphere's radius, I write an expression like this: fit01(rand(stamp("../copy1","id",0)),0.01,0.3) / (stamp("../copy1","life",0)*10) "fit01(rand(stamp("../copy1","id",0)),0.01,0.3)" <-- this part is working great. which is just give random radius based on its random ID. However, the life thing is not working quite well.. I wanted to make the sphere get smaller and smaller as particles life get smaller until it dies. I posted hip file too, HELP!!!! copySopQuestion_houdini9.1.001.hip BIG Thanks, --additional question-- when I opened spreadsheet of popnet, I see "life[0] , life[1]", life[0] is current particle's life and life[1] is maximum life of the particle? age? Thanks, one thing to note is that life[0] = $AGE which is how old the particle is in Seconds life[1] = $LIFESPAN which is how long the particle will live until it dies in Seconds $LIFE is a variable which fits $AGE between 0 and 1. $LIFE = $AGE/$LIFESAN Edited June 24, 2008 by SpencerL Quote Link to comment Share on other sites More sharing options...
Guest Swann Posted June 24, 2008 Share Posted June 24, 2008 (edited) Maybe this will help, Green node added by me, Saved in H 9.5 It's not the total solution but it's a little simpler than using stamping. The problem is that after some time particles starting to grow again. There is a better way to do this but it's not the best hour for my head to think how to solve this copySopQuestion_houdini9.1.001.hipnc Edited June 25, 2008 by SWANN Quote Link to comment Share on other sites More sharing options...
cloudfx Posted June 24, 2008 Author Share Posted June 24, 2008 Maybe this will help, Green node added by me, Saved in H 9.5It's not the total solution but it's a little simpler than using stamping. The problem is that after some time particles starting to grow again. Hey, Swann. thanks a lot! Quote Link to comment Share on other sites More sharing options...
dbukovec Posted June 25, 2008 Share Posted June 25, 2008 hi! would it not be easier to make a spare parameter which samples $LIFE with chf expression, and use that in scale? Quote Link to comment Share on other sites More sharing options...
grasshopper Posted June 25, 2008 Share Posted June 25, 2008 Hey, Swann.thanks a lot! I guess you're looking for something like this: (1-$LIFE) * fit01(rand($ID*1.23),0.01,0.3) Another thing you can do is to add a Color POP to the Source POP to control the color of the particles as they age. Sometimes its easier to work this way because you get feedback through using the colors. Use the Ramp tab to set colors according to $LIFE by adding $LIFE to to the Lookup field. Then in your Point SOP you would reference $CR instead of $LIFE. This is a good way to manage particles growing then shrinking (or fading in and out or whatever) over their life span. 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.