PDA

View Full Version : Need help with interesting particle expression


darkviews
04-17-2008, 04:31 PM
I have done a little bit of research about this issue, and have come up with a few possibilities. I just don't know how I could write it into code. Anyhow here is what I am trying to do.

I am going to have an instanced grid particle system follow a plane with a turbulence field. The instance is going to be roaches, and I want them to be dynamically effected by light. I was thinking that if I hook up a surface luminance node up to a ramp that will in turn effect the speed of the particles I would then get the effect of the particles as if they were scurrying away from the light.

So here is my problem, I know that this has to be possible but there is an expression that I would need to write in order to make it work. So if there is anybody that would like to give it a shot I'm open to all ideas.

Thank you all for your help...

BPorter
04-17-2008, 06:49 PM
If I understand your post correctly, you have instanced particles(roaches) crawling around on a plane. When a light comes near them, they move away from the light. If this is the effect you are going for, then try using goals. You don't need to use a surface luminance node and make it more complicated. You can just change the position of particles based on the position of a light. I'm working on a solution now. I'll post it when I get it.

BPorter
04-17-2008, 07:19 PM
http://hrdcorbassfishin.googlepages.com/roaches.ma

That file sort of does what you want. You could use it as a base template or just go in a completely different direction. I parented a light to newton field with a negative magnitude. The particles have a goal weight of .2 so the move out of the field's way. I did it in 2008 x64, so if you have a different version, just edit the Ascii file. Good Luck!

darkviews
04-21-2008, 04:04 PM
Thx for the help... I'm about to look at it now. If this does work correctly then it should be dynamic... because the light itself will be animated. Anyhow, What you put does make much more sence then what was going through my mind. I'l be posting a reply soon.






Update: The problem is solved... thank you vary much for your help, Now to just write the expression for the light fall-off.

CGTalk Moderation
04-21-2008, 04:04 PM
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.