particles

   5808   5   1
User Avatar
Member
27 posts
Joined: Sept. 2009
Offline
How do I make particles fade in opacity over time with a custom sprite shop? Or rather how do I reference the $LIFE variable for particles in a shop?

thanks,

noob
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
All you need to do is add a Color POP and use the alpha ramp. The Alpha point attribute is picked up by both the viewport and the material that is applied when you use the Sprite Tool from the shelf to set this up.

A couple lookup example functions:

smooth($AGE, 0, 3)
There's at least one school like the old school!
User Avatar
Member
27 posts
Joined: Sept. 2009
Offline
So there is still popping when I render the frames out, but not in the viewport. My shader is just a single texture node plugged into an output node. In the color node I have it set to pass on the color tab, but on the alpha channel I have the ramp going from black to white. I think the problem pertains to having the viewport and rendering not match up, but I'm too new at houdini to know what yet….?

source->color->sprite->gravity

vopsurface->suboutput

(inside vopsurface) texture1->output1
User Avatar
Staff
2540 posts
Joined: July 2005
Offline
You have to add a parameter VOP and for the name give it Alpha.

Better yet, put down a default material and look for that parameter VOP that fetches the Alpha attribute and chase it through the shader to see how to implement.

In a nutshell you fetch the Alpha geometry attribute, then you multiply the Opacity by this alpha and wire it in to the output Opacity.
There's at least one school like the old school!
User Avatar
Member
27 posts
Joined: Sept. 2009
Offline
I've tried making a custom vex node with the “shading layer attribute” node set to Alpha, as well as setting a “Parameter” node with the name Alpha. I've set each one of these nodes individually to the color output to see if the value is changing over time, and each particle is set to 1 the entire time. For some reason I can't seem to get my source->color (alpha) to communicate with my shader.

I have three spots for assigning a material on the sprite node, the /obj/particleEmitter, or attaching a material node after the popnet. Which one should be set to what? I've tried every combination, but I'm not sure which overrides which statement?

Or, does anybody know of a tutorial that shows how to setup sprites correctly. The video I was watching is for 9.0.
User Avatar
Member
27 posts
Joined: Sept. 2009
Offline
my problem was that I was actually getting an alpha, but it was not being multiplied by the color so I couldn't tell it was there. I turned off everything in my scene except my particles and noticed when i switched to the alpha channel that the values were actually present. Thanks to everyone for their help.
  • Quick Links