How to import particles' life into a SHOP-VOP?

   5135   5   2
User Avatar
Member
38 posts
Joined: July 2005
Offline
Hi,

I want to to bring in the life of each particle into a shader vop and use this
value to manipulate the alpha of each point.

I understood that the equivalent of $LIFE is attribute 'life' divided by 'life'.
But how can I bring in this attribute?

Do I have to use the ‘get attribute’ - vop?
The help seems to be buggy here, because when I click the question mark sign,
the help throws an error.

Any help appreciated

Cheers
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
I think $LIFE as is can't be imported. The only one I believe.

I break it out in to two custom float attributes: $AGE and $LIFESPAN then bring that in to your shader.
There's at least one school like the old school!
User Avatar
Member
38 posts
Joined: July 2005
Offline
Thanks, Jeff.

I begin to understand (slowly though) the concepts behind VOPs… )
I figured it out. In a VOP SOP I can chain together

‘Global variables (life)’ -> ‘Ramp Parameter (spline/float)’ -> ‘Add attribute (Alpha)’

I thought, everything works fine now, but I'm running into a new problem
I set the highest value of the ramp to 1, but the resulting values for the alpha are all above 1.
In the spreadsheet I can see that ‘life’ is something between 0.0 and 1.0;
the resulting alpha values are between 1.0 and 1.1 .


Cheers ?
User Avatar
Member
38 posts
Joined: July 2005
Offline
Ok, never-mind.

I had to switch the ‘type modifier’ to ‘vector data’ …

Cheers
User Avatar
Member
7743 posts
Joined: July 2005
Offline
It's possible to interpolate higher than 1.0 values in the ramp editor. It's also possible to set ramp points with values higher than 1.0 as well … it just can't show you higher values. Double-check all your ramp key values are less than or equal to 1.0 and try changing the interpolation function to something that can't overshoot (ie. anything other than catmull rom).
User Avatar
Member
38 posts
Joined: July 2005
Offline
Thanks Edward, for pointing that out.
  • Quick Links