In this videotutorial, created with the 2019 version of Substance Painter but also valid with other versions, previous or later ones, we will examine the Light generator, with a practical example.


I will therefore give for well-known some topics such as Generators and Map Baking; these are topics I covered in the previously published videotutorials (all listed, in order, in the "Substance Painter" Playlist).

The Light generator allows you to create a layer mask by simulating the projection of some light rays from a point of the virtual universe towards the objects that are in the scene (such as a Sun inserted in the virtual universe), so it can be used to generate "Directional" masks; i.e.: white in the points hit from the front by the rays and gradually darker --- but be careful not to be fooled by the name of the generator ("Light"): these rays only serve to generate the layer mask and have no effect on the color of the objects or the lighting of the scene; these are completely different effects!

I will show you immediately the basic aspect of a mask generated with Light, with a practical example.

I inserted an object (a "TORO", traditional Japanese lantern) and I provided it with a "Concrete Plain Brushed" material.

20210317 SP Il generatore Light per maschere direzionali 01

Now I add an "Iceland Snow" material to the top of the stack of material layers; the idea is to add the "snow" material only to some parts of the object (those most exposed to a snowfall), but obviously at this moment the new material completely covers the first; we therefore need a mask.

20210317 SP Il generatore Light per maschere direzionali 02

I then add a black layer mask to the "Snow" material, then right click on the mask and add a Light generator.

20210317 SP Il generatore Light per maschere direzionali 03

There is something wrong: the generated mask is completely white and the new material covers the one below; at a glance, we notice that a couple of maps are missing (in the Properties tab of the generator),

20210317 SP Il generatore Light per maschere direzionali 04

so I click on "Bake Mesh Maps" in "Texture Set Settings" and have Substance create at least the two maps that interest us ("World space normal" and "Position", in this case).

20210317 SP Il generatore Light per maschere direzionali 05

"World space normal" collects information on the orientation of the various faces of the object in the virtual universe, while "Position" collects information on their coordinates (height, in particular).

These two maps are used by the "Light" generator to determine to what extent the faces of the object will be affected based on their orientation in the scene and their height; as regards the orientation, in fact, we can vary the direction of the "light rays" of Light with "Horizontal Angle" and "Vertical Angle", in the Properties tab of the generator; on the other hand, the information on the coordinates (which are stored in the "Position" map) are useful to modify the "Light Attenuation" parameter, so we can decide whether to affect the lower parts of the geometry to a lesser extent.

20210317 SP Il generatore Light per maschere direzionali 06

Although the effect of the generator on the mask (and, therefore, on the application of the material) is clearly visible in Material mode in the 3D view (especially if you activate and deactivate the "Iceland Snow" material, to notice the differences), I'm switching to the "Mask" mode (after selecting the layer mask) because, in my opinion, it allows you to better understand where and with what intensity the "light rays" of the Light generator hit, by modifying the two parameters relating to the inclination and the light attenuation factor.

20210317 SP Il generatore Light per maschere direzionali 07

With the Mask display mode it is also possible to directly observe the effect of two parameters, "Highlight Glossiness" and "Highlight Level", which allow us to amplify or attenuate the intensity of the lighting (and, therefore, the gray levels of the mask generated, which in turn translate into more or less marked applications of the associated material), even on the faces not directly affected by the light rays.

20210317 SP Il generatore Light per maschere direzionali 08

The Light generator therefore has few parameters, but which allow a fair degree of flexibility in the application of the effect. I therefore invite you to think of other possible examples of use of this generator.

Unfortunately, not all that glitters is gold: the Light generator does not take into account any occlusions of the object itself, so we notice that the surface inside the lantern is also influenced by its rays: Light, in fact, is based on the orientation of the faces of the geometry ... and those inside the lantern are still oriented upwards.

To manually exclude those faces we can proceed in various ways; one of these consists, for example, in including the "snow" material in a group, initially providing a white layer mask to the group, and then manually excluding the areas that do not interest us, for example with a brush or a polygonal selection tool ("UV Chunk Fill", in my case, obviously set to 0, to make the "UV islands" of the mask on which I click black).

20210317 SP Il generatore Light per maschere direzionali 09

Finally, as with any other generator, it is possible to supply filters and other effects to Light; for example, we can add a Blur filter to blur the edges of the mask and make the border areas less sharp if we see fit.

20210317 SP Il generatore Light per maschere direzionali 10

Well, that's all for this tutorial! As always, I invite you to express doubts, questions or requests in the comments on the video, on Youtube!

See you soon!