PDA

View Full Version : particle emittion based on light


buran13
01-03-2006, 02:25 PM
Hey guys,

Is there a way to emit particles from a surface where a light hits?

A simple example is if I have a plane and a spot light. I want the particles to emit from the area where the light hits but I really need it to be gradual. So at the hotspot I want the particles to emit more that at the darker areas.

Thanks. :)

RoundRobbin
01-03-2006, 07:29 PM
if you could find a way to make the hotspot of the light a texture on a material, than you could get what you want. But both is had to do

Aneks
01-04-2006, 06:01 AM
you could proabably do this two ways. Dynamic (meaning will update with light animation) and non-dynamic (won't)

Dynamic : use the surface luminance node to query light/luminance values on a surface and then use this to drive the 'emit' attribute of a particle object or 'rate' function of a surface emitter based on a smoothstep fuction or a conditional statement. (will probably be slow to calculate )

Non-Dynamic: animate the light over the surface with a black shader and bake this texture per-frame or render from an orthographic viewport. Then use the resulting texture to 'emit from texture" or control emitter rate. (easy and quite a bit faster)

skullofbone
01-08-2006, 04:38 AM
would like to know how you end up doing this, sounds cool

Possibly with the light position animated, constrain the particles to the movement of the light.
Since the size of the light is always the same, just adjust the various Attributes for the emiter/particles to make them appear how you'd like.

Lol, that sounds soooo generic.

sunit
01-08-2006, 03:32 PM
Dynamic : use the surface luminance node to query light/luminance values on a surface and then use this to drive the 'emit' attribute of a particle object or 'rate' function of a surface emitter based on a smoothstep fuction or a conditional statement. (will probably be slow to calculate )

i'm pretty sure surface luminance is a render time calculation. i don't know if there's any way to leverage the opengl lighting info to emit particles. lightmaps are a way i've used before, but it does require a two step process.

cheers,
-sunit

Aneks
01-09-2006, 02:59 AM
Hey Sunit,

long time no see. Yes he is right. when I suggested the first answer I didn't test it. Surface lumiance will not update in the main app and cannot be queried in an expression. My bad !

Use the non dynamic option or fak eyour illumination and use emit form texture !

pixel mixer
01-09-2006, 05:05 AM
www.kolektiv.com makes stroika, and it has a shading field node that does what you need and even more.

CGTalk Moderation
01-09-2006, 05:05 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.