7
$\begingroup$

I tried to reproduce the results from the Docs on volumetric lighting unfortunately the video link is broken. And I might have overlooked some related settings.

The spot light is barley visible on the ground.

enter image description here

Increasing the Density of the Volume Scatter Node darkens the sky texture but leads to some light cone from the car's headlight. (only 10 samples in preview).

enter image description here

Which settings do I need to change or should I try a different approach?

Integrator settings are default and spotlight settings were copied from the example found in the docs.

Related:

$\endgroup$
2
  • $\begingroup$ Related: blender.stackexchange.com/q/13802/599. I wouldn't use environment volumetrics. And if you are aiming for a non-photo realistic type result, I wouldn't use scattering either, maybe emission mixed with transparent based on camera ray instead. $\endgroup$
    – gandalf3
    Commented Oct 9, 2014 at 17:46
  • $\begingroup$ @gandalf3 thanks, I will either try the layer method (as suggested by cegaton) or (depending on render time) the fake cones with emitting transparent material as you suggested. $\endgroup$
    – stacker
    Commented Oct 9, 2014 at 19:41

3 Answers 3

13
$\begingroup$

In real life these effects are caused by particles in the air such as water droplets, which reflect and scatter light. Usually these effects are only clearly visible when there is not a lot of other light sources, such as at night.

In your case it looks like you are going for a more non-photorealistic look, so you may want to give up on trying to simulate the scattering and just use an emission shader.

  1. Add some cones to act as the light sources.
    Note that they shouldn't intersect or contain non-manifold goemtry. If you want to intersect them, use a boolean modifier or a remesh modifier to make the final geometry intersection free.

    enter image description here

  2. Add some nodes with a horizontal gradient to fade the intensity of the emitted light out before the hard edge at the end of the cone. Note that this particular mapping setup assumes that the origin of the cone is at the point, and that the rotation is not applied.

    enter image description here

    In this example I also made it so the cone material doesn't illuminate other objects, as I wanted to do the illumination only with spot lamps to further reduce noise. The last mix shader is optional.

There are some limitations, for instance there are no volumetric shadows. But not too bad for converging in about 20 samples :)

enter image description here

$\endgroup$
5
  • $\begingroup$ I tried to use your nodes, but the result is bad: s04.radikal.ru/i177/1506/7c/a07260e49a61.png. Can you help me? What I'm doing wrong? $\endgroup$
    – Juliya
    Commented Jun 13, 2015 at 15:15
  • $\begingroup$ @Juliya That's because this is a completely faked method, which will only really work in this particular case (npr car headlights or similar). To get more complicated things like volumetric shadows you'll have to do it properly. See blender.stackexchange.com/q/8001/599 and blender.stackexchange.com/q/13802/599 $\endgroup$
    – gandalf3
    Commented Jun 13, 2015 at 19:01
  • $\begingroup$ @gandalf3 why not let the cone scatter and absorb, and light it externally with a spot? It might take longer, but it'll also do a better job approximating real atmospheric volumetrics. $\endgroup$
    – PythonNut
    Commented Jul 1, 2015 at 22:23
  • $\begingroup$ @PythonNut It would, but as you said it would take (rather a lot) longer. For this rather stylized look it seems a little overkill (but that's up to the OP) $\endgroup$
    – gandalf3
    Commented Jul 1, 2015 at 23:23
  • $\begingroup$ This is one of the few lighting based solutions I've seen that seem to actually clean up a render. $\endgroup$
    – Kirbinator
    Commented Dec 6, 2015 at 1:32
2
$\begingroup$

Seeing a cone of light requires a bit of playing around with a couple of variables. Once you add volume scattering in your world, the lights in the scene get dimmer, as they have to travel through the "foggy atmosphere". You'll have to increase the values for the lights quite a lot. The brightness will then depend on the density of the volume scattering, the intensity of the light, and the distance of the objects to the camera.

One thing to remember is that the lights will be more noticeable against a dark background.

For a cleaner render increase the number of samples for volume (set by default to 0) in the light paths tab, and increase also the number of overall samples for the render (and expect much, much longer rendering times)

enter image description here

EDIT: Just to illustrate how changing the camera distance affects things.

Once the camera was moved further away, I had to change the density to a lower value and increase the value in the lamp's brightness to keep things visible.

enter image description here

$\endgroup$
2
  • $\begingroup$ thanks, this produces nice cones, but I'm after some global illumination, does this mean that volumetric light only works in the dark? $\endgroup$
    – stacker
    Commented Oct 9, 2014 at 16:41
  • $\begingroup$ It's tricky. Volumetric lights are best seen against a dark backdrop. The biggest issue is that all lights in the scene start to show when there is volume scattering, so a point light or area used for global illumination will also scatter and lower the overall contrast. It might be better to combine volumetrics with other layers that don't use atmospheric effects. $\endgroup$
    – user1853
    Commented Oct 9, 2014 at 16:56
2
$\begingroup$

Even though this question was asked some time ago, I feel like I need to share a way I have found that simplifies this process a ton and gets the effect I feel you want.

I first created a spot lamp (in place of your headlights) and created a cube (but you can use any solid mesh). I scaled the cube way up so that it covered up most of the spot lamp. Then I scaled the top and bottom so that it fit the cone of light better. spot lamp with cube

Then I created a new 'page' and made it a node editor. I then gave the cube a new material and clicked the "use nodes" button. node editor open next to the 3d viewport

Next I deleted the Diffuse Shader so that just the Material Output node remained. diffuse shader deleted from nodes

Finally, you add a Volume Scatter node by pressing Shift+A and searching for "volume scatter". Once that is in, connect the Volume output on the Volume Scatter node to the Volume input on the Material Output node. searching for the volume scatter node volume output on volume scatter node is connected to volume input on material output node

And you're done! You can play with the density to your liking. I usually bring it down from 1 to .3 or lower.

This is a pretty big setup so I brought the brightness of the spot lamp to 200. Unless your cars are absolutely massive, this should be more than enough to give that light cone effect. render with everything I just did The light near the top of the render is the spot lamp.

These are the settings that I would have if I were doing what you are/were doing: density at .08 and shape the cone around where the light actually shines so that you don't get that foggy look. suggested look with density at .08 and the cone fitted around the light

Congrats, you've just created a light cone in Cycles Render!

$\endgroup$
1
  • $\begingroup$ Nice first answer. Welcome to BSE. The only part I would change is where you go into detail about opening the node editor. That screen shot is really not needed. $\endgroup$
    – David
    Commented Aug 30, 2018 at 11:34

You must log in to answer this question.

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