Let’s continue the maker scene look nicer. First of all, I delete this Point Light we added for demonstration. Our next topic is the specular highlights or the reflection of the light sources on the object surfaces. Unlike the diffuse lighting specular cannot be simulated using Lightmaps or CompleteMaps, because it’s dependent on the current camera position as well.
So we have to use realtime light sources to produce the effect. In this scene, it’s enough to use a single light placed at the center to have the highlights on the couch and maybe on the glass surfaces. Let’s add a simple Point Light and connect it to the root of the studio model. We try to find some satisfying position for it. For example like this. I zero out the by-distance attenuation of the light to have the effect evenly on every surface.
We can see that the highlights appeared on the couch and the glass panels, but at the same time, the entire scene has been lid up, thus ruining the original lightings we achieved with the CompleteMaps. We solve this simply by setting up the light to only emanate Specular effect. It’s very easy to do in Aximmetry: we simply zero out Diffuse intensity. We also decrease Specular intensity a bit to have the highlights softer. Now we have a decent glimmering on the couch and the glass panels.
It’s worth mentioning here that we can achieve local lighting only affecting a single object or a group of objects. For example, let’s select the back of the couch. If we connect the light source directly to its Scene Node then the light only affects the objects that are in the downwards hierarchy of this node, in this case only the back. If we want the effect on a group of objects, then we have to collect the desired objects under an intermediate Scene Node and connect the light into that node. Now we set aside this, we are good with the global light effect, so I undo back to the previous state.
Hereinafter we will add various effects to the scene and we’ll often move between the model and the Render compound. This walking in and out could be rather tiresome after a while. So I can show you a more convenient navigation method. Using the Shift + number key combination we can define bookmarks in the Flow Editor. For example, now we’ll mark our Render compound as location number 1. We press Shift+1. In the Navigate menu, we can see a new item, a bookmark named Render_General, indicating that this menu item takes us to the Render_General compound. Now we go over to the model compound and press Shift+2. This location also appears in the menu. From now on we can easily switch between the two locations either by using the menu or pressing the Ctrl+1,2 combinations. Ctrl+0 takes us to the root compound by default, but it also can be redefined. So from now on, I’ll use Ctrl+1 and Ctrl+2 to switch between the two important compounds.
I want to talk briefly about Ambient Occlusion. If we plan to apply additional realtime lights, sometimes we get more pleasing results if we use Ambient Occlusion as well. One way to produce it is that we generate Ambient Occlusion Maps beside the Lightmaps or CompleteMaps in 3D Studio Max. In the “Choose Bake Elements” dialog we can add an “Ambient Occlusion” element. Depending on the renderer plugins installed for Max we can see several different Ambient Occlusion generator elements here. So we can add one of them, set up the size, file type, etc. and Max will generate it simultaneously with the CompleteMap.
In order to use Ambient Occlusion maps in Aximmetry, we have to choose the right type of shaders. Let’s see a shader here. Its type is Flat_Compl which only supports Color and Complete Map. But we can easily change it to a Flat_Compl_AO shader which supports Ambient Occlusion Map as well.
I don’t want to use it now so let’s restore everything. The other way is applying a realtime post-processing effect to produce Ambient Occlusion. Go over to the Render compound by pressing Ctrl+1. Here we can find a prepared Ambient Occlusion module that is currently turned off. Let’s turn it on. We can see that the effect appears on the output. We can adjust its Radius, Scale, Gamma, and other properties, so we can set it up according to our taste.
Note that it’s an expensive effect, it causes a relatively high GPU load, and not always gives such a refined effect compared to the generated maps. But it has a great advantage: it works with moving objects as well.
In this tutorial I won’t use Ambient Occlusion, I only wanted to briefly demonstrate it, so let’s turn it off.