Creating skylines using procedural textures, part 2

Our hemispheres are ready, and we're now ready to make the materials. We will need four different standard materials for our cloudy scene. These will be used as components of three blend materials, one for each hemisphere object.

Time for an apology. This tutorial was written before 3ds Max got its wonderful node-based material editor. It can be difficult to understand how the materials in this tutorial are connected, something that is a lot easier in a node-based editor. I hope I can update this tutorial sometime in the future.

Material 1: haze

First, we will create a haze material. This is the material that the clouds and sky will fade off to. Make the material self illuminating and set it to a nice bluish hazy colour. I used 158, 179, 221 for my diffuse colour. Name the material 'matFog'.

Material 2: sky gradient

Second, we need the sky gradient material. Create a standard material and name it 'matSky', then apply this material to the sphere named 'hemiSky'. Make it self illuminating, and put a gradient ramp texture into the diffuse/colour map slot. I used these colours for my gradient: 6, 36, 80 as the start colour, a nice dark and almost polarized blue. In the other end of the gradient, I used a brighter blue with these values: 132, 139, 255. Make sure the gradient texture use Map Channel 2, and rotate it 90 degrees in the W channel for proper horizontal orientation.

Material 3: upper cloud layer

Third, we will make the material for the upper cloud layer. Make another standard material and call it 'matBrightClouds', apply this material to the sphere named 'hemiBrightClouds'. Make it self-illuminating as well, and use a nice bright cloudy colour as the diffuse colour. I used 163, 177, 196 for mine.

Now put a noise texture inside the opacity/transparency slot. Set the UV source to 'Explicit Map Channel' and make sure the 'Map Channel' is set to the default 1. Set the noise to a fractal noise, we need plenty of detail so up the number of levels to 6. We need some extra contrast in this opacity map, so remap the texture using the output controls at the bottom of the noise map. Use the screenshot below as a guide.

Let's check how we are doing

This is a good time to do some test renders to make sure the scale of the clouds are OK. Hide everything except the 'hemiBrightClouds' sphere. Tweak the 'Size' value under 'Noise Parameters' until you get something that looks good. Here's a screenshot how my clouds look at this point. I ended up with a noise size of 0.1:

Material 4: shadow cloud layer

Looking good so far! Unhide all the other spheres. Now for our fourth and last material, the cloud shadow layer. Duplicate 'matBrightClouds', making sure to make a copy and not an instance, and then rename the copy 'matShadowClouds'. Then apply this new material to the sphere named 'hemiShadowClouds'. Edit its diffuse colour to something slightly darker, i used 56, 72, 110 for a greyish shadow with a cast of ambient blue.

This material is supposed to be the cloud shadows, so we need the noise texture to be a bit tighter, or smaller. In the noise map, edit the output control curve at the bottom of the map by moving the points a bit to the right. I moved my points .1 unit, checking in the material slot to make sure the texture was shrinking the amount I wanted.

Great! Now it's time to combine these materials to create our final skyline.

Continue to part 3