Difference between revisions of "Common light parameters FCOLLADA extension"

From COLLADA Public Wiki
Jump to navigation Jump to search
m
Line 61: Line 61:
 
   </light>
 
   </light>
  
   <light id="directionalLightShape1-lib" name="directionalLightShape1">
+
   <light id="directional_light">
 
     <technique_common>
 
     <technique_common>
 
       <directional>
 
       <directional>

Revision as of 02:50, 21 June 2007

Extension information
  • Purpose: unstated
  • Company(s): Feeling Software
  • Product(s): [[FCollada]]
  • Last updated: unstated
  • Contact for technical issues:
This article is part of the COLLADA extensions directory
Adding to the extensions directory

Common Light Parameters

This <extra> at the <light> level includes common light parameters supported directly by the FCollada library and used within ColladaMax, ColladaMaya and/or the Feeling Viewer. Each standard type of light has its own additional common light parameters.

Light type Elements Supported
<ambient> <intensity>
<point> <intensity>
<directional> <aspect_ratio>, <constant_attenuation>, <falloff_angle>, <falloff_exponent>, <intensity>, <linear_attenuation>, <quadratic_attenuation>, <target_default_dist>, <outer_cone>, <overshoot>
<spot> <intensity>, <target_default_dist>


Element Attributes supported Description
<aspect_ratio> sid Contains one floating point value: the aspect-ratio of the ellipsoidal or rectangular form of a spot light or a restricted directional light. This element's contents can be animated using the 'sid' attribute.
<constant_attenuation> sid See the element of the same name in the COLLADA specification. This can be used with restricted directional lights.
<falloff_angle> sid See the element of the same name in the COLLADA specification. Contains one floating point value: the absolute inner angle of the spot light or restricted directional light. This can be used with restricted directional lights.
<falloff_exponent> sid See the element of the same name in the COLLADA specification. This can be used with restricted directional lights.
<intensity> sid Contains one floating point value: a multiplicative factor for the light's color. This element's contents can be animated using the 'sid' attribute.
<linear_attenuation> sid See the element of the same name in the COLLADA specification. This can be used with restricted directional lights.
<quadratic_attenuation> sid See the element of the same name in the COLLADA specification. This can be used with restricted directional lights.
<target_default_dist> sid Contains one floating point value: the default distance of the expected light target for non-targeted lights. For targeted lights, this element should not be present. This element's contents can be animated using the 'sid' attribute.
<outer_cone> sid Contains one floating point value: the absolute outer angle of the spot light or restricted directional light. This element's contents can be animated using the 'sid' attribute.
<overshoot> Contains one boolean value: whether the directional light is restricted. Overshooting directional lights are the OpenGL standard. Restricted directional lights give a positional, ellipsoidal beam of light.

Examples

 <light id="ambient_light">
   <technique_common>
     <ambient>
       <color>1 1 1</color>
     </ambient>
   </technique_common>
   <extra>
     <technique profile="FCOLLADA">
        < !-- The animation target pointer for this element would be: 'ambient_light/intensity' -- >
        <intensity sid="intensity"> 1.0 </intensity>
        <target_default_dist> 240 </target_default_dist>
     </technique>
   </extra>
 </light>
 <light id="directional_light">
   <technique_common>
     <directional>
       <color>1 1 1</color>
     </directional>
   </technique_common>
   <extra>
     <technique profile="FCOLLADA">
       <constant_attenuation>1</constant_attenuation>
       <linear_attenuation>0</linear_attenuation>
       <quadratic_attenuation>0</quadratic_attenuation>
       <falloff_angle>30</falloff_angle>
       <falloff_exponent>0</falloff_exponent>
       <intensity>1</intensity>
       <outer_cone>35/outer_cone>
       <aspect_ratio>1</aspect_ratio>
       <overshoot>0</overshoot>
       <target_default_dist>240</target_default_dist>
     </technique>
   </extra>
 </light>