Vertex Lighting

This section describes vertex lighting.

To read about the methods for calculating vertex lighting and about the process flow up top the point of the output of the lighting result, see the separate document Introduction to CTR Graphics.

About Vertex Lighting

Vertex lighting is the process of calculating per-vertex lighting.

An RGB color value is calculated for each vertex based on factors like the position and color of the light source and the position of the vertex, after which color values between the vertices are interpolated.

The figure below shows per-vertex shading being applied by the vertex shader.

Rasterization

Vertex Lighting Settings

This section describes the settings for lights and materials when performing vertex lighting.

Light Types

Types of light that can be used for vertex lighting

● Directional light / Point light / Spotlight

Light Types

● Hemispherical light

The figure show how light color is interpolated between two colors by setting a sky color and a ground color.

Hemispherical Lights

Light Settings

The table below lists the items which can be set for each type of light.

Categories Item Description
Light color Ambient color
(environment light)
The color and alpha values for the light that will effect the ambient color of the material.
Diffuse color
(scattered light)
The color and alpha values for the light that will effect the diffuse color of the material.
Sky color A parameter that can be set for hemispherical light. The color of the light that influences vertices with the normal pointing upward.
Ground color
A parameter that can be set for hemispherical light. The color of the light that influences vertices with the normal pointing downward.
Light orientation Position The light position. For vertex light, this is set in the world coordinate system.
Direction: The light direction. For vertex light, this is set in the world coordinate system. By combining the nodes and hierarchies of animations you can inherit values from the top level.
Light attenuation rates Distance attenuation Specifies how far the light will reach in terms of an attenuation rate Used for point lights and spotlights.
Spotlight attenuation Specifies how wide the light will reach in terms of an attenuation rate using a lookup table. Used for spotlights.
Sky color weight A parameter that can be set for hemispherical light. Setting the sky color weight closer to 1 makes the sky color stronger, and setting the weight closer to 0 makes the ground color stronger.

Material Settings

The table below lists parameters that can be set for each material.

Categories Item Description
General Enable occlusion A parameter that can be set for hemispherical light. You can use the vertex alpha as set by the 3DCG to change the illumination of the hemispherical light.
Although this item is called occlusion, it is specifically an item for changing the illumination of the hemispherical light using the vertex alpha.
It is not an item limited to general ambient occlusion.
Material color Emissive color
Not used for vertex lighting.
Ambient color
Color expressing the shaded side of the object. This is set in a material.
Diffuse color
Color expressing the surface "feel" of the object. This is set in a material.
Specular color 0
Not used for vertex lighting.
Specular color 1
Not used for vertex lighting.
Environment light of entire scene Global ambient color Not used for vertex lighting.
Light Controls Distribution 0 Not used for vertex lighting.
Distribution 1 Not used for vertex lighting.
Reflection Not used for vertex lighting.
Fresnel Not used for vertex lighting.

CONFIDENTIAL