Blender 3D: Noob to Pro/Halo Materials

Introduction edit

Halos are a neat effect. Instead of giving a colour/texture to the faces of a mesh, like normal Surface materials do, the Halo material ignores the faces and renders representations of the vertices instead. This can produce all kinds of ethereal, even ghostly, fantasy effects, of objects that look like they’re made out of light rather than ordinary solid matter.

A halo material can also produce a flare effect. This is the “lens flare” that happens when a physical camera is aimed at a very bright light source; the spillage of light bouncing around inside the optics produces coloured rings and other interesting artifacts on top of the image. This has become such an accepted part of photography that computer graphics programs like Blender, which do not suffer the imperfections of physical lenses, go to a great deal of trouble to offer a realistic flare effect.

Flare effects can also be achieved using compositing node and a material with an "emit" value, such flares may in some circumstances render faster and be simpler to control. This works for the Blender internal render engine, as do flares generated with halos. This is done by opening the node editor (switching the 3d viewer tab to one of these for example) then clicking "compositing nodes" and "use nodes", "filters" can then be added to produce these effects.

This tutorial will show you how to create an image representing a flare effect in a picture of the Sun.

Setting The Scene edit

Open a new default Blender document. Get rid of the default cube. Insert a new UV Sphere mesh in its place, and set the number of segments and rings to 24 each. Also set Smooth shading. This will be your Sun. Create a new material for it, set the Diffuse colour to a suitable yellow. Under the Shading panel in the material settings, look for the “Emit:” slider and give it a value of 1.0 to make it look bright. Since the Sun emits its own light, you don’t need the separate default light, so get rid of that.

Go to the World properties tab  . In the “World” sub-header, click on the colour swatch labelled “Horizon Color” and assign a nice deep blue colour for your sky.

If you do a render now, you should see your bright yellow orb, but without any flare effect.

Adding The Flare edit

Now add a new Circle mesh; the default 32 vertices should be enough. By default it lies in the X-Y plane, which again is fine. Move it along the Y-axis a little closer to the camera (negative-Y direction), until it lies outside your Sun sphere, but still close to it. Scale its size down by 0.5. (It will probably be invisible when first created, because it is initially inside your Sun sphere, but it will be initially selected, so you can immediately press  G   Y  and start moving the mouse without pressing any buttons, and make it appear from inside the Sun). Create a new material for it, and set the type to Halo.

In the Halo panel in the Material settings, increase the size to 3.0—this is the size of the fuzzy image that is rendered around each vertex, and this value is sufficient for them all to run together into a continuous ring. Reduce the Alpha to 0.05 to avoid overpowering the image with the halo effect.

Go further down the halo Material settings, and find the Flare panel (in Blender 2.75 you can check "Flare" but what settings you do, nothing will work). Check the title box to enable this. Set the number of Subflares to, say, 8 (this controls the number of separate halo reflections that will be generated, though you probably won’t be able to distinguish that many). Set the Boost to 10 to make the subhalos brighter than the original parent halo.

The Seed value in the Flare panel controls the particular flare pattern that you see; each number produces a different effect. I chose the value 3 for this example.

Where did the circle go? Like any object with a halo material, the circle object can be quite hard to see when it’s not selected. If you lose track of it, there are a couple of ways to find it again:

  • Select everything with  A . Now you can look for the ring of dots and  RMB  on it to select it exclusively.
  • Use the outliner window at the upper right. You should see it listed here under its default name of “Circle”; click with  LMB  to select it, and you should see the ring of dots appear in the 3D view.

If the circle object is still inside the Sun, then wireframe  Z  or bounding-box view modes may be helpful to find it again.

The Final Result edit

Now hit  F12  to render, and you should see something like this (the flare effect may not appear immediately with the rest of the image, give it a few more seconds to appear):


Exercises: Try different positions for the circle mesh; move it near to the Sun (even partly in it), far from it, move it around to different sides. How does this affect the flare pattern? Also try changing the size of the circle mesh.