| |
XTRA! |
|
Radiance Effect with Gradients | ||
| BY GERARDO ESTRADA |
|
Overview - Modeling - Surfacing & Texturing - Gradients - Download Objects & Scenes |
|
Basic Surfacing & Texturing We'll adjust our surfaces in a basic style. Let's begin with the exterior. We could map an HDRI; however, we'll just use a flat white color. This is because we want a bright image in the living room (where radiant values are very much lower than the exterior). Then, in order to achieve a bright indoors, we must open our diaphragm, which will make the outdoors totally white. This is what would happen if we used a real camera-and, in fact, it also happens to our eyes. You can make a test in a room with big windows on a sunny day. Close your eyes for 5 minutes and then open them quickly; you'll notice how the exterior of the window is totally white for a few seconds. The difference is that our brain tries to equilibrate and achieve a balance between the radiant values inside and outside, which a camera doesn't attempt. So we adjust the luminosity to 1000% and remove the occlusion shader (figure 1). Note: We could use 100% but we use 1000% because later, in post, we can take advantage of FPS (Floating Point Space), adding glow or bloom effects in a way nearer to real light ranges.
For the floor, I chose a wooden texture (figure 2), modified in Photoshop so that it looks like pine (figure 3). Figure 4 shows it mapped in the color channel at 75% and in the bump channel with inverted amplitude.
The idea is that it seems like a pine floor with polyurethane surfacing. In general, the wood presents diffuse reflections, something that we can get by activating reflection blurring, but this option greatly increases render times. We might also use the Carpaint plugin or, if we can afford it, tools like Hypersmooth. However, we can sometimes simulate it, to a certain degree, in a cheaper and faster way. This effect is presented when the surfaces have micro-reliefs; we will try to simulate this with a micro procedural texture in the bump channel (Crumple to 1mm will be enough), let's say at 50%. To reinforce the effect, we add this same texture in the reflection channel (figure 5).
Tip: If our reflections present flickering problems in animation, to avoid it easily just use this texture in the reflection channel. However, this still doesn't achieve very realistic soft reflections, since in reality the softness increases according to the reflection falloff; this means that the reflection will be sharper near the reflected object and softer the farther off it is. To simulate this, we add an incidence angle gradient above the crumple texture, and we change its blending mode to Alpha (85% will be good). This gradient has two purposes:
Note: Since the fresnel effect never is linear in reality, don't use a linear gradient. I'll use linear gradients in this tutorial only for explanatory purposes. We can also copy this gradient in the bump channel, but we must maintain the wood bump texture above these layers (figure 6).
For a much softer reflection, we can add the "Soften Reflections" Image Filter, something that hasn't been necessary in this case. For more information about this soft reflections trick, check this link: http://www.spinquad.com/forums/showthread.php?t=7003. Figure 7 shows reflection blurring in LightWave, but Figure 8 uses the soft reflection trick, which is commonly eight times faster.
Our floor now looks like Figure 9. Additionally, we reduced the rays number of the SG_AmbOcc_Exp shader from 24 to 18, and we increased the luminosity and color saturation (since the wood is yellow reflective). We also decreased Shift at 0.1 (the smallest value increases the effect's strength) (figure 10).
Let's continue with the walls, simply white color and 100% diffuse (figure 11).
We copy this same surface in the ceiling, platform, and shelves. For these last two, we reduce the number of rays of SG_AmbOcc_Exp to 18 (since the area of these surfaces is much smaller than the walls and roof) (figure 12).
For wallwood I've used the map in Figure 13 at 70% on a very dark brown color. Since the wood veins are horizontal in this image and we need them to be vertical, we rotate the map 90° in Pitch. We use the same map in Additive Mode in the diffuse channel and in the bump channel at 75%. Also, you can clone this image (Image Editor), desaturate it, and adjust brightness and contrast independently for each channel (figure 14).
We also reduce the number of rays in SG_AmbOcc_Exp to 18, use a warmer color, and (seeing that the surface is darker) diminish Shift at 0 (figures 15 and 16). For the table we'll leave the gray color by default and increase diffuse at 120%. Since the table is very near the carpet (red), we increase the occlusion shader strength a little (figures 17 and 18).
For the lamp we also leave the gray color by default and diminish diffuse at 10%. In the reflection channel we add an incidence angle gradient and 5% in the basic reflection parameter. We remove SG_AmbOcc_Exp from this surface (it is very reflective and the difference is almost imperceptible) (figure 19).
We also remove SG_AmbOcc_Exp from the cable and diminish its diffuse at 15%, adding something of specularity (figure 20). Notice that the lamp surface is the same as the TV screen (figure 21).
We continue with wood_accesories-this surface is for radiators and the wall clock. The surface is very similar to floor, but simpler. We use the same pine texture (cubic projection), and an incidence angle gradient at 15% in the reflection channel (figures 22 and 23).
We reduce to 15 the number of rays of the occlusion shader and Shift at 0.2 (since these objects are in positions where the light is more tenuous) (figure 24). We copy this surface in frames_window and diminish the number of rays from the occlusion shader to 18 and Shift at 0 because the windows are at back lighting (figure 25).
We use two different surfaces because lighting conditions in these cases are also different, and we'll have to apply different gradients that simulate the bounce light effect. We were able to use a single surface and isolate its properties with weight maps, which would force us to use LW gradients; however, in this case, SG_AmbOcc_Exp offers a more natural shade with FI'sLocalAmbient (figure 26). For the stereo we choose a brown color base with very low diffuse (the idea is that it's almost black); to give it a more interesting texture, we use the same texture map as wallwood in the color channel at 70% (cubic projection) (figure 27). In this case we diminish the number of rays to 12, Shift at 0 (figures 28 and 29). For chrome we diminish diffuse at 46%, reflection at 75%, and an incidence angle gradient at 100% (figures 30-32). However, notice that this area is very bright (figure 33). To diminish its brightness without affecting the rest, we go to the SG_AmbOcc_Exp shader and check the reflection channel (also diminish the number of rays to 12) (figures 34 and 35). Tip: To add an occlusion pass/map in the reflection channel works very well when we use spherical reflection maps captured from the same scene to speed up the render, achieving more realistic reflections without having to activate raytrace reflections. For ornament1, we use the gray color by default, set 25% reflection, and add another incidence angle gradient (additive) at 150%, as well as a fractal noise in the bump chanel to achieve more variations in reflections (figures 36 and 37). We then remove the occlusion shader for this surface (figure 38). For ornament2 we add a Crumple in diffuse to 63% to achieve a marbled texture (we could also use marble); we also add an incidence angle gradient at 48% (figures 39-41). For ornament3 we diminish the diffuse at 0%, set 22% in reflection, and add (yes, once again) an incidence angle gradient at 200% (additive) (figures 42 and 43). ornament4 is with its values at default. For ornament2, ornament3, and ornament4, we reduce the number of rays in SG_AmbOcc_Exp to 12. tv_frame has a fractal noise in the bump and reflection channels that simulates horizontal grooves of aluminum (although this material is really plastic, it has an aluminum aspect). In reflection, we also add an incidence angle gradient 100% additive (figures 44 and 45). Since the idea is that this material has soft reflections, we'll simulate this loading beachprobe.hdr; the colorations of this HDRI match with our scene. Tip: It isn't unusual to successfully use HDRIs (lightprobes) captured or photographed from different scenes to simulate soft reflections through spherical maps. If we didn't find an HDRI that matched with our scene, we could use Enviro (Worley Laboratories), Refgen (of Ekki Halkka), or JJ_Special_Projection (of Juan José Gonzáles) to capture a cylindrical or spherical projection of our environment and to save it as FLX, HDR, OpenEXR, or any other High Dynamic Range format. We load the HDRI and apply Full Precision Blur Filter (Size: 21) in preprocessing (figure 46). Then in Surface Editor/Environment/Reflection_Options, we choose Spherical Map and adjust Image Seam Angle-in this case, -30 degrees will serve (figure 47). To avoid annoying dots from highlight values in reflections, we can increase the MipMap Strength in the bump channel. If this is not enough, we can limit the dynamic range in post processing (with HDRExposure) or in some compositing program (but add the bloom or glow filter before you correct the exposure). We can also activate Limit Dynamic Range (but consider that we'd lose the dynamic range) so in this case it is advisable to add the glow effect in LCS (Linear Color Space) (figure 48). For ashtray we also remove the occlusion shader, and we set Spherical Map in Reflection Options and choose beach_probe.hdr too (figure 49). We go to the reflection channel and set 10%, then we add an incidence angle gradient at 20% and diminish diffuse at 30% (figures 50 and 51). For speakerwood we use the same map from wallwood at 70% but with more bright brown base color; we copy this texture in Diffuse (additive mode) and the bump channel. Diminish the number of rays in SG_AmbOcc_Exp to 15. For speakerbox we need a metallic surface like tv_frame; in this case, we use the same HDRI of tv_frame (figures 52 and 53) with incidence angle gradient at 38% and a micro-fractal noise texture lengthened in the Y-axis (figures 54 and 55). Then we diminish the number of rays in SG_AmbOcc_Exp to 12 (figures 56 and 57). For books the idea is to use the weight maps as alphas to define the properties of each book and page. Let's begin with the books1 weight map (figure 58). Tip: In order to not have to select positive values and then select negative values in our weight maps, we only select the geometry that we want to isolate with a positive weight map (orange) and in TextureEditor we set the gradient this way (figure 59): parameter -100 = black color What we are telling LW is to only use the positive values of our weight map and not take into account the rest. In the color channel we set our books1 weight map with Blending Mode in Alpha, and under it we choose a color for these books-or if you want, you can choose a texture map instead (figure 60). We do the same thing for each book group (figures 61-74). We use this horizontal lines map for the books' pages, then simulate their thickness (figure 75). We use the color channel because in the bump channel the effect isn't notable at a distance in the way that books are. However, if we wanted to come closer, we could copy the weight map and its map in the diffuse and bump channels. Additionally, we diminish the number of rays to 12 for SG_AmbOcc_Exp (figure 76). For carpet we choose a red color by way of accent in our environment (figure 77). The idea is that it has a velvet surface, for which we add a fractal noise in the bump channel and repeat this same procedural texture in Specularity at 28%. To achieve the velvet effect, several tricks and tools exist to make it with LW's own tools (negative values in Specularity, BRDF, etc.). Also, several plugins like A_Velvet can offer interesting results. In this case I've used HD_Velvet with its values at default. For the ambient occlusion shader, we reduce the number of rays to 18 (figures 78 and 79). Finally, for the sphere (ball surface), we'll use a yellow color and an incidence angle gradient at 15% in the transparency channel and 1.6 for the refraction index. (If you want to use more accurate refraction indexes, you can consult the Refraction Chart Index of your LW manual.) The idea is that it's a translucent and transparent surface, like frosted glass (figures 80 and 81). OK. Once we have set our textures and surfaces in a basic style, we should have something like Figure 82. Now we'll start with some features a little more complex in our surfaces. If our purpose is for the sphere to have a translucent surface, we must simulate some SSS effect. This can be accomplished with some specialized shaders; but this time, I'll show how to make it just with LightWave gradients. In this case, a great quantity of the sunlight that hits the table bounces toward the sphere, penetrating its surface. Since the surface is white, almost all the light will be reflected because the color absorption is almost null. This effect doesn't depend only on the surface color, but on how reflective it is. The light scattering on the sphere surface should be stronger near the light source and attenuate as the photons penetrate the surface and extend inside it. The gradients' potentialities based on the objects' distance will allow us to simulate this effect (figure 83). If you are not too familiar with gradients, please take a look here. After simulating this simple SSS effect with gradients, we obtain something like Figure 84. Notice that the ambient occlusion of the table is too strong for transparency and translucency of the sphere (taking into account the light that passes through it). However, at the time of writing this article, SG_AmbOcc_Exp doesn't have the option to change the color or the intensity of the shader along the surface (as far as I know, Sebastian Goetsch will release this feature soon). To solve this situation, we can use any technique or tools described previously-but even without changing our occlusion shader, we have some solutions. We can bake the shader and use this as an ambient occlusion map, changing the color using alpha maps. Or we can make an ambient occlusion pass, make a shadows maps pass to use them as alpha, and compose everything in post. Both solutions are recommendable if we need to apply this effect of color change to many objects in the scene; but in this case, we only need to change the strength and the ambient occlusion color of a single surface and for one object only, which makes the solutions above too laborious. In cases as simple as this, I propose two ways to solve the problem: We can load an object whatever it is (different from our living-room layers), preferably a plane, and we make it invisible to the camera (dissolve 100%); then we copy the surface table in the surface of this plane and modify the SG_AmbOcc_Exp parameters so that the occlusion strength diminishes and its color is a saturated yellow. Now we have two equal surfaces, but one has the ambient occlusion appropriate for the sphere and the other one has the ambient occlusion appropriate for the rest of the table. To mix the surfaces we use the Surf Mixer shader. We add Surf Mixer to the table, and we choose as the blend surface, the plane surface that we've just loaded. Then we add a Null object and position it under the sphere (or we can use the same sphere as the reference object). In the Surf Mixer shader, we use this reference object in a Distance to Object gradient so that this gradient becomes our mask to indicate to Surf Mixer to mix both surfaces. I thank Hesido (from the CGTalk Forum) for this excellent idea. Regrettably, this solution only works in LightWave v.7. For LightWave v.8 we can apply another simpler but less versatile solution: Use a different surface for that part of the table. We select the table and press F12 (to open Modeler). Go to the first layer of our object (the table) and select the superior face; assign it a different surface that we'll name tabletop (figure 85). Now, don't save the table since from Modeler we would lose the reference of the sphere (or any other reference Null object). Switch to Layout and save our object there; then we can quit Modeler. Tip: Switching from Modeler to Layout and saving the object there is a good way not to lose the references. Another way is to create a point in one of the layers of our object and use it as a reference object, so that Modeler finds this reference object when it looks for it. The problem with this is that we'll have to return to Modeler to create a point every time that we need a reference object and, at least in LightWave v.8, it is advisable to have the reference objects as independent objects. Note: In LightWave versions higher than 8.0, 2 FI'sLocalAmbient works pretty well in Layout, but we obtain this message in Modeler: "Plug-in FI'sLocalAmbient failed to start." There are at least four ways to solve this problem:
Now we copy the table surface in tabletop and modify the occlusion shader, diminishing Shift at 0.5 and using a saturated yellow (figure 86). In this case, using a new surface works well; however, if it weren't this way, we could always use another shader or occlusion technique for these objects. We have now finished with texturing and surfacing, except that the ambient occlusion shader is basically the same thing that we would have had to do to illuminate these objects with any illumination technique. The surfaces have been adjusted in a very basic way, enough so that they look like the materials that supposedly are at the distance that the camera sees them; nevertheless, you should consider whether there are materials or textures that should be detailed more, adding some dirt, stains, powder, etc. Or you may want to use special shaders or adjust its gamma to make them look more real. Before adding the bounce light effect (which was our original purpose), we need to address the stereo's soft reflections and the sphere caustics. For the soft reflections of the stereo, we could use real reflections and reflection blurring; but as we already said, this increases the render times a lot. Nor can we use beach_probe.hdr because we need the reflection of the brightness of the light that enters through the window, just under the stereo. An option is to capture a room spherical map exactly from the stereo's position (with the previously mentioned tools); another option is to use FI'sLocalAmbient gradients (object_coincidence) or take advantage of the specularity. In this case, we will apply this last choice. We add a spotlight at 75% (same color as the sunlight), and we disable Affect Diffuse and Shadows. Then we position it on the floor, where the sun falls, as in Figures 87 and 88. This spotlight is simulating the soft reflections of the light that hits the floor under it; it works in this case like a wide light source. Additionally, we'll simulate the soft reflections of the wall (which, because of being white, reflects in a way similar to a soft light source). Add a distant light (we disable Affect Diffuse and Ray Trace Shadows) and rotate it as in Figure 89. We obtain Figure 90. For the sphere caustics, we can use LightWave caustics since they are relatively fast. However, to make them even quicker, let's simulate them too. In Photoshop (or any other paint software), use the Radial Gradient Tool and paint a pattern like Figure 91. Later, in Layout, add a spotlight and position it as in Figure 92. In the Light Properties Panel, we use a very small Nominal Distance and very high intensity to accentuate the falloff; then load our PS pattern in Projection Image and disable shadows (figures 93-95). |
|
Overview - Modeling - Surfacing & Texturing - Gradients - Download Objects & Scenes |
|
©DMG Publishing 2006-2007 as bonus content from Issue 11 of HDRI 3D, ISSN 1551-689X |