Jump to content

particle's transparency based on distance to camera


itriix

Recommended Posts

Hello everyone,

i'm disintegrating a 3d world, which has a camera projection of the shot applied to it. a noisey shape grows over time and is used as a bounding box for grouping the points in the city that are going to be emitting while in the group. I would like the particles to fade as they age and ALSO fade as they approach the camera location because i don't want them in the calculation for motion blur. plus it'll look a bit cleaner.

please let me know if you have any thoughts

Link to comment
Share on other sites

Hi,

you can use a Colour Node in you POP Network and set the Alpha expression to something like

(1-$LIFE) * clamp(0.03*distance($TX,$TY,$TZ,origin("","/obj/cam1","TX"),origin("","/obj/cam1","TY"),origin("","/obj/cam1","TZ")),0,1)

.

You can see the effect in the "Details View", having the Colour Node selected.

particle_alpha.hipnc

Edited by storyteller
Link to comment
Share on other sites

Hi,

you can use a Colour Node in you POP Network and set the Alpha expression to something like

(1-$LIFE) * clamp(0.03*distance($TX,$TY,$TZ,origin("","/obj/cam1","TX"),origin("","/obj/cam1","TY"),origin("","/obj/cam1","TZ")),0,1)

.

You can see the effect in the "Details View", having the Colour Node selected.

Thanks Storyteller,

Your example works but i have a couple questions. first off, is there anything different about using this inside my popnet and using a point node in the geo level, with the same equation in the Add Alpha Tab..? How can i make it so that everything is "full alpha" based on $LIFE only, all the way up to a "distance" from the "camera" as soon as it reaches that distance, it "falls off fairly rapidly before getting to the camera completely".

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...