PDA

View Full Version : particle twinkle


Bernard397
06-27-2008, 11:08 PM
Hello,



I control the opacity of my particles with the following Runtime expression:

particleShape1.opacityPP=linstep(-1,1,noise(time*5));

Now I want to make an offset for each particle based on partcle ID.

I do this:


particleShape1.opacityPP=linstep(-1,1,noise(time*5)+id);

but that does not seem to work....


thanks,



bern

ctp
06-28-2008, 10:58 AM
you've got your " + id " outside of the noise() and so within the linstep you are getting values way over 1, which are then cut off by the linstep.

By adding the id inside the noise() it will work:

particleShape1.opacityPP=linstep(-1,1,noise(time*5+particleId));


and depending on yor needs, you can add more offset by factoring the id also:

particleShape1.opacityPP=linstep(-1,1,noise(time*5+particleId*10));

Bernard397
06-29-2008, 11:18 AM
Thanks ctp!



bern

CGTalk Moderation
06-29-2008, 11:18 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.