269
edits
Line 255: | Line 255: | ||
|- | |- | ||
|<tt>object-name</tt> | |<tt>object-name</tt> | ||
|Name of the light volume | |Name of the light volume in the 3d model (typically a cone with an apex at <tt>position</tt>, along <tt>direction</tt> axis if <tt>cutoff</tt> is lesser than 90 degrees, or a sphere centered at <tt>position</tt> if <tt>cutoff</tt> is greater than 90 degrees ) | ||
|- | |- | ||
|<tt>position</tt> | |<tt>position</tt> | ||
Line 281: | Line 281: | ||
|<tt>cutoff</tt> | |<tt>cutoff</tt> | ||
|point is lit by this source if <tt>dot( lightDir, <direction> ) > <cutoff></tt> , lightDir being vector from light position to point, in camera space. | |point is lit by this source if <tt>dot( lightDir, <direction> ) > <cutoff></tt> , lightDir being vector from light position to point, in camera space. | ||
|- | |||
|<tt>near-m</tt> | |||
| | |||
|- | |||
|<tt>far-m</tt> | |||
| | |||
|} | |||
|} | |||
==== Point lights (not implemented yet) ==== | |||
{|cellpadding=10| | |||
|valign=top| | |||
<pre> | |||
<animation> | |||
<type>light</type> | |||
<light-type>point</light-type> | |||
<name>LightSrcRight</name> | |||
<object-name>LightRight</object-name> | |||
<position> | |||
<x>0.169</x> | |||
<y>0.570</y> | |||
<z>0.713</z> | |||
</position> | |||
<ambient> | |||
<r>0.03</r> | |||
<g>0.03</g> | |||
<b>0.03</b> | |||
<a>1.0</a> | |||
</ambient> | |||
<diffuse> | |||
<r>0.7</r> | |||
<g>0.7</g> | |||
<b>0.6</b> | |||
<a>1.0</a> | |||
</diffuse> | |||
<specular> | |||
<r>0.7</r> | |||
<g>0.7</g> | |||
<b>0.7</b> | |||
<a>1.0</a> | |||
</specular> | |||
<attenuation> | |||
<c>1.0</c> | |||
<l>0.002</l> | |||
<q>0.00005</q> | |||
</attenuation> | |||
<near-m>3.5</near-m> | |||
<far-m>39</far-m> | |||
</animation> | |||
</pre> | |||
|valign=top| | |||
{|border="1" cellspacing="0" cellpadding="3" | |||
!Name | |||
!Purpose | |||
|- | |||
|<tt>type</tt> | |||
|Install the <tt>'''light'''</tt> animation | |||
|- | |||
|<tt>light-type</tt> | |||
|This is a <tt>'''point'''</tt> light | |||
|- | |||
|<tt>name</tt> | |||
|Name given to this animation | |||
|- | |||
|<tt>object-name</tt> | |||
|Name of the light volume in the 3d model (typically a sphere centered on <tt>position</tt>, with a radius of <tt>far-m</tt>) | |||
|- | |||
|<tt>position</tt> | |||
|In object space, position of the light | |||
|- | |||
|<tt>ambient</tt> | |||
|Ambient color of the light | |||
|- | |||
|<tt>diffuse</tt> | |||
|Diffuse color of the light | |||
|- | |||
|<tt>specular</tt> | |||
|Specular color of the light | |||
|- | |||
|<tt>attenuation</tt> | |||
|Three element vector. <c> element is the constant factor, <l> element is the linear factor and <q> element is the quadratic factor.<br /> | |||
Attenuation of color at distance d is [[File:Spotlight_attenuation.png]] | |||
|- | |- | ||
|<tt>near-m</tt> | |<tt>near-m</tt> |
edits