4

I'm using a Spotlight on one of my scenes, first I planned to make the effect of the lightrays on other editing software, but maybe it's possible on Blender. It is possible to make a spotlight look like the image below? (also, I'm using cycles)

Thanks in regard! :)

enter image description here

beavoru
  • 5,357
  • 23
  • 65
  • 109

1 Answers1

6

Yes, this is now very easy to do efficiently. Add a spot lamp where you want it, and then add a cube and edit to just barely contain the spot lamp:

SpotLamp1

Make the material of the cube as shown. Note that the Transparent shader is not necessary, and you can leave the Surface input blank. However you can have a surface material and a volume material at the same time.

Nodes

Then add a plane as the ground and render:

Render

Since the volume is so small to render, it renders very quickly, this test render took about 3.5 seconds.

If you want to move your spot lamp, just parent the mesh to it with CtrlP > Object.

J Sargent
  • 19,269
  • 9
  • 79
  • 131
  • 1
    no need of transparent BSDF. – Bithur Feb 09 '15 at 17:55
  • 1
    Not necessary for functionality, but I still use it. It makes it clearer what is happening. – J Sargent Feb 09 '15 at 17:56
  • No need AND no side effect? (slower render or anything bad) I agree that getting things clearer can be useful. – Bithur Feb 09 '15 at 17:58
  • On that I am not certain, I have noticed no major differences. That is a good question for a dev. – J Sargent Feb 09 '15 at 17:59
  • 1
    BTW, volume shaders tends to be better with more render samples, less noisy. The screenshot is very noisy because of a very low (and fast, good for testing) render/preview samples. For this you won't need many volume bounces anyway (0 should do). – Bithur Feb 09 '15 at 18:15
  • I thought that was obvious enough for people :/ – J Sargent Feb 09 '15 at 18:33
  • 1
    Maybe not for true novices (not in diguise :) ) – Bithur Feb 09 '15 at 18:35
  • It did worked! thanks a lot! Now...i want to know something...if i want to add an image texture to it, like a rainbow for example, where on the nodes should i have to add it? – beavoru Feb 09 '15 at 18:49
  • For the volume color? You could try light falloff node and color ramp node. – J Sargent Feb 09 '15 at 19:03