Shading cars - a tutorial

 

Home Go for the GT5 look using vertex and fragment shaders!


Dolphinity Organiser - free planning and organizing software for all your todo and action lists

Introduction

This tutorial explains how we tend to shade our cars. Really this is an area that is often in movement. More shading tutorials here.

Tires - F1 type

Certain F1 tires have a characteristic pattern. We use bumpmapping in combination with specular control to shade them. The Cg shader is dyn_standard_bump_speca_v/f.cg.

Like dyn_standard_bump_v/f, only this one takes its specularity color from the bumpmap (2nd) texture's alpha channel (NOT the diffuse map). Useful for tires that have both smooth and rough parts, such as F1 tires.

The shader used:

vf_bump
{
; For the tires
diffuse=1 1 1
ambient=1 1 1
shininess=30
specular=1 1 1
vertex_shader
{
file=dyn_standard_bump_speca_v.cg
}
fragment_shader
{
file=dyn_standard_bump_speca_f.cg
}
} shader_f1_wheels~vf_bump { motion_blur=0 tangents=1 layer0 { map=f1_wheels.tga } layer1 { map=f1_wheels_bump.tga } }

Below is a screenshot for the end result.

f1 tire

 

 


Organiser -planning, organiser and time billing software

(last updated July 1, 2010 )