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>Lookup tables</title>
11<!-- InstanceEndEditable -->
12</head>
13<body>
14<div>
15  <div class="body"> <!-- InstanceBeginEditable name="本文のタイトル" -->
16    <h1>Lookup tables</h1>
17    <!-- InstanceEndEditable --> <!-- InstanceBeginEditable name="本文" -->
18    <p>This section describes lookup tables.</p>
19    <h2>What is a Lookup Table?</h2>
20    <p>In fragment lighting, lookup tables are used for lights and to express the various &quot;feels&quot; of materials. A lookup table is a table of values that has been prepared ahead of time and is available for referencing so that even complicated lighting calculations can be performed within a set amount of time.  </p>
21    <p>The figure below shows how a lookup table is put together. The entry values are set to 256 steps, and the table is configured using a curve.</p>
22    <img class="user_guide_chart" src="assets/lookup_tables_mechanism.png" alt="Expressed as a lookup table"/>
23    <h3>Settings that Use  Lookup Tables</h3>
24    <p>For fragment lighting, lookup tables are used to set the following items:</p>
25    <h4>Distribution (The shape of the specular component)</h4>
26    <p><em>Distribution</em> is the element used to apply changes to the shape of the specular as a secondary color calculation. The distribution settings are made using a lookup table. Distribution 0 affects Specular color 0, while Distribution 1 affects Specular color 1. </p>
27    <p>The following figure shows how the specular shape is controlled using a lookup table.</p>
28    <img class="user_guide_chart" src="../lighting/fragment_lighting/assets/fragment_lighting_distribution.png" alt="Distribution"/> <a name="reflection" id="reflection"></a>
29    <h4>Reflection</h4>
30    <p><em>Reflection</em> is the element used to control the specular color as a secondary color calculation. A lookup table is used to set reflection.</p>
31    <p>The following figure shows how the specular color is controlled using a lookup table.</p>
32    <img class="user_guide_chart" src="../lighting/fragment_lighting/assets/fragment_lighting_reflection.png" alt="Reflection"/>
33    <h4>Fresnel</h4>
34    <p><em>Fresnel</em> is an element used to control material transparency (alpha value) as a secondary color calculation. A lookup table is used to set Fresnel.</p>
35    <p>The following figure shows an expression using Fresnel.</p>
36    <img class="user_guide_chart" src="../lighting/fragment_lighting/assets/fragment_lighting_fresnel.png" alt="Fresnel"/>
37    <h4>Distance attenuation</h4>
38    <p>Distance attenuation can be set for both point lights and spotlights. It is the element that controls the extent to which the light attenuates as a function of the distance from the light to the surface of the object. </p>
39    <p>The distance attenuation for point lights and spotlights is set using a lookup table.</p>
40    <img class="user_guide_chart" src="assets/lookup_table_distanceattenuat.png" alt="Distance attenuation"/>
41    <h4>Spotlight attenuation</h4>
42    <p>Spotlight attenuation can be set for spotlights. It is the element that controls the extent to which the light attenuates as a function of the distance from the light to the surface of the object. </p>
43    <p>The setting for spotlight attenuation is made using a lookup table. </p>
44    <img class="user_guide_chart" src="assets/lookup_table_spotlightattenuation.png" alt="Spotlight attenuation"/> <a name="input_angle" id="input_angle"></a>  
45    <h2>Values Entered to Lookup Tables</h2>
46    <p>The table below shows the values that are entered to lookup tables.</p>
47    <table>
48      <thead>
49        <tr>
50          <th>Type of Entry Value</th>
51          <th>Description</th>
52          <th>Main Applications</th>
53        </tr>
54      </thead>
55      <tbody>
56        <tr>
57          <th>LN</th>
58          <td>The angle formed from the light vector and the normal vector</td>
59          <td>Diffuse</td>
60        </tr>
61        <tr>
62          <th>NV</th>
63          <td>The angle formed from the normal vector and the view vector</td>
64          <td>Fresnel</td>
65        </tr>
66        <tr>
67          <th>NH</th>
68          <td>The angle formed from the normal vector and the half vector</td>
69          <td>Specular</td>
70        </tr>
71        <tr>
72          <th>VH</th>
73          <td>The angle formed from the view vector and the half vector</td>
74          <td> </td>
75        </tr>
76        <tr>
77          <th>SP</th>
78          <td>The angle formed from the light vector and the spotlight direction vector</td>
79          <td>Spotlight attenuation</td>
80        </tr>
81        <tr>
82          <th>CP</th>
83          <td>The angle formed by the projection of the half vector onto the tangent plane and the tangent vector</td>
84          <td>Anisotropic  reflection</td>
85        </tr>
86      </tbody>
87    </table>
88    <h3>Relationship Between Formed Angle and Entry Values</h3>
89    <p>Vectors possess both size and direction and are usually represented by arrows. The angle represented by two vectors is the called the angle formed from the vectors. The angles formed from pairs of vectors is what determines the values entered to the lookup tables.  An angle of 180 is the smallest value entered, and an angle of 0 is the largest value entered. The table below shows the relationship between the angles formed from the vectors and the values entered to the lookup table.</p>
90    <img class="user_guide_chart" src="assets/lookup_tables_mechanisminputvalue.png" alt="Relationship Between Formed Angle and Entry Values"/>
91    <h3>Vector Types</h3>
92    <p>The various entry values are determined by different combinations of the six vectors described below. The figure shows all the vectors that form the basis to the entry values.</p>
93    <img class="user_guide_chart" src="assets/lookup_tables_mechanismvector.png" alt="Vector Types"/>
94    <h4>Entry value LN</h4>
95    <p>The value for LN is determined by the angle formed from the light vector and the normal vector. The entry for the LN value is mainly used for Diffuse expressions.</p>
96    <p>The figure below shows the angle formed from the light vector and the normal vector. </p>
97    <img class="user_guide_chart" src="assets/lookup_tables_ln.png" alt="Entry value LN"/>
98    <h4>Entry value NV</h4>
99    <p>The value for NV is determined by the angle formed from the normal vector and the view vector. The NV value is mainly used to express water surfaces and glass by changing the reflection ratio (the Fresnel reflection)  based on the angle of view. </p>
100    <p>The figure below shows the angle formed from the normal vector and the view vector.</p>
101    <img class="user_guide_chart" src="assets/lookup_tables_nv.png" alt="Entry value NV"/>
102    <h4>Entry value NH</h4>
103    <p>The value for NH is determined by the angle formed from the normal vector and the half vector.  The NH value is mainly used for Specular expressions.</p>
104    <p>The figure below shows the angle formed from the normal vector and the half vector.</p>
105    <img class="user_guide_chart" src="assets/lookup_tables_nh.png" alt="Entry value NH"/>
106    <h4>Entry value VH</h4>
107    <p>The value for VH is determined by the angle formed from the view vector and the half vector.  </p>
108    <p>The figure below shows the angle formed from the view vector and the half vector.</p>
109    <img class="user_guide_chart" src="assets/lookup_tables_vh.png" alt="Entry value VH"/>
110    <h4>Entry value SP</h4>
111    <p>The value for SP is determined by the angle formed from the inverse vector of the light vector and the spotlight direction vector. The SP value is mainly used for Spotlight expressions.</p>
112    <p>The figure below shows the angle formed from the inverse vector of the light vector and the spotlight direction vector.</p>
113    <img class="user_guide_chart" src="assets/lookup_tables_sp.png" alt="Entry value SP"/>
114    <h4>Entry value CP</h4>
115    <p>The value for CP is determined by the angle formed from the projection of the half vector on the tangent plane (parallel projection ) and the tangent vector. The CP value is mainly used for the expression of anisotropic reflection.</p>
116    <p>The figure below shows the angle formed from the projection of the half vector on the tangent plane (parallel projection ) and the tangent vector.</p>
117    <img class="user_guide_chart" src="assets/lookup_tables_cp.png" alt="Entry value CP"/>
118    <p>You need to set the layer configuration to 7 in order to use the CP entry value.</p>
119    <!-- InstanceEndEditable --> </div>
120  <div class="footer" />
121</div>
122<hr><p>CONFIDENTIAL</p></body>
123<!-- InstanceEnd -->
124</html>
125