random particle trail length

   927   2   0
User Avatar
Member
48 posts
Joined: 2月 2016
Offline
Ello,

I'm working with popnet and generating some particles with random lifetimes, I use the standard Trail+Add setup to generate line trails for them.

I'd like to randomise the trail length of the particles, one way I thought I could do this is trim them after the generation of the trail, however I was thinking I could do an optimization trick by directly defining the random trail length in the trail node, by putting a random function using @id in the Trail Length input field:

pow(rand(@id),2)*20

However,when I do that, I get the error:
Local variable 'id' not found.

So maybe its not possible to have this sort of functionality at the trail node step of my node graph and instead just generate extra long trails and randomly trim them after?
User Avatar
Member
19 posts
Joined: 7月 2018
Offline
I think you can try generate the same trail length for each point and then using the @curveu and @id to blast part of some the trails to make them shorter.
User Avatar
Member
339 posts
Joined: 12月 2014
Offline
Here's one way to do it

Attachments:
rand_trail_length.hiplc (320.5 KB)

  • Quick Links