Materials and mapping Archive

UVW Mapping with Real World Scale

UVW mapping a 3d model can be either very easy or very difficult, depending on the complexity of the 3d model and the final purpose of the computer generated image. If you have basic knowledge of texturing you know that if you have a “box like” model you apply a uvw map modifier with a box gizmo, for a bowling ball a spherical gizmo and so on…
But what happens if a client sends you a sample of a wood texture and ask you to apply that on a furniture element? One way to do it is to use tilling, but in order to do it correctly (keep the real dimensions) you need to do quite a few calculations to see how many times that texture should be tiled horizontally and vertically.

Fortunately there is another way to do it by using “real world scale” and that is the process I will try to explain in the following tutorial.

Download the 3d model

Download the wood textures that you will apply on the model

Before you begin, make sure that you have set your units to centimeters (or the units that you usually work with, except “generic units”) As you will see, for this type of approach to uvw mapping, the units are very important.

The model that we will be working with, will be mapped with 2 different materials, so the first step is to select the polygons that will have one of the textures assigned to it and set an id like in the pictures bellow.

With the selection still active, click on “edit”, “select invert” and you will end up with the other polygons selected; under “set material id”, type “2” in order to assign a new id to the second material.

At this moment you have the material ids set, so whenever you need to select the polygons that correspond to a specific material just click on “select id” and type the number that corresponds to the desired material.

http://www.cgdigest.com/material-settings/uvwmap/uvw.rar

Open the material editor, and assign a material for each of the polygon selection sets of your model.
Select the material slot of the first material that you want to work with and apply a checker map in the diffuse slot.
Under “coordinates” rollout make sure you check “Use Real World Scale” and type in the desired dimensions of your texture (in this case 5cm x 5cm).

Now apply a uvw map modifier to the object, select “box” and check “real world map size”. As you can see, every square of the pattern has 2.5 x 2.5 centimeters (the checker map is 2×2 squares with 5x5cm dimensions)

At this point, you can replace the checker map (that was just a placeholder to understand better how real world scale uvw works) with a desired wood texture, in this case a red oak. The important thing is to know exactly the size of the photo sample. This one is 35×52 cm, so you just need to type this dimensions in under the “size” parameter of the texture.

Click the image to view a higher resolution picture


Since we have completed uvw mapping the first material on our model, we can start working on the other one. In the diffuse channel select the desired texture, check “use real world scale” and type the dimensions like you did for the previous one.

As you can see from the photo above, the grain of the texture of the second material is vertical and you probably want it to be horizontal. The first thing that may cross your mind would probably be to change the axis of the uvw gizmo from “z” to “x”. This is only partially correct because even if it places the new texture correctly, it messes up the old one.

What you need to do is to collapse the uvw mapping modifier, select the polygons that correspond to the material you need to tweak and with the selection active, add a new uvw mapping modifier. By keeping the selection active, the new uvw mapping material will affect only the selected polygons.
Click again on real world map size and change the axis from “z” to “x”.

Click the image to view a higher res rendering

That’s about it; if you need to add more materials, just repeat the last steps; collapse the stack, selected again the polygons that you want to correspond to a new material, and add a uvw mapping modifier with the new selection set active.

If you have any questions feel free to ask.

How to Create Grass in 3ds Max

After having posted the tutorial on how to create a night rendering I’ve been asked a several times through both comments and emails, how I did the grass in that rendering. Therefore, I’ve decided to do a little tutorial about creating grass as well.

1) Create a plane, or a surface that will lately become the grass.
2) Apply whatever tilebale texture on the diffuse chanel.
3) Apply a planar UVW modifier to the plane or surface you have just created.
4) Apply a vray displacement modifier above the uvw in the modifier stack.
-under “paramenters” check “2d mapping”
-under “common params” select a displacement map for your grass.
This is actually the most important factor; if your displacement map is not good, you will never get the grass to look right, regardless of the texture that you have used for the diffuse slot.
I have actually obtain good results only by using a procedural “smoke” map with various shades of green, without actually using a texture. If you don’t have a good displacement map, you can use mine.

Download grass displacement texture.

-next to “amount”, type in how much you want the grass to be displaced. For this scene (since I’ve chose meters as units),I have typed 0.18
-under “2d mapping”, “resolution” type 1024 (if you leave it at 512 it will look more like boulders than grass).


5)If necessary you can adjust the tiling of the vray displacement map. You can do that by dragging the texture to an emty slot in the material editor and select “instance” when the question will pop.

That’s it! As simple as that.

I always look forward to hearing your suggestions reagarding what tutorials should I write, so if you have any ideas feel free to contact me either by commenting here, or by email (cgdigest(at)gmail.com).