The Elusive God Rays

Crepuscular rays, sunbeams, god rays, whatever you’d like to call them. The look of a beam of light shooting through the clouds to illuminate a subject is something I’ve been asked about before a few times. At first glance you might think a spotlight and maybe some volumetrics would be required to achieve this. Perhaps some procedural gradient textures layered together and mixed with noise on the input vectors. And while these approaches work, there’s no need to overcomplicate things. So let’s dive right in and make some simple god rays.

The best approach I’ve found to adding god rays in Blender comes courtesy of my friend Gabriel Meilikhov. A quick google image search for “god rays black and white” and you’re already mostly done. Choose the type of rays you like. In Blender start by setting the render engine to cycles. You can do this in Eevee, but Cycles will give a better result out of the box. Add a simple plane, import the image texture (Ctrl+T with node wrangler installed). Pass the image through a color ramp to fine tune the handles and put that straight into the alpha socket of the principled BSDF. Set an emission colour, and adjust the strength to your liking. I tend to add a rotation constraint to the plane so that it looks directly at the camera. Then you can place your rays wherever you like. Scale, rotate, warp or otherwise manipulate as desired. Since the plane is an object in the scene you can also take advantage of depth of field in the scene or compositing after the fact to finesse the final result. Have fun with it. I’ve included some images below to summarize the main points. Hopefully these help.

To close off it’s more than worthwhile to check out Gabriel’s YouTube channel (which is under his name). He combines 3D, green screens, and research into wonderfully engaging narratives about science. In addition, if you’re interested in the idea of layering multiple noise textures with mixed emission/alpha channels you might want to check out Gleb Alexandrov’s excellent BCon talk about creating Nebulae in Blender (https://www.youtube.com/watch?v=4w8_SBxCOxo&abchannel=Blender). To date it remains one of my favourite BCon talks of all time.

God rays in action with the simple node setup

A closeup of the node setup and an overlay of the image I found on google

Previous
Previous

CGFigures Presents: Little Boxes

Next
Next

Assets Incoming