Jump to content

Fading trail from moving point


notintricate

Recommended Posts

Hi,

I'm reading point position from text file. So each frame point position changes. I applied trail node to this point and it does what it should, but I'd like to achieve fading effect by changing alpha and colour of particles at the end of the trail.

Any advice on how to achieve this will be useful!

I think that I should somehow add additional attributes (age, scale, colour) based on time, but have not that much experience to figure out how exactly it should be implemented.

Thanks in advance!

post-15099-0-68378800-1456486575.gif

Link to comment
Share on other sites

Thanks for your reply, interesting example. 

But trail fading in the example isn't based on time.

 

I tried to implement trails the following way:

reverse point IDs to get descending numbers

remap this range to fit 0-1 range and use this data to drive volume shader density.

 

It does the thing, but again, trails aren't based on time.

 

How can I use time data to map it to density? I need somehow to create "age" attribute to drive trail density after particle gets old enough. Have no Idea how to implement it yet, though (

Link to comment
Share on other sites

Make the trail length be the longest you might ever want for your effect (say 48, to represent 48 frames). That means when you generate your 0-1 ramp, it represents 2 seconds. You can then use another wrangle with a ramp channel to trim that back to something reasonable, say 1/2 a second, but you know you have that full 2 seconds of leeway to do what you want. If you want the density falloff to be crazy long, make the trail 240 frames! Overestimate the trail, then cut it back to what you need.

 

A trial sop can get a little slow when used interactively with long trails, I usually put a cache sop immediately after it to keep houdini feeling fast.

  • Like 1
Link to comment
Share on other sites

Another way to create age for your trail geometry is if you create an attribute on the geometry which has the value of $FF before you pipe it into the trail sop. Then after the trail sop to create age you simply subtract the current time by the geometry's 'frame' attribute.

  • Like 2
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...