2
$\begingroup$

I am setting up lighting for a scene and I want one light to have a god ray effect, however, when I use the volume scatter on the scene it works for ALL lights. How do I isolate a spot light source for this effect or if there is any other way please let me know. Thanks.

$\endgroup$
4
  • 2
    $\begingroup$ Instead of a volume scatter for the scene you can use an object with a volume scatter material around your light. $\endgroup$ Mar 12, 2021 at 7:08
  • $\begingroup$ @AllenSimpson I agree with you. $\endgroup$ Mar 12, 2021 at 7:09
  • $\begingroup$ @AllenSimpson Could you explain more? I have the same question and I want god rays for the window only. I'm using eevee. Should I assing volume scatter to the material of the window? What could be the node setup? $\endgroup$ Mar 12, 2021 at 9:21
  • 1
    $\begingroup$ @user2824371 I have an example in a scene at home, I can share later. This was the last thing I typed before I passed out in bed x) $\endgroup$ Mar 12, 2021 at 15:02

2 Answers 2

1
$\begingroup$

For this answer my scene is just 3 Spot Lights pointing down at a plane with a Strength of 200w.

enter image description here

If you're not using world lighting, this could be as simple as a primitive cube bounding box around the light in question with a Principled Volume node.

enter image description here

You might already see the problem in this image, but introducing any world lighting makes it much more apparent.

enter image description here

Which is that any lighting will be reflected towards the camera at a certain rate by the volume.

The core idea is sound for Cycles, since we can just use a different shape for a volume object. Unfortunately, in Eevee every volume is rendered as a cube bounding box around the object. I think it would be applicable in Eevee, but it may take some additional work. I'm not that familiar with it to be honest, so someone else may have a better answer.

I will continue for the sake of a complete Cycles solution. If we replace the cube with a cylinder we can move and scale the top and bottom faces such that they envelop the effective area of the light.

enter image description here

enter image description here

You'll have to do a little adjustment to the bounding box and see how it looks. Generally the lower your density is the harder it will be to detect any cutoffs, but that depends on what you need.

To make this animation-friendly you can make the light the parent of the volume object, and any transformations you make to the light will carry over to the child.

enter image description here

enter image description here

So hopefully that gets you started. :)

enter image description here

$\endgroup$
2
$\begingroup$

In the View Layer Properties just enable in the Light Settings In

EEVEE: Light > Volume > check Light. Cycles: Light > Volume > check Indirect.

Now when you click Render you will have a combined Pass and a Light Pass/Indirect Light Pass. It looks black and white because the volumetric light is isolated.

That Means you now have to disable all lights except the light used for the godray effect.

Then you can use the rendered Light Pass (with the isolated Direct Light from the godray) to mix it in the Compositor with the rendered scene (without any Volumetrics and all lights enabled excepts for the Godray Light).

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .