I was working on a something and I thought, wouldn't sunbeams look great with this.
So I searched in google and everywhere but didn't find any answer. So my question is how to make sunbeams in blender?

You probably meant God rays, and googleing that would be a good idea.

In Blender Internal:

Step 1: Add a spot light (Shift-A>Lamp>Spot)

Step 2: Check Halo

Intensity will effect how strong your God Rays are, step will remove any banding, you will what to set the step to at least 8, otherwise this effect will not work properly. image 1

Step 3: As you may have noticed, you have one solid ray, which doesn't look very nice. to fix this, you will need to make a stencil for the light. To do this, add a plane. Subdivide it(W>Subdivide>F6) It the menu that pops up set the cuts to five. hit (Shift-R)

Step 3.5: We will now cut holes in our stencil.

Hit C to activate brush select. select a random pattern on your plane as such:

Pattern

Hit X. Your stencil now has holes in it.

Step 4:

Move the stencil close to the top of the stop light's cone as such:

Cone

Your God Rays are now ready to Render.

In Cycles:

Complete Steps 1, 3, 3.5, and 4 form the previous section.

Step 1: Make sure you are using a very recent build of blender 2.71+

Step 2: Make sure CPU rendering is enabled(GPU support coming soon-ish).

enter image description here

If you don't see this drop down, then it is set to CPU

UPDATE: GPU rendering is now supported (starting with version 2.72) using GPU on Nvidia/Cuda cards, but there are some issues rendering on AMD/Radeon GPUs

Step 3: Go into the world tab of the properties panel. Under volume set the material to Volume Scatter. (You can also add a cube around the spot lamp, and set its volume material to Volume Scatter, it will save a lot of rendering time.)

Also check Homogeneous Volume* if you want less slow render times.

Settings

Usually the default value of 1 for density is way to high, so start with a smaller value and find what works for your needs.

Keep in mind that the intensity of the lights in the scene will be affected by the scattering, they might not seem as bright as you expect them, so be ready to set the light intensity to a much larger value than you normally would.

Step 4: Put your samples up really high, (approx 150)

Hit Render... Wait... Wait... Wait... Tada! you have God Rays in Cycles.

*Homogeneous Volume means that you have applied no textures to your world volume, if you do, something will break.

Edit

Note, that in cycles, mesh lights work as well as a spot light. with mesh lights, you can also add a texture to the emission value.

  • Hi does it work with sun type light or others ? – Sébastien Garcia-Roméo Feb 15 '17 at 20:23
  • 1
    @SébastienGarcia-Roméo The steps for cycles can work with other light types (for best effect you should still have only a beam or shaft of light, otherwise the effect won't be very visible. As far as the blender internal steps, nope, you have to use a spot lamp. – GiantCowFilms Feb 15 '17 at 20:24

An alternative method is to use the sunbeams filter in the compositor. This will work in cycles as well as internal. Find it under "Filter" in the "Add" menu in the compositor. Here's a very low sampled render but you get the idea. The only light source is a sun lamp.

sunbeams_filter

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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