For this tutorial, I will be using VRay shader and Maya’s procedural textures, but please note that this tutorial will work not matter what type of render system you are about to use. It works great in both Mental Ray and Maya software renderer.

I’ll talk a bit about modeling, cause no matter how good your shader is, if the 3d model isn’t done right, the look you are going for will not be easily achieved. I wanted a rounded rug, so I started with a simple cylinder primitive and deleted its bottom face.

Then I selected the top edge that goes all around and added a small bevel using the Bevel tool found under Edit Mesh. Make sure that bevel is not very tight cause then you will end up with a very sharp unrealistic edge to the rug and the rug will look like it’s made of plastic. Also you can notice that I added an extra edge using the Insert Edge Loop Tool found under Edit Mesh just so I can hold that edge.

Once I finished the modeling, I will need to UVmap; this so I can get the effect that I’m looking for. I know we are using procedural textures and when using procedural texture you don’t need to do any UVmapping, please bare with me. I won’t do any fancy UV mapping you just need to create a Planar mappingby going to  Create UVs > Planar mapping The result will be something like this:

Now we just have to rotate the polyPlanarProj in the Channel Box 90 in X axis, and set the projection Width and Height to 25, the number might be different for you, just make sure the polyPlanarProj is square and will cover the entire 3d model. Your planar mapping and Channel Box should look like this:

Now we start working on the Rug/Carpet Shader. Again for this tutorial I’m using a VRay shader; feel free to use a Lambert, Blinn or any type of shader you want . Ctrl+ double click (windows) cmd + double click (mac) to rename the shader.

Next we will create a Maya 2d texture, a Ramp; middle click and drag the ramp that you just created over the Vray Shader, and drop it into the Default drop down.

Let’s tweak the ramp so we can get the style that we are looking for! Double click on the 2D Ramp shader so it opens up in the Attribute Editor, change theRamp type to Circular Ramp, the Interpolation to none so we can get solid color edges in the ramp and just start adding colors and moving them around to achieve the look that you want. Feel free to add as many colors as you like.

Now let’s add the bump shader to the carpet/rug shader. We start by creating a Cloth material, which can be found under the 2D Textures in theHypershade.

Middle click and drag the cloth that you just created over the Vray shader, and drop it into the Bump Map drop down.

Double click on the Cloth shader so we can start tweaking it. To get the look that we are looking for, please feel free to experiment with the setting, cause you might come up with something that works best for the project that you are working on.

Once we have the Cloth shader tweaked and ready, back into the hyper shader, double click on the place2dTexture that is linked to the cloth shader. Now in the Attribute Editor change the Repeat UV to 100 and 100, this will make the cloth shader repeat 100 times along the U and V. Again, feel free to experiment with this value cause you might need more or less to achieve the style that you are going for.

Please Note: When adding the bump map on a Maya Shader like Lambert, Blinn, Phong and Phong E you will get an extra utility node called bump2d, double click on the Bump2d node and in the attribute editor tweak the Bump depth to change the strength of that bump, going all the way to ” 0 ” you will have no bump, going in the negative you will get an inward bump rather than going out.

Now we just apply the shader to the cylinder that we created. You can apply the shader to the cylinder either by middle click drag and drop the shader from the Hypershade window unto the cylinder, or select the cyclinder then in the Hypershade while the cylinder is still selected middle click on the Rug_carpet shader and select Assign Material to Selection.

Now if we do a render to the rug we might get something like this. Please note that the scene that I’m rendering has multiple light setup in it; you can check out the scene and the lighting setup by visiting the Waiting for Santa scene. As you can see the result came out nice, but the cylinder is very chopy cause it has a low number of faces.

Here is the interesting part which happened by mistake while working on this project: I added a smooth modifier to the cylinder – you can do that by going to Mesh > Smooth  – just so I can make the rug smoother. Select the cylinder and go into the Channel Box. You will see under INPUTS something called polySmoothFace; click on that to expand it and under Divisions add 2.

This will add more subdivisions to our cylinder so it doesn’t look so faceted, but because we did UVmaping to this cylinder and because it was low in polycount while adding the smooth modifier it caused the Rug shader to stretch giving me that lovely waves on the carpet circles which made the carpet look more interesting. This is what I would call a happy creative accident which gets you some awesome results.

I really hope you find this tutorial helpful, and below you can see some example of the styles that you can achieve with this simple shader. And I have also uploaded the shader tree in the Hypershade for each one, All shaders on the carpets and rugs are 100% Procedural textures.

8 Comments

Leave a Reply