The textures of the beast...

This chapter contains some extra info about texturing the Lamborghini, Let's start with the license plate:

License plate

The license plate needs a texture to be mapped on the license plate object. Here is an example of a texture file for the license plate:


License plate texture (gif format).

You can of course use your favorite paint program to create your own license plate texture. The one shown here is designed in Gimp, for a German car. Save this image if you like, so you can use it when creating your own license plate.

First we need to create a new VSL material. In the material tab of the Select window, press the right mouse button and select:
'New -> VSL Material'  from the pop-up menu. A new material will be added at the bottom of the list, rename that to
'Licenseplate-Front'


New VSL material selected

Then perform the following steps:
1. Select the Licenseplate-Front material and open the properties;
2. Check the Preview and the Advanced checkboxes (this gives you access to the VSL objects);


Preview and Advanced activated

Drag and drop a Shader object onto the Material icon. This adds a new object, called Surface Properties, to the VSL hierarchy. Then add a Texture object. Just drag and drop it on the Surface Properties object. In the lower part of the VSL Property Window (texture tab), you can select your texture file. Note that when you select the file, the preview sphere of the material is updated immediately.


Texture object and texture file added

Next, drag and drop a Constant object on the Surface Properties object. A new object is added, called 'Color=Constant(0,0,0)'. Also note that the preview sphere at the top turns black. Then at the bottom of the window, you can change properties for the Constant object. Click the In/Out tab and select 'Surface: Reflection' from the list. Note that the name of this object in the VSL hierarchy changes to 'Reflection=Constant(0,0,0)'


Drag and Drop a Constant...                                                           Change Output to Surface: Reflection

Then, also at the bottom of the property window, click the Constant tab, and change the value to 0,18  0,18  0,18. Note the change in the VSL hierarchy and note the changed brightness of the reflections of the preview sphere.

Now add a new Shader to the VSL hierarchy. Just drag and drop it on the Material icon. Change the Shader Type to 'Surface Illumination'. Note that the name of the new object changes from Surface Properties, to Surface illumination. To finish the VSL material, drag and drop a Specular object on the Surface illumination object.

 
Set Shader Type to Surface illumination...                                        and drag and drop a Specular on the Surface illumination

The VSL material is now ready and you can close the VSL editor. To apply the material, simply drag and drop the material icon (from the Select window - Materials tab) on the License plate object. Realsoft3D will automatically use the proper mapping type for the object.


Texture applied. You're done!

The tires

To texture the tires, we will use both bump and color mapping. Here is an example bump map texture for the tires. You can create your own, or use this one:


Texture used for bump mapping (gif format).

Create a new VSL material and call it Tire. Open the VSL property window, check the Preview and Advanced boxes. Drag and drop a Shader object on the Material icon in the VSL hierarchy. This creates a Surface properties shader. Add a texture object (drag and drop it on the Surface properties shader) and select the image you wish to use for the texture (in our case the Pirelli P3000 image). Then set the Bleed X and Bleed Y checkboxes. The Bleed option extrapolates texture edge colors outside texture mapped area:


Texture added, Bleed X and Bleed Y checked

Then drag and drop the Bump icon on the Surface properties shader. Click the General tab and set Operation to '+'  and now your VSL shader looks like this:


Bump map object added, Operation set to +

Then we use a simple parallel mapping to texture the tire.


Parallel mapping added

If you now would make test render, you will notice the dark and dull texture of the tire. This can be easily fixed, by adding a Constant object. Drag and drop a Constant on the Surface properties shader. At the bottom of the VSL editor there are three tabs. Click the Constant tab and set the Color value to 0,157  0,157  0,157 (a shade of grey). Click the General tab and set Operation to +. Note that the color of the preview sphere changes to light grey.

Note: If you have set the number of decimals to 2 (in the menu: Preferences -> Options -> Metrics tab) you will see that the value for Constant you just entered is truncated to (0,16  0,16  0,16). In the VSL hierarchy however you see three decimals (0,157).


Color constant added, Operation set to +

Then to add some shininess to our tires just add a Surface illumination shader, just like you did with the license plate. Then drag and drop a Specular object and set Sharpness to 2,10 and Brightness to 0,48. See next image:


Surface illumination shader and specular object added

The VSL material is now ready. Close the VSL editor and try your VSL shader! Here is a test render:


A test render of our textured wheels!

Painting your car...

Vesa Meskanen created two car paint shaders specially for this tutorial (thanks Vesa!). Applying the shaders is easy: just select a car part and drag and drop the shader and you're ready. You can download the shaders by clicking here. Unzip the file and load the shader in the materials tab of the Select Window via the Right Mouse pop-up menu ('Paste from a File'). This adds two new shaders at the bottom of the materials list, called carpaint and metal_paint. Also it adds a sky, which can be used with a self illuminating dome over the scene.

 
Insert a shader from file..     Simple tests showing the two shaders

Of course you can change the appearance of these shaders if you like. For instance, select the carpaint shader in the Materials tab of the Select Window and open its Property Window. Make sure you have the Preview option set, so you can see the effect of your changes immediately. By default the shader allows you to change the base color, specular color, specular sharpness and specular brightness. Changing the base color changes the color of the carparts with this shader. The specular color defines the color of the highlights. If you know your way around in VSL, set the Advanced option to access the VSL statements and have even more control over these shaders. Just play around with the settings and see what results you like best!

   
User interface of the carpaint shader..                                  and the more complex metal_paint shader.

The Grille's

The Grille's basically are black plates with lots of holes in them. You could decide to manually cut out these holes with the Boolean Remove, or you could use a clipmap for this purpose. Considering the number of holes you need to make it look good, we suggest you use the clipmap technique. With a clipmap it is possible to define a color range, which removes the underlying surface. You can use this small texture file as the clipmap texture. (kindly created and donated by Bernie den Hertog). 

Let's see how this works. At the materials tab of the Select window, right click and select New -> VSL Material. Rename the new material to 'Grillestexture'. Open the Property window for the Grillestexture material. Enable the material preview, so you can see the effect of your modifications. Use the Wizard to add a Clipmap. Then in the FileName field select the Grillestexture.bmp file.

 
Clipmap selected in the Wizard...                                                         texture file selected which will act as a clipping texture

This material may look complicated at first, but it's not that bad. The following controls are used in the clipmap material:

Filename: the name of the texture file used for clipmapping;
Sub channel 1 min & max: These two values define the clipped red signal range;
Sub channel 2 min & max: These two values define the clipped green signal range;
Sub channel 3 min & max: These two values define the clipped blue signal range.

You need to define a color that you wish to cause the clipping effect. If you click the Show button, the selected texture is shown. In this case it is a dark grid like texture, with dark grey holes in it. The holes will be used as 'cutters'. With the Sub channel controls you need to find the combination of values that cause a clipping effect. The good thing about grey is that the RGB values are the same, so the sub channel values must also be the same for each of the three sub channels. Take a look at the next image to see the correct settings:


Setting all sub channels at the right value causes a clipping effect!

Enter these values as shown above in the material Property window and then close it; the material is ready. The grille is not a very large object and you need small holes. Select a grille object and apply the Grillestexture as a parallel mapping and make the texture object square shaped. Use small dimensions: the larger the texture object, the bigger the holes! The last step is to set the color of the grille object to a very dark grey (0,16  0,16  0,16) via the Properties -> Col tab.

       
One of the grille's. The white square is the applied clipmap.     A rendered close up of the applied clipmap against a blue
                                                                                          self illuminating background

You can of course apply the same material to the other grille. Save your work before you continue!

 

Home