A quick and easy way to set up nodal occlusion renders in LW 9.0 and above. For this tutorial I will be using LW 9's inbuilt nodal occlusion shader rather than a third party plugin like SG_AmbOcc (which is also good).
Step 1 In modeller prepare your object. For the purposes of this tutorial the entire object will use a single surface, but multiple surfaces can have different occlusion with different settings if you wish. I have called my surface OCCLUSION and applied it to my object, which is a just a couple of primitives resting on a plane. You can save this separately from any surfaced version you may already have. This is not always necessary, you may choose to apply the occlusion shader in Layout and render it, and then close layout without saving changes so that your model reverts to using it's usual textures. The only downside is that you'll have to set up the occlusion shader again should you want to do another Occ render and you risk hitting save out of habit ;) With the model saved as, for example Object_Occ.lwo, it's time for....
Step 2 Starting with a blank scene, import your Object_Occ and position the camera so you can get a good view of it. It doesn't matter where the light is because we'll be deactivating it later.
Step 3 Open the Surface Editor and find your occlusion surface. The only changes from Lightwave's Default surface that I have made are to make it slightly more diffuse so that the dark areas the occlusion creates aren't quite so dark, and made the surface colour completely white so that the occlusion's contrast is more evident. Neither of these changes is really necessary, but I find it creates nice results. Make sure the little tick box beside the big Edit Nodes button is active, if this box is not checked the nodes will have no effect.
Step 4 Press Edit Nodes and we go into the Node Editor. You will see a large bar called Surface with lots of multicoloured circles on it, this is the surface that you want the nodes to affect and any changes you make will plug directly into it. Press the Add Node button in the top left of the window, and navigate down to Shaders>Diffuse>Occlusion. A new Occlusion node will appear, click on it's green Out icon and drag to the Luminosity channel of the Surface node. This will plug the occlusion node directly into your surface's luminosity meaning that the changes that the occlusion makes will affect how bright your Surface is. For the purpose of this tutorial this works fine, but if you want to include Occlusion into a surface that has other inputs it would be best to plug it into the Diffuse channel for realistic effect.
Note. - Don't be fooled into thinking that Occlusion II is a newer, better version of Occlusion because it isn't, it is in fact a shader for Reflection Occlusion which is something entirely different. Reflection occlusion colours your object on a grey scale depending on how much the surface has to reflect. Ie, if you put a box on a plane and set the plane to recieve reflection occlusion, the reflection of the cube on the plane will appear black while the rest of the plane will appear white. Personally I don't think Reflection Occlusion is something people will use very often and in anything other than compositing. Calling it Occlusion II was just misleading naming practise on Newtek's part.
Step 5 Double click the Occlusion node to bring up it's options. The Samples field determines the quality of your occlusion, the higher the figure the nicer it will look. Also the higher the figure, the longer your renders will take, so it's worth finding a balance between the two that you like. I tend to use between 20 and 30 samples. The Mode menu lets you choose between Infinite and Ranged. Infinite means that any traced ray hitting a polygon on your model will bounce and be calculated for an infinite distance from that bounce before hitting another polygon. Setting it to Ranged allows you to limit the distance that your rays travel and can be used for specific effects or to speed up rendering. I tend to leave it on Infinite. Close the Occlusion settings and the node editor.
Step 6 Select your camera and edit it's properties by hitting [U]p[/U] or the Properties button. My image shows a quick quality setup which suits these renders fine. Personally I would recommend using FPrime for occlusion renders because it's faster than the native Lightwave renderer, and you can save and cancel the render at any time at any quality level that you think is good enough for what you need, rather than only being allowed to save when Lightwave allows you to. If you don't have or don't want Fprime, these settings will do fine.
Step 7 Select your default scene light and bring up it's properties. Turn the Light Intensity to 0%, and the Ambient Intensity to 0% as well. You don't need this light to affect your model since the scene will probably be quite bright anyway. You can of course use it if you want to and it's worth experimenting with, but it's the occlusion that's going to highlight your model's detail rather than the lighting. Similarly for the ambient lighting, you can raise that if you like but it tends to negate the Occlusion's effects to an extent by making the scene brighter universally.
Step 8 Close the light properties and you're ready to render. Unlike radiosity, Occlusion isn't affected by the background colour because it's a shader rather than a lighting effect. This means that it changes the way a surface behaves rather than the way it's lit. You may choose to use different coloured backdrops for additional effect though as the below black and white backdrops demonstrate.
You can save your occlusion surface to a backup if you want to keep and reload it later on by selecting it in the Surface Editor and going to the save button. I've included my saved surface in the attached archive as well as all the scene elements I used. When applied to more complex models the render time will obviously increase but for hard surface work especially Occlusion can be a very effective way of demonstrating the detail that your model has, and allowing people to see your work without complex light setups or large swathes of your scene being obscured by ugly shadowing. One of the great things about nodal occlusion is that you can use it to accentuate your surface rather than override it for more realistic looking results. Just plug the node into the diffuse channel of a normal surface and it'll do it's job in the background. The render times will climb but the overall effect is worth it.
Admin Note: This tutorial was first posted in the forums here.
View Comments (6)