Mental Ray: Glow and Glare
Please note that this tutorial is outdated and only meant for Max 9. If you want to view the new version for Max 2009, please visit my New Glow Tutorial.
In this tutorial we will be creating a material which will glow and actually cast light and illuminate the scene. The .gif at the bottom of this page shows the end result.
The first thing we need to do is to unhide a certain property in the Lume shader, which is hidden by default. You will need to travel to your Max root folder and navigate to 3ds Max 9\mentalray\shaders_standard\include and open the lume.mi file in a text editor such as notepad. You will need to remove the "hidden" under the gui_glare section, which is near the top of the document. Just select the "hidden" and delete it. *WARNING* You must edit this file at your own risk. Make a backup copy before you edit this in case there is a problem.
Alright, now with that out of the way let's open up Max. If you had it open while you did the last step, you will need to restart it. The first thing to do is make an object, and a simple environment to receive light. You can make whatever you want for this part, just have fun with it.
You will need to switch your renderer to Mental Ray for this exercise. Once you have done that, open up the Material Editor. Select any empty Standard material and switch it to Mental Ray. If you are still in the Scanline Renderer you will not see this option.
Under Basic Shaders add a Glow (lume) shader in the Surface slot.
You can use the "Glow" setting now to choose the color of your glow. You will notice that no matter what shade you choose your color will be completely bright and illuminated. This is because the object will be casting light, so it cannot receive shadows or shading at all.
Apply your new material to your object in the scene and render. You will notice that the objects are completely un-shaded, the same as in the material slot.
Your objects are actually glowing now, but you cannot see them illuminating the scene unless you enable Final Gather. Open the Render Scene dialog and click on the Indirect Illumination tab. Check the box to enable Final Gather.
If you render again, you will now be able to see the glow. This is a great way to get your objects to illuminate an environment, and this is where you have a huge advantage over the Lens Effect glow, which is not able to achieve this effect.
While you have the Render Scene dialog open, click on the renderer tab and scroll down to the Camera Shaders section. Click on the Output box and add a Glare (lume) shader. This would not have been available to you if we had not done the first step in this tutorial of un-hiding it.
If you render your scene now here is what should happen. The Final Gather will run first, illuminating the scene. Then the image will render with your objects purely illuminated. Once the render is done the Glare effect will be applied to the frame, which should happen very quickly. We have now achieved the effect we sought in this tutorial! However, this glare is not very useful in it's current state. Drag your Glare (lume) shader into your Material Browser and choose "Instance" when prompted. This will ensure that changes we make will be applied automatically.
Now comes my favorite part of the tutorial, where I tell you to experiment. For this screenshot I have my Quality set to 3 and Spread set to 2. I would suggest saving at this point, as I have been able to crash the program by experimenting with some of the settings here.
If you go back to your material slots, pay attention to the settings Surface Material and Diffuse. These will allow you to adjust the color and intensity of your glow. The image below will show you the basic functions of these two settings. The best way to achieve the look you want is to simply practice and test out the controls.
That concludes this tutorial. Hopefully you will be able to make good use of this technique to get some of your own good results. If you find out anything cool or notice anything that was missing in this tutorial please let me know.





