Tutorial-LumeLandscape

The LumeLandscape set is made up of three individual shaders: Landscape, Mist, and Facade. This tutorial will demonstrate the basics of how to use each one.

Part I: Landscape Ho!

Part I of this tutorial will show you two simple examples of how to use the powerful Landscape shader.

Add textures to a mountain

Get the scene. We've created a simple mountain to work with.

Choose Get -> Scene. In the LumeTutorials database, get the scene called "LandscapeScene1."

Preview! Let's see what we've got so far.

Choose Preview -> All. Remember these are mental ray shaders, so make sure that in your Preview -> Setup you've got the preview renderer set to "mental ray."

As you can see we've got a mountain with an overall rock-like color. Now let's add some additional features to it.

Add the snow texture.

Select the mountain. Choose Texture -> 2D Local. In the 2D Texture dialogue box you'll see that we've got a solid brown texture to represent our rock. Now let's get the `snow' texture -

Click the Next button to advance to a new texture. Click on the Select button next to the Picture Filename box; go to the LumeTutorials PICTURES chapter and choose the .pic file called "MtSnow." You'll see that it's a solid white texture. (Usually you'd now want to make sure that your texture is correctly mapped onto your model, but since this is just a solid-color texture we don't have to worry about it here.)

Preview! You can just hit the Preview button from within the 2D Texture dialogue box.

The mountain is completely covered with snow, which is not what we want. Instead, we'll use the Landscape shader to place the snow on the peak.

Add the Landscape shader.

While still in the 2D Texture dialogue box, and with the snow texture showing, go to the lower left side and click on the Shader check box; then go to the LumeTools database, and choose Landscape.

Click the Edit button to go to the Landscape dialogue box. Then in the Height Effect box, click on the Active check box to turn on the effect, and change the Height setting to 20.0. Click OK to go back to the 2D Texture dialogue box.

Go to the Blending, and change it from "Without Mask," to "Alpha Channel Mask."

NOTE: Landscape works by using Softimage's alpha channel blending feature, so you must always use textures that have an alpha channel: it doesn't matter what's in the alpha channel, only that your texture has one.

Preview! Again, to keep it simple, just click the Preview button from within the 2D Texture dialogue box.

Now we've got snow covering our mountain's peak, as we set using the Height effect in Landscape. The bottom edge of the snow is too even, though, and doesn't take into account the shape of the underlying geometry as it would in real life. Let's fix it

Adjust the snow.

Click the Edit button to go back to the Landscape dialogue box. Click on the Active check box in Shape Based Noise, to turn on this noise function. Set it's influence to 0.25, then click OK.

Preview!

That's better notice that it has created a noise effect around the edge of the snow, based on the shape of the mountain. Now let's try adding another texture using a different Landscape effect.

Add the grass texture.

While still in the 2D Texture box, click the Next button to advance to a new texture. Click on the Select button next to the Picture Filename box; go to the LumeTutorials PICTURES chapter and choose the .pic file called "MtGrass." You'll see that it's a solid green texture.

Add the Landscape shader.

Go to the lower left side and click on the Shader check box; then go to the LumeTools database, and choose Landscape.

Click the Edit button to go to the Landscape dialogue box. Next, in the Slope Effect box change the Angle setting to 13.0, and click on the Active check box to turn on the effect. Click OK to go back to the 2D Texture dialogue box.

Go to the Blending, and change it from "Without Mask," to "Alpha Channel Mask."

Preview!

What we've done in this last step is told Landscape to show the grass texture wherever the terrain is close to horizontal just the way grass would really grow. Notice how it follows the contours of the mountain, and how it's placed on the small plateau something that would be prohibitively time-consuming to do without Landscape.

But Landscape, despite it's name, has many uses besides texturing terrain. In the next section we'll use it to map rust to a tin roof...and in doing so will demonstrate the powerful Landscape technique of mixing effects.

Add rust to a corrugated roof

Get the scene. We've created a corrugated tin roof to which we will add rust.

If you've still got the last scene open, choose Delete -> All to start with a clean scene.

Choose Get -> Scene. In the LumeTutorials database, get the scene called "LandscapeScene2."

Preview! Let's see what we've got so far.

Choose Preview -> All. Remember these are mental ray shaders, so make sure that in your Preview -> Setup you've got the preview renderer set to "mental ray."

OK, so we've got a corrugated tin roof. Let's add some rust

Add the rust texture.

With the roof selected, choose Texture -> 2D Local. In the 2D Texture dialogue box you'll see that we've got a light, metallic texture applied to the roof. Now let's get the `rust' texture -

Click the Next button to advance to a new texture. Click on the Select button next to the 2D Texture box (note that we're getting an actual 2D texture file this time, not a .pic file); go to the LumeTutorials database and choose the texture file called "CorrugatedRust." You'll see that it's a reddish rusty texture, mapped to cover the entire roof. Now we'll use Landscape to make the rust appear in the lower areas where water would collect

Add the Landscape shader.

While still in the 2D Texture dialogue box, and with the Rust texture showing, go to the lower left side and click on the Shader check box; then go to the LumeTools database, and choose Landscape.

Click the Edit button to go to the Landscape dialogue box. Next, in the Height Effect box change the Height setting to -0.04, and click on the Active check box to turn on the effect.

In order for us to clearly see how Landscape is mapping our texture, we're going to use the Preview Color option; so in the upper right corner switch the Preview Color to "Yellow." Then click OK to go back to the 2D Texture dialogue box.

Go to the Blending, and make sure it's set to "Alpha Channel Mask."

Preview! Again, to keep it simple, just click the Preview button from within the 2D Texture dialogue box.

The yellow indicates where the rust texture will appear. By assigning different preview colors to your various textures, you can use this feature to help fine-tune Landscape especially useful when you've got a lot of similar textures and complicated blendings. For now we don't really need it, so we'll turn it off in a minute but first notice that the rust is not in the crevices where we want it to be, rather it's bunched up on the higher areas. Let's fix that -

Move the rust to the crevices.

While still in the 2D Texture dialogue box, click the Edit button to go back to Landscape. In the Height Effect box click on the Upside Down check box.

To turn off the preview function, in the Preview Color box set the radio button back to "None." Click OK.

Preview!

By turning on the "Upside Down" function in the Height Effect, we've told Landscape to start filling in our texture from the bottom up.

Now, though the rust is in the crevices, it's placement is far too regular and sharp to look good. Let's start adding some additional effects.

Add positional noise.

While still in the 2D Texture dialogue box, click the Edit button to go back to Landscape. Click the Active check box under Positional Based Noise to turn this function on, then change it's influence to 0.10.

Preview!

Getting better... now we'll add noise that is based on the alpha channel of the rusty texture (the alpha channel in this texture is simply a greyscale of its RGB image).

Add the image effect.

Go back to Landscape. Turn on the Image Effect by clicking on its Active check box, and set its influence to 0.07.

Preview!

Better still; as you can see we've started to get a grainier type of look, similar to the texture of the rust image itself. One last blending setting -

Blur the blending.

Again, go to Landscape. In the upper left corner, set the Blur to 0.09.

Preview!

The blur has softened the blending of the rusty texture, giving a more realistic overall feel.

As you can see, Landscape is an extremely versatile texture tool; be sure to look in the Reference section to learn more about its features.

Part II: Shadows and Fog

Part II of this tutorial will show you how to use the Mist and Facade shaders.

Create a layered fog

Get the scene. We've created an evergreen forest for you to work with.

Choose Get -> Scene. In the LumeTutorials database, get the scene called "LandscapeScene3."

Preview! Let's see what we've got so far.

Choose Preview -> All. Remember these are mental ray shaders, so make sure that in your Preview -> Setup you've got the preview renderer set to "mental ray."

What we have is a hierarchy of simple squares, on which are projection mapped a tree texture. We're going to first use this scene to demonstrate the Mist shader.

Create an even fog.

While in the Matter module, choose Atmosphere -> Depth Fading.

Click on the Depth Fading check box to activate it. Then click on the Shader check box, go to the LumeTools database, and choose Mist.

Click the Edit button to go to the Mist dialogue box. In the Overall box, make sure the Transparency is set to 0.0. Then in the Falloff box, under Realistic, set the Density to 0.25. Click OK, and then click OK again to return to the scene.

Preview!

You should see a nice fog, with a realistic fall-off. But we can do more -

Create a layered fog.

Again choose Atmosphere -> Depth Fading.

Click the Edit button to go to the Mist dialogue box. Click the Active check box under Layering in order to turn on the layering effect; change the Baseline setting to 50.0, and keep the Height at 10.0.

Preview!

Now we've got a layered fog and we've suffered virtually no slow down in our rendering time.

NOTE: You may again see some banding at this point; you can easily fix this when doing full renderings, by turning on `dithering' in the Render dialogue box.

The camera is currently close to the top of the fog; let's move it around a bit to see how the fog looks from different angles.

Move the camera down.

Select the camera. Translate it in the y direction only, to y: 25.0.

Preview!

We're now well within the fog, and can't see much through it. Now for a clearer view -

Move the camera up.

Select the camera. Translate it in the y direction only, to y: 75.0.

Preview!

Now we're mostly above the fog and can see the tops of the farther trees, off in the distance.

OK, enough mist for now; let's move on. In order to demonstrate the Facade shader, we're going to show you the forest's dirty little secret...and then clean it up!

Fix the forest

Get rid of the fog. So that we can see what we're doing.

Choose Atmosphere -> Depth Fading; click on the Depth Fading check box to make it inactive.

Move the camera.

Translate the camera to x: 450.0, y: 50.0, z: -200.0.

Preview!

OK, so maybe it wasn't a secret exactly, since we already knew that the trees were just flat planes but it's not what we'd really want. The Facade shader will allow us to still use simple geometry and texture mapping, but will make it so that the trees are facing us no matter from which direction we look, thereby preserving the illusion that they are fully three-dimensional. In addition, it will also fix the shadows, making them full and appearing to be cast by that same true 3D object a trick not easily accomplished by traditional methods.

Delete the trees. We first need to get rid of the current trees.

With the right mouse button select the entire tree hierarchy.

Choose Delete -> Selection.

Get new trees. We've created these for you; they are simple cubes, with the same size, placement, and textures as the previous trees.

Choose Get -> Element. In the LumeTutorials MODELS chapter, get the model called "CubeTrees."

Preview!

So now we've got the same trees, projected onto cubes. (You might notice that they're doubled here that's because we're seeing the projection on both the front and the back of each cube; don't worry, that'll be gone in a minute.)

Add the Facade shader.

With the right mouse button, select the entire tree hierarchy.

Choose Texture -> 2D Local. Go to the lower left side of the 2D Texture dialogue box and click on the Shader check box; then go to the LumeTools database, and choose Facade.

Click the Edit button to go to the Facade dialogue box. Change the Size setting to 100.0 the height of the trees in Softimage units. Click OK, and OK again to return to the scene.

With the tree hierarchy still selected, choose Material. Set the objects' Transparency to 1.0 (be sure not to forget this step Facade needs this to work properly). Click OK to return to the scene.

Preview!

The trees are all facing us! Also notice that the shadows are now full, as they would be if these were true 3D objects. Orbit the camera around and preview from various directions you'll see that the trees always appear to face the camera.