Particle Size not decreasing with age

   5844   6   0
User Avatar
Member
11 posts
Joined: June 2020
Offline
Hello everyone! I'm a total beginner to Houdini and this is my first simulation that follows the "Particles Fun" tutorial:
https://www.sidefx.com/tutorials/particles-fun/ [www.sidefx.com]

At the 7:50 mark, the Attribute Create node was used and was renamed to pscale. "$CR" was keyed in under the Value parameters, and the creator explained that this would make the particle sizes decrease over time. This was, at a later point, changed to "$CR*0.1* but in my case, I used "$CR*0.02* for a better desired size.

Nevertheless, I noticed that my particles did not fade over time [drive.google.com], and was wondering what could be the issue here.

I tried to troubleshoot and saw a few users explaining how they used Attribute Wrangle on the forums here.

And so I did that, and while I did notice them fading more, they seemed to wiggle a lot too which made the simulation seem quite noisy [drive.google.com].

This was the expression I used:

float @pscale;
@pscale = rand(@ptnum) ;

@scale = fit01(rand(@ptnum), .001, .02);

Hopefully someone could help to explain what went wrong here. Thank you very much.

Image Not Found

Attachments:
simulation02_02.hipnc (2.3 MB)

User Avatar
Member
2629 posts
Joined: June 2008
Offline
A common setup is to normalize age over life. Then you have a percentage (i.e. 0-1) that you can route to a control ramp. The left side of the ramp represents birth, and the right side represents death. This way you can shape growth throughout the life of the particle.
Edited by Enivob - Dec. 27, 2021 10:23:47

Attachments:
Untitled-1.jpg (110.9 KB)
nage_particles.gif (959.7 KB)
ap_simulation02_02.hipnc (2.3 MB)

Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
250 posts
Joined: March 2013
Offline
Pops internally generates a normalized age attribute, that is not visible on the geometry
spreadsheet, @nage. So you can use float index = @nage in this case also.




L
Edited by lewis_T - Dec. 27, 2021 16:36:31
I'm not lying, I'm writing fiction with my mouth.
User Avatar
Member
11 posts
Joined: June 2020
Offline
Enivob
A common setup is to normalize age over life. Then you have a percentage (i.e. 0-1) that you can route to a control ramp. The left side of the ramp represents birth, and the right side represents death. This way you can shape growth throughout the life of the particle.

Thank you so much for your time! Your approach is easy for me to understand. I would like to ask whether you knew why the $CR expression wasn't working out? I was troubleshooting and read on a forum that the dollar expression variables are being phased out. Is that what was causing the issue?

Thank you again.
User Avatar
Member
250 posts
Joined: March 2013
Offline
It is working. It's just that your particles life has been reached, and the fit you are using is clamping
everything. If you up that fit to 10 or so, you'll see the attribute create is working.

Your simulation starts at frame 1, so by frame 120 a lot of your particles have reached their full age.
But I would stop using attribute create, as it's single threaded. Just scrubbing the timeline using
a wrangle is about 20x faster compared to the attribute create. That SOP is verrry old, and the use of
$ type variables is also verrry old, you don't want to use this method at all.

Instead, just use a wrangle after your point VOP,

f@pscale = @Cd.r * 0.02


You point VOP mapping vel to Cd doesn't need a vectofloat, the length VOP is already spitting out a float value btw.


L
I'm not lying, I'm writing fiction with my mouth.
User Avatar
Member
11 posts
Joined: June 2020
Offline
tinyhawkus
It is working. It's just that your particles life has been reached, and the fit you are using is clamping
everything. If you up that fit to 10 or so, you'll see the attribute create is working.

Your simulation starts at frame 1, so by frame 120 a lot of your particles have reached their full age.
But I would stop using attribute create, as it's single threaded. Just scrubbing the timeline using
a wrangle is about 20x faster compared to the attribute create. That SOP is verrry old, and the use of
$ type variables is also verrry old, you don't want to use this method at all.

Instead, just use a wrangle after your point VOP,

f@pscale = @Cd.r * 0.02


You point VOP mapping vel to Cd doesn't need a vectofloat, the length VOP is already spitting out a float value btw.


L

Many thanks for your response
User Avatar
Member
1 posts
Joined: Sept. 2022
Offline
Enivob
A common setup is to normalize age over life. Then you have a percentage (i.e. 0-1) that you can route to a control ramp. The left side of the ramp represents birth, and the right side represents death. This way you can shape growth throughout the life of the particle.

Me he from the future, thanks a lot for these examples! exactly what I need.
  • Quick Links