1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
2<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
3<!-- InstanceBegin template="/Templates/default_template.dwt" codeOutsideHTMLIsLocked="false" -->
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6<meta http-equiv="Content-Style-Type" content="text/css" />
7<!-- InstanceBeginEditable name="CSS の相対パス指定" -->
8<link href="../../../common/manual.css" rel="stylesheet" type="text/css" />
9<!-- InstanceEndEditable --> <!-- InstanceBeginEditable name="ページのタイトル" -->
10<title>Vertex Lighting</title>
11<!-- InstanceEndEditable -->
12</head>
13<body>
14<div>
15  <div class="body"> <!-- InstanceBeginEditable name="本文のタイトル" -->
16    <h1>Vertex Lighting</h1>
17    <!-- InstanceEndEditable --> <!-- InstanceBeginEditable name="本文" -->
18    <p>This section describes vertex lighting.</p>
19    <p>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 <I>Introduction to CTR Graphics</I>.</p>
20    <h2>About Vertex Lighting</h2>
21    <p><I>Vertex lighting</I> is the process of calculating per-vertex lighting.</p>
22    <p>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.</p>
23    <p>The figure below shows per-vertex shading being applied by the vertex shader.</p>
24    <img class="user_guide_chart" src="assets/material_pipeline_rasterize.png" alt="Rasterization"/>
25
26<!--     <p class="new_hint">補足:<br />       頂点ライトは、フラグメントライトと違い以下の設定ができます。<br />       1. RGBA 値にマイナスの設定ができます。<br />       (例)頂点カラーや半球ライトで設定された色を「頂点ライト」でマイナスすることができます。<br />       2. アルファライティングが使えます。<br />       (例)ライトが当たるところをアルファで抜けるような表現を設定できます。<br />       詳細は、<a href="../default_shader/index.html">こちら</a>を参照してください。</p> --> <!--              <p>以下の図は、頂点処理から入力された情報をもとに、頂点ライティングを頂点シェーダーで行い、ライティング結果のカラーが出力されるまでの流れを説明しています。</p>     <img class="user_guide_chart" src="assets/vertex_lighting_light_color.png" alt="カラー出力の流れ"/>   --> <a name="vertex_lighting" id="vertex_lighting"></a>
27    <h2>Vertex Lighting Settings</h2>
28    <p>This section describes the settings for lights and materials when performing vertex lighting.</p>
29    <h3>Light Types</h3>
30    <p>Types of light that can be used for vertex lighting</p>
31    <p><em>● Directional light / Point light / Spotlight</em></p>
32    <img class="user_guide_chart" src="../fragment_lighting/assets/fragment_lighting_light_type.png" alt="Light Types"/>
33    <p><em>● Hemispherical light</em></p>
34    <p>The figure show how light color is interpolated between two colors by setting a sky color and a ground color.</p>
35    <img class="user_guide_chart" src="assets/vertex_lighting_hemisphere_lighting.png" alt="Hemispherical Lights"/>
36    <h4>Light Settings</h4>
37    <p>The table below lists the items which can  be set for each  type of light.</p>
38    <table>
39      <thead>
40        <tr>
41          <th>Categories</th>
42          <th>Item</th>
43          <th>Description</th>
44        </tr>
45      </thead>
46      <tbody>
47        <tr>
48          <th rowspan="4" class="bgcolor_g">Light color</th>
49          <th>Ambient color <br />(environment light)</th>
50          <td>The color and alpha values for the light that will effect the ambient color of the material.</td>
51        </tr>
52        <tr>
53          <th>Diffuse color <br />(scattered light)</th>
54          <td>The color and alpha values for the light that will effect the diffuse color of the material.</td>
55        </tr>
56        <tr>
57          <th>Sky color</th>
58          <td>A parameter that can be set for hemispherical light. The color of the light that influences vertices with the normal pointing upward.</td>
59        </tr>
60        <tr>
61          <th>Ground color<br /></th>
62          <td>A parameter that can be set for hemispherical light. The color of the light that influences vertices with the normal pointing downward.</td>
63        </tr>
64        <tr>
65          <th rowspan="2" class="bgcolor_y">Light orientation</th>
66          <th>Position</th>
67          <td>The light position. For vertex light, this is set in the world coordinate system.</td>
68        </tr>
69        <tr>
70          <th>Direction:</th>
71          <td>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.</td>
72        </tr>
73        <tr>
74          <th rowspan="3" class="bgcolor_r">Light attenuation rates</th>
75          <th>Distance attenuation</th>
76          <td>Specifies how far the light will reach in terms of an attenuation rate Used for point lights and spotlights.</td>
77        </tr>
78        <tr>
79          <th>Spotlight attenuation</th>
80          <td>Specifies how wide the light will reach in terms of an attenuation rate using a lookup table. Used for spotlights.</td>
81        </tr>
82        <tr>
83          <th>Sky color weight</th>
84          <td>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.</td>
85        </tr>
86      </tbody>
87    </table>
88    <h3>Material Settings</h3>
89    <p>The table below lists parameters that can be set for each material.</p>
90    <table>
91      <thead>
92        <tr>
93          <th>Categories</th>
94          <th>Item</th>
95          <th>Description</th>
96        </tr>
97      </thead>
98      <tbody>
99        <tr>
100          <th rowspan="1" class="bgcolor_g">General</th>
101          <th>Enable occlusion</th>
102          <td>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.<br /> Although this item is called <I>occlusion</I>, it is specifically an item for changing the illumination of the hemispherical light using the vertex alpha.<br /> It is not an item limited to general ambient occlusion.<br /></td>
103        </tr>
104        <tr>
105          <th rowspan="5" class="bgcolor_g">Material color</th>
106          <th>Emissive color<br /></th>
107          <td>Not used for vertex lighting.</td>
108        </tr>
109        <tr>
110          <th>Ambient color <br /></th>
111          <td>Color expressing the shaded side of the object. This is set in a material.</td>
112        </tr>
113        <tr>
114          <th>Diffuse color <br /></th>
115          <td>Color expressing the surface &quot;feel&quot; of the object. This is set in a material.</td>
116        </tr>
117        <tr>
118          <th>Specular color 0<br /></th>
119          <td>Not used for vertex lighting.</td>
120        </tr>
121        <tr>
122          <th>Specular color 1<br /></th>
123          <td>Not used for vertex lighting.</td>
124        </tr>
125        <tr>
126          <th class="bgcolor_y">Environment light of entire scene</th>
127          <th>Global ambient color</th>
128          <td>Not used for vertex lighting.</td>
129        </tr>
130        <tr>
131          <th rowspan="4"  class="bgcolor_r">Light Controls</th>
132          <th>Distribution 0</th>
133          <td>Not used for vertex lighting.</td>
134        </tr>
135        <tr>
136          <th>Distribution 1</th>
137          <td>Not used for vertex lighting.</td>
138        </tr>
139        <tr>
140          <th>Reflection</th>
141          <td>Not used for vertex lighting.</td>
142        </tr>
143        <tr>
144          <th>Fresnel</th>
145          <td>Not used for vertex lighting.</td>
146        </tr>
147      </tbody>
148    </table>
149    <!--         <h2>頂点ライティングの計算式</h2>     <p>ここでは、頂点ライティングを行うさいに使用する計算式について説明します</p>     <p>以下の図は、頂点ライティングの処理における、計算の流れについて説明したものです。</p>     <img class="user_guide_chart" src="assets/vertex_lighting_color.png" alt="頂点ライティングの計算式"/> --> <!-- InstanceEndEditable --> </div>
150  <div class="footer" />
151</div>
152<hr><p>CONFIDENTIAL</p></body>
153<!-- InstanceEnd -->
154</html>