Jump to content
Sign in to follow this  
cloudfx

copy sop + pop and $LIFE.

Recommended Posts

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!!!! :lol:

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 by Jae Yoo

Share this post


Link to post
Share on other sites

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!

Share this post


Link to post
Share on other sites
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!!!! :lol:

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 by SpencerL

Share this post


Link to post
Share on other sites
Guest Swann

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 by SWANN

Share this post


Link to post
Share on other sites
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.

Hey, Swann.

thanks a lot! :lol:

Share this post


Link to post
Share on other sites

hi!

would it not be easier to make a spare parameter which samples $LIFE with chf expression, and use that in scale?

Share this post


Link to post
Share on other sites
Hey, Swann.

thanks a lot! :lol:

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×