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    <p>For details on lookup tables, see the separate document Introduction to CTR Graphics.</p>
20    <h2>What is a Lookup Table?</h2>
21    <p>In fragment lighting, lookup tables are used for lights and to express the various &quot;feels&quot; of materials.</p>
22    <p>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>
23    <p>The figure below shows how a lookup table is put together. The input angle is set to one of 256 steps, and the table is configured using a curve.</p>
24    <img class="user_guide_chart" src="assets/lookup_tables_mechanism.png" alt="Expressed as a lookup table"/>
25    <h3>Settings that Use  Lookup Tables</h3>
26    <p>For fragment lighting, lookup tables are used to set the following items:</p>
27    <table>
28      <thead>
29        <tr>
30          <th>Settings</th>
31          <th>Units</th>
32          <th>Main Applications</th>
33        </tr>
34      </thead>
35      <tbody>
36        <tr>
37          <th>Distance attenuation</th>
38          <td>Lights</td>
39          <td>Distance attenuation</td>
40        </tr>
41        <tr>
42          <th>Spotlight attenuation</th>
43          <td>Lights</td>
44          <td>Spot Light</td>
45        </tr>
46        <tr>
47          <th>Distribution</th>
48          <td>Material</td>
49          <td>Shape of the specular</td>
50        </tr>
51        <tr>
52          <th>Reflection</th>
53          <td>Material</td>
54          <td>Reflection color</td>
55        </tr>
56        <tr>
57          <th>Fresnel</th>
58          <td>Material</td>
59          <td>Transparency</td>
60        </tr>
61      </tbody>
62    </table>
63    <h4>Distribution (shape of the specular component)</h4>
64    <p><I>Distribution</I> is a component used to apply changes to the shape of the specular as a secondary color calculation.</p>
65    <p>The distribution settings are made using a lookup table. Distribution 0 affects Specular Color 0, while Distribution 1 affects Specular Color 1. </p>
66    <p>The following figure shows how the specular shape is controlled using a look-up table.</p>
67    <img class="user_guide_chart" src="../fragment_lighting/assets/fragment_lighting_distribution.png" alt="Distribution"/>
68    <h4>Reflection</h4>
69    <p><I>Reflection</I> is a component used to control the specular color as a secondary color calculation.</p>
70    <p>Reflection is set using a  lookup table.</p>
71    <p>The following figure shows how the specular color is controlled using a look-up table.</p>
72    <img class="user_guide_chart" src="../fragment_lighting/assets/fragment_lighting_reflection.png" alt="Reflection"/>
73    <h4>Fresnel</h4>
74    <p><I>Fresnel</I> is component used to control the material transparency (alpha value) as a secondary color calculation.</p>
75    <p>Fresnel is set using a lookup table.</p>
76    <p>The following figure shows an expression using Fresnel.</p>
77    <img class="user_guide_chart" src="../fragment_lighting/assets/fragment_lighting_fresnel.png" alt="Fresnel"/>
78    <h4>Distance attenuation</h4>
79    <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>
80    <p>The distance attenuation for point lights and spotlights is set using a lookup table.</p>
81    <img class="user_guide_chart" src="assets/lookup_table_distanceattenuat.png" alt="Distance attenuation"/>
82    <h4>Spotlight attenuation</h4>
83    <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>
84    <p>The setting for spotlight attenuation is made using a lookup table.</p>
85    <img class="user_guide_chart" src="assets/lookup_table_spotlightattenuation.png" alt="Spotlight attenuation"/> <a name="input_angle" id="input_angle"></a> 
86<h2>Lookup Table Input Angels</h2>
87<p>This section describes the input angles that can be used with lookup tables.</p>
88<p class="hint_warn">Caution:<br /> If you are using an input angle CP, set the layer configuration to Layer config 7.<br /> If an input angle CP is used with anything other than Layer configuration 7, it will not be applied to the preview.</p>
89    <p>The table below presents all input angles for lookup tables.</p>
90    <table>
91      <thead>
92        <tr>
93          <th>Input Angle Type</th>
94          <th>Description</th>
95          <th>Main Applications</th>
96        </tr>
97      </thead>
98      <tbody>
99        <tr>
100          <th>LN</th>
101          <td>The angle formed from the light vector and the normal vector</td>
102          <td>Diffuse</td>
103        </tr>
104        <tr>
105          <th>NV</th>
106          <td>The angle formed from the normal vector and the view vector</td>
107          <td>Fresnel</td>
108        </tr>
109        <tr>
110          <th>NH</th>
111          <td>The angle formed from the normal vector and the half vector</td>
112          <td>Specular</td>
113        </tr>
114        <tr>
115          <th>VH</th>
116          <td>The angle formed from the view vector and the half vector</td>
117          <td>&nbsp;</td>
118        </tr>
119        <tr>
120          <th>SP</th>
121          <td>The angle formed from the light vector and the spotlight direction vector</td>
122          <td>Spotlight attenuation</td>
123        </tr>
124        <tr>
125          <th>CP</th>
126          <td>The angle formed by the projection of the half vector onto the tangent plane and the tangent vector</td>
127          <td>Anisotropic  reflection</td>
128        </tr>
129      </tbody>
130    </table>
131    <h3>Relationship Between Formed Angle and Input Angles</h3>
132    <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.</p>
133    <p>Each input angle is determined by the angle formed from two vectors. An angle of 180 takes the minimum value for an input angle, while an angle of 0 takes the maximum value.</p>
134    <p>The figure below shows how the input angle relates to the angle between vectors.</p>
135    <img class="user_guide_chart" src="assets/lookup_tables_mechanisminputvalue.png" alt="Relationship Between Formed Angle and Input Angles"/>
136    <h3>Vector Type</h3>
137    <p>The various input angles are determined by different combinations of the six vectors described below.</p>
138    <p>The figure shows all the vectors that form the basis to the input angles.</p>
139    <img class="user_guide_chart" src="assets/lookup_tables_mechanismvector.png" alt="Vector Type"/>
140    <h4>Input angle LN</h4>
141    <p>The LN input angle is determined by the angle formed from the light vector and the normal vector.</p>
142    <p>The LN input angle is mainly used for Diffuse expressions.</p>
143    <p>The figure below shows the angle formed from the light vector and the normal vector.</p>
144    <img class="user_guide_chart" src="assets/lookup_tables_ln.png" alt="Input angle LN"/>
145    <h4>Input angle NV</h4>
146    <p>The NV input angle is determined by the angle formed from the normal vector and the view vector.</p>
147    <p>The NV input angle is mainly used to express water surfaces and glass by changing the reflection ratio (the Fresnel reflection)  based on the angle of view.</p>
148    <p>The figure below shows the angle formed from the normal vector and the view vector.</p>
149    <img class="user_guide_chart" src="assets/lookup_tables_nv.png" alt="Input angle NV"/>
150    <h4>Input angle NH</h4>
151    <p>The NH input angle is determined by the angle formed from the normal vector and the half vector.</p>
152    <p>The NH input angle is mainly used for Specular expressions.</p>
153    <p>The figure below shows the angle formed from the normal vector and the half vector.</p>
154    <img class="user_guide_chart" src="assets/lookup_tables_nh.png" alt="Input angle NH"/>
155    <h4>Input angle VH</h4>
156    <p>The VH input angle is determined by the angle formed from the view vector and the half vector.</p>
157    <p>The figure below shows the angle formed from the view vector and the half vector.</p>
158    <img class="user_guide_chart" src="assets/lookup_tables_vh.png" alt="Input angle VH"/>
159    <h4>Input angle SP</h4>
160    <p>The SP input angle is determined by the angle formed from the inverse vector of the light vector and the spotlight direction vector.</p>
161    <p>The SP input angle is mainly used for Spotlight expressions.</p>
162    <p>The figure below shows the angle formed from the inverse vector of the light vector and the spotlight direction vector.</p>
163    <img class="user_guide_chart" src="assets/lookup_tables_sp.png" alt="Input angle SP"/>
164    <h4>Input angle CP</h4>
165    <p>The CP input angle is determined by the angle formed from the projection of the half vector on the tangent plane (parallel projection ) and the tangent vector.</p>
166    <p>The CP input angle is mainly used for the expression of anisotropic reflection.</p>
167    <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>
168    <img class="user_guide_chart" src="assets/lookup_tables_cp.png" alt="Input angle CP"/>
169    <p class="hint_warn">Caution:<br /> If you are using a CP input angle you need to set the layer configuration to Layer config 7.</p>
170    <!-- InstanceEndEditable --> </div>
171  <div class="footer" />
172</div>
173<hr><p>CONFIDENTIAL</p></body>
174<!-- InstanceEnd -->
175</html>