0
$\begingroup$

This is my setup it is a particle system that emits through a sphere

Basically the sphere has an emission shader that I want to only emit when a particle passes through it. It is supposed to be a muzzle flash from a firearm and right now I have to manually animate it to line up with each particle. So the question is there a way to have each particle effect the emission shader. I was thinking that I could use particle age but I have no way to link it between the two different objects materials. Is there some way to have the particles weight paint the sphere kind of like you can do with two objects? Or should I make the muzzle flash a particle system too? that copies the emission pattern of the bullets.

$\endgroup$
1
$\begingroup$

Using dynamic paint

Result:

enter image description here


How to:

  1. UV unwrap your "receiver" object (I'm using a cylinder)

    enter image description here

  2. On that object, enable (from the Physics panel): Dynamic Paint > Canvas > Add Canvas. Make its type "Image Sequence", and its initial color completely black. Enable "Dissolve" and use a very short time for dissolve, like 5.

  3. Select the Emitter object, enable: Dynamic Paint > Canvas > Add Brush. Make the brush fully white. Change the "Source" to "Particle system" and select the correct particle system. Increase the brush radius.

  4. Go back to the target object, select the correct "UVMap" under "Dynamic Paint Output", and bake the Image Sequence.

  5. Create a material for the target that has an emission shader modulated by the Dynamic Paint paintmap (for the Image Texture, remember to open all the image files together with Ctrl+Shift+Select, and "Detect Sequences" activated):

    enter image description here

$\endgroup$
  • $\begingroup$ Very helpful thank you. However, I have multiple particle systems because this is supposed to be a gun firing and because of how the particles work if I want it to have a 3 round burst at frame 10 then have another 3 round burst at frame 20 I have to have two separate systems that are copies but with different emission start times. Can I select two systems as the same brush? $\endgroup$ – Russty Nov 26 '18 at 18:53
  • $\begingroup$ nevermind I found a workaround thank you for this helpful answer. $\endgroup$ – Russty Nov 26 '18 at 19:00
  • $\begingroup$ glad it helped! anyway you can add several brushes to the same emitter $\endgroup$ – Nicola Sap Nov 26 '18 at 19:56
  • $\begingroup$ Yea my workaround solved that issue entirely I have it contained to one particle system. $\endgroup$ – Russty Nov 26 '18 at 21:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.