Now let's import the car and add some shaders to it. 

If you are starting the tutorial here you can download the results of the previous section below.


Import The Car Geometry


Add Attributes For The Colors

Rather than create a separate shader for each color of the car, we will only create two shaders and use attributes and user data to color them correctly.

Enter the roadster_built geometry node and add an Attribute Create node after the File node. Clicking the down arrow next to the Group parameter shows all of the individual bits that make up the model. 

Each of the pieces in the .obj file have been given a color shorthand in their name. dargry = dark grey, whi = white, bge = beige and so on. This can be used to assign the new color attribute to only the right bits of geometry. For example, entering  *_dargry_* as the Group name will assign it to any dark gray piece.

Dark Grey*_dargry_*0.25, 0.25. 0.25
Dark Blue*_darblu_*0, 0.2, 0.9
Red*_red_*0.9, 0, 0
Yellow*_yel_*0.9, 0.7, 0
Orange*_ora_*1, 0.6, 0
Beige*_bge_*1, 0.885, 0.502
Light Blue*_ligblu_*0.2, 0.5, 1
White*_whi_*0.8, 0.8, 1
Grey*_gry_*0.5, 0.5, 0.5
Black*_blk_*0.05, 0.05, 0.05


Create The Solid Standard Surface Shader




Separate The Non-Opaque Geometry

We will need to create another shader for the transparent plastic but first, the car pieces must be separated into opaque and non-opaque groups so that the right Arnold properties can be applied.

As well as tags to apply shaders, the geometry also has tags to differentiate between clear and solid. Select the delete node and enter *_clr_* as the Group. This will delete all the clear pieces such as the windscreen and lights.




Create The Clear Standard Shader