Tutorial 7: Advanced Terrain Texturing
In this tutorial, you're going to build a more complex material for your DreamScape terrain using the DreamScape: Composite map so that you can layer different maps one on top of another. You'll also learn a little bit about importing terrain data into the Terra Editor.
In 3ds Max, select File->Open, and from your \Scenes\DreamScape\Tutorials folder, select the Tut7-start.max file.
Like the last tutorial, this scene only has a camera and DreamScape Sun light present, so we'll have to build the Terrain ourselves.
Go to the Command Panel->Create->Geometry, and from the dropdown menu, pick DreamScape Objects.
Click on the Terra button to select it, then in the Top viewport and click on the coordinate system center and drag the mouse in any direction and create a Terra mesh that has a Width of about 2000 units.
With the DreamScape Terra object still selected, switch to the Modify panel and click on the Open Editor button.
From the File menu choose Import Terrain.
The DreamScape .dst format is selected by default but you can also import DEM files and most SDTS files as well.
Browse to your \Scenes\DreamScape\Tutorials folder and load the file MTR.dst.
When complete, the grayscale height map shows within the Terra Editor and the 3ds Max viewport representation of the Terra land mass also updates to reflect the loaded map.
NOTE: When you import terrains in this way, the Grid will be created automatically.
Close the DreamScape Terra editor.
With the Terra object still selected, go to the Modify panel and set the Height spinner to 625.
Now that we have a mountain terrain, we need to put a series of maps on it.
Open the Material Editor.
Select the Material #1 slot and set both Diffuse and Specular colors to solid White (RGB: 255, 255, 255).
Click on the Diffuse map slot and from the Material/Map Browser choose DreamScape: Composite.
The DreamScape: Composite map evaluates the topmost map first and the bottom map will be evaluated last. What this means is that Map 1 becomes the base map, with each successively layered maps (Map 2, Map 3, and so on) covering parts of it.
Click on the Map 1 slot and choose DreamScape: Terrain from the Material/Map Browser. This map will define the mountain's stone to be covered by the snow map we're going to create in the Map2 slot.
Within the Color group of controls, activate the checkbox to the right of the Texture Map slot (which currently displays the word None) as shown below.
Next, click on the Texture Map slot and choose Noise.
For the Noise Type, choose the Fractal radio button.
Set the High Noise Threshold spinner to 0.825 and the Levels spinner to 8. Higher levels will add more detail to the noise.
Set the Size spinner to 1010 to make the Noise size much bigger.
Set the Color1 swatch to a Medium Gray (RGB: 82, 82, 82).
Set the Color2 swatch to another slightly lighter Medium Gray (RGB: 102, 102, 102).
In the Material Editor, click on the Go to Parent button twice to get back to the DreamScape: Composite material level.
Now you'll set the second map within the DreamScape: Composite map.
Click on the Map 2 slot and choose DreamScape: Terrain from the Material/Map Broswer. Using this map, we will create the Snow cover.
Within the Color group of controls, activate the checkbox to the right of the Texture Map slot (which currently displays the word None).
Click on the Texture Map slot and choose Noise again.
For the Noise Type, choose the Fractal radio button.
Set the Levels spinner to 6 and the Size spinner to 10.
Set the Color1 swatch to a Light Gray (RGB: 188, 188, 188).
You can see that we now have both Terrain maps set in terms of color, but you still need to tell the Map 2 how it should composite over Map 1. You'll take care of that now.
Click on the Go to Parent button once to go back to the DreamScape: Terrain map.
Within the Elevation group of controls, activate both the Min. and Max. checkboxes.
The Elevation applies the map based on the height of the geometry it is applied to.
Set Max. Elevation spinner to 5000.
Next, within the Slope group of controls, activate both the Min. and Max. checkboxes.
Set Max. Slope spinner to 40. This will limit the snow creation to the mesh faces that are not too steep (40 degrees maximum).
All faces that do not get this snow material will get the underlying one - in this case, the stone texture within the DreamScape: Composite map beneath it.
Click the Go to Parent button until you get back to the Material #1 parameters.
Open the Maps rollout and drag and drop the Map we just created from the Diffuse Color slot to the Bump map slot. When prompted for the Copy method, choose Copy.
Click on the Bump map entry, then on the Map 1 slot. The DreamScape: Terrain map should now be visible.
Click on the Color Texture Map entry and change the map type to DreamScape: Noise. (You will be asked whether to Discard the old map or Keep the old map as a sub-map. Discard the old map).
Under Noise Parameters rollout, select Hetero Terrain from the Type dropdown menu.
Next, change the Size spinner to 500.
Set the Blur spinner to 0.1, the Detail spinner to 2.06, and the Offset spinner to 0.55.
Finally set the Color 2 swatch to a Medium Gray (RGB: 78, 78, 78).
Now, drag and drop the material onto the Terra01 object.
Now, before you can do a test render, you must add the DreamScape Sky atmospheric. DreamScape is needed to render the Terra object when the Render as Geometry option isn't used.
Go to the Rendering->Environment menu, then from the Atmosphere rollout click Add.
From the Add Atmospheric Effect dialog choose the DreamScape entry then click OK to add it to the Effects list.
Within the Render Controls group of controls, activate the Enable Antialiasing checkbox.
Under the Daylight Controls rollout, activate the Render Daylight checkbox, then change the Sample Rate to 6.
Under the Atmosphere Parameters rollout, set the Haze Density to 0.3.
Next, make the Haze Color the same as the Sky Color by dragging and dropping the Sky Color swatch onto the Haze Color swatch (choose Copy when asked about the Copy method).
Select the Sun01 light and from the Modify panel activate the Geometry->Geometry checkbox within the Shadow Parameters rollout.
Next, within the Sun/Scene group of controls turn on the User Color checkbox and set its Multiplier to 1.1.
Finally, within the Sun/Sky group of controls, set the Multiplier spinner to 1.2.
Activate the Camera01 viewport and render the scene.