Materials and mapping Archive

How to blend materials with vertex paint

Vertex paint is a modifier that is mostly used in the game development industry but for some reason is almost never used in architectural visualization. However, there are quite a few situations where it can be very helpful due to the fact that you can blend materials anyway you want by painting maps directly on the mesh.

In this example we will try to “paint” a pathway on a hilly landscape. Continue reading

How to create a procedural stone material

This is a short tutorial that explains how to create a stone material in 3ds max without using any textures, only procedural maps. The tutorial has been written for vray, but the same concept can be applied to mental ray as well.

Create a chamfer box and apply a vray material to it. Click the bump slot of the material (in the maps rollout) and choose “Perlin Marble”.

In both slots of the perlin marble parameters choose smoke, and adjust the settings like in the following image:


Now apply a vraydisplacement modifier to the object, choose 3D mapping, set the amount to 5-6cm and drag the previously created perlin marble map on to the texmap slot.

It is important to set the displacement method to 3d mapping, since 2d mapping doesn’t work with procedural maps.

At this point we only need to add something in the diffuse channel. In this case I have added a smoke map with 2 different noise maps for both slots, like in the screen captures bellow:


That’s it.

Some conclusions:
The parameters of each map, don’t have to be exactly the ones that I have used in this tutorial. The important thing is to diversify them as much as possible, so there won’t be any visible repeated patterns in the rendering. That is the reason we have used mixed maps in the first place.
The main disadvantage of using this method is that you need 3d mapping for vray displacement, which implies longer rendering times.

In an effort to keep this tutorial as simple as it can be, I have touched only the diffuse and the bump channels of the material, but if you feel like experimenting more, don’t be afraid to play with other channels as well (especially reflection). You can obtain several materials like various types of stones, concrete, rough terrain, mud etc.
You can also combine 2d raster maps with procedural ones… sky’s the limit.
Here is the 3d max scene that I used for this tutorial (grass maps not included).

If you try this method and obtain some results that you like, I would be happy to see them; feel free to contact me at cgdigest (at) gmail (dot) com

Frosted glass material (part 2)

This is a follow up of the Frosted glass tutorial that I posted last week, here on cgdigest. If you haven’t already read that one, I strongly suggest you do that before going through this one.

If you went through that tutorial, you’ve most probably noticed that the rendering times, when you activate blurred reflections and refractions are considerably high.
However, if you are not rendering an animation and the final product is a still rendering, there is another way around it; this is what I’m trying to explain in this tutorial.

The first thing that you need to do is to start with material settings suitable for clear glass, with no blurred reflections of refractions. Duplicate the material, rename it, and make it a vray material wrapper, with the base material being the clear glass.
Change the alpha contribution parameter to “-1” and keep the rest untouched.

Now select the polygons like in the image bellow and assign the new material only to this selection.

In case you are wondering why you didn’t assign the new material, the answer is simple; we will going to tweak this in post processing in order to add blur reflection and reflection, but we need to keep the edges sharp.

Render a high resolution rendering, and save the result as a tiff with alpha channel.

Open the rendering in photoshop.
Click on “select”, “load selection”, “alpha 1”, than invert the selection.
At this point you have the material selected and you can start tweaking it.
In order to have blurred reflections and refractions, click on filters, blur, and choose Gaussian blur.
One of the advantages of using this method is that you can adjust the amount of blur that you need in your image dynamically, without having to render the scene again.
Also, you have more control on the color simply by adjusting the color balance.
Bellow are 3 examples that I managed to do in a few seconds using this method (if I had to do it directly in 3d, I would have had to render each one separately):


As you can see these images are already similar to the renderings done directly in 3d.
You can take them even further by using filters like glass (tiny lens, canvas or blocks) or any other filter that fit your needs..

As I said previously, this method of creating frosted glass with photoshop has a lot of advantages; however it has some disadvantages as well. Besides not working for animations, you can not control the amount of blur for reflections and refractions separately.

Depending on what are your requirements you can choose either of the methods shown above.

If there is something you don’t understand, feel free to ask!

How to create a frosted glass material

In this tutorial I will show you 2 ways of making a frosted glass material in 3d max. The first part of the tutorial is focused on obtaining this type of material directly from the render. Although this part is especially written for 3ds max and vray, the same workflow can be applied to any other rendering software.

First method
1) The basic material settings.
Every time I have a glass material in a scene, I start with the following parameters:
a)    diffuse color – pure black
b)    reflection – a falloff map from black to white, set to FRESNEL
c)    refraction – pure white
d)    Index of refraction (“IOR”) 1.4
e)    Refraction “max depth” 7

If you hit a render at this stage you will have a clear glass material, like the one in the following rendering:

2) Controlling the sharpness of the refraction and reflection

As you can see both reflections and refractions are clear. You can now start by blurring the refractions. You control the sharpness by adjusting the glossiness parameter under “Refract”. A value of “1” for the glossiness produces crystal sharp refractions; by decreasing this value the refractions will become more and more blurry.
For this example, I think that a value of “0.95” is enough.

The refractions are now ok, but the reflections are still sharp.
You can adjust this in the same manner as you did for the refractions, by decreasing the glossiness parameter under “Reflect”.

The beauty of using this method is that you can control the reflection glossiness and the refraction glossiness separately; some types of frosted glass materials, although they have very blurry refractions, the reflections are quite sharp.

Here is a test I did with blurry reflections.

3) Controlling the color
If the frosted glass material that you need to obtain has a color tint, you can assign it by changing the “fog color” from white to whatever color you need.

Note: This has quite a high impact, so you need to use very bright and desaturated hues.
Bellow you will see 2 tests I did, with different values for the fog color:

4) Bump mapping
If the material you want to achieve has some bump pattern applied, just apply the desired bump map in the “bump” channel, and you’re done


Second Method

In the second part of the tutorial, we will go through a more versatile method of obtaining a frosted glass material that allows you to quickly change how the material looks, without having to render again.

Stay tuned!