Procedural texturing of the mountain
Back to smode.fr
You are here: Tutorials > Procedural Terrain > Procedural texturing of the mountain

Procedural texturing of the mountain

Import the textures

Import Rock 06_COLOR.png and Grass 01_COLOR.png by drag and dropping them from the Standard Pack into your composition. As there is a lot of images into the Standard Pack / Texture / Seamless Textures 512, you can press a letter on your keyboard to help you navigate in the folder

Create the procedural texture (part 1/3)

Apply a Reframe modifier over Rock 06_COLOR.png and Grass 01_COLOR.png by selecting their renderers Modifiers>Distort>Reframe. And set the scale at 0.2.

You can duplicate a modifier with it's parameters by Ctrl+Click+Drag and Drop.

Create the procedural texture (part 2/3)

Now, as it is showed on the image below, select the 2 images and press Ctrl+Shift+C to put them inside a composition, in this tutorial I called this composition "Color Map"

Once it's done, select each Image renderer and set it's placement as Full.

Create the procedural texture (part 3/3)

Create a 2D Layer>Uniform inside the Color Map composition and set it to white.

Now We will use the eightmap to mask each layer. To do that:

  • Apply Mask > Layer Mask on the renderers of the white uniform and 2D Layer Rock 06_COLOR.png. By the way, make sure that the layers are in the right order, as shown below.
  • Drag and drop the Smode_Heightmap over each mask generator.
  • Configure the color selector function of the Layer Masks as shown below by activating the advanced parameters mode.

Now you just masked each layer according to the black and white colors of the HeightMap, congratulation. I'm really impressed ! I think I might fall in love with you right now !

Share the procedural texture

Now select the Color Map compo and share it like we did before with a simple right click > Share element.

You should see an instantiated Color Map compo remaining in your tree but you can delete it as we will plug this texture into the 3D layer only.

Use the texture on the mesh

Select Surface renderer under your Plane and drag and drop the shared Color Map into the diffuse component.... tadaaaa !

Now if you decide to do whatever modification in the eight map, the texture will follow. Oh my god... I'm gonna cry now, that's too much wonderfulness than I can take !

Let's add a little bump for the sake of it :

  • Select the Diffuse surface renderer
  • Add a Height Bump component in it (right click>component> Height Bump)
  • Ctrl Drag and drop the Color Map over the Height Bump component Generator and put it's intensity to "3"

 

Bonus: Add a nice black background to work better in the dark

You can also select your main compo and uncheck alpha layer to have a nice and elegant black background.

If you want to see the color map to modify it more precisely, you can click on the Vizualize button next to it (circled in green on the picture).

Add a fresnel effect on the shader of the mountain (part 1/2)

We are going to add a nice fresnel effect over this mesh to make it shine like a lollypop:

  • Select the 3D Layer Plane to add a Surface Renderer (Renderers>Surface>Surface). You should have a tree like on the Image on the right.

  • Put the Auto Illuminate of the new renderer up to 100%.
  • You can delete the Specular component.
  • In this tutorial, I renamed this surface Fresnel Surface.

 

Add a fresnel effect on the shader of the mountain (part 2/2)

Now select the diffuse component of this new 3D surface renderer and right click Masks>Fresnel.

You should get something like that :

Each renderer has a full set of blending modes, here I put the color map into the Fresnel Surface generator and turned it in Linear dodge (Add) Blending mode:

 

Next: Basic compositing using both 2D and 3D