Common light parameters FCOLLADA extension

From COLLADA Public Wiki
Jump to: navigation, search
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 and ColladaMaya. 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> <aspect_ratio>, <dropoff>, <intensity>, <outer_cone>, <penumbra_angle>, <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.

Moved to the MAX3D profile in 3.04.

<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.

Moved to the MAX3D profile in 3.04.

<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.

Moved to the MAX3D profile in 3.04.

<penumbra_angle> sid Contains one floating point value: the angle of the penumbra relative to the fall-off angle. This element's contents can be animated using the 'sid' attribute.

Deprecated in 3.05. This value has been replaced by a smarter calculation involving the <outer_cone> angle to improve interoperability between ColladaMax and ColladaMaya.

Examples

 <light id="ambient_light">
   <technique_common>
     <ambient>
       <color>1 1 1</color>
     </ambient>
   </technique_common>
   <extra>
     <technique profile="FCOLLADA">
        <intensity sid="intensity">1.0</intensity>
     </technique>
   </extra>
 </light>
 <light id="point_light">
   <technique_common>
     <spot>
       <color>1 1 1</color>
       <constant_attenuation>1</constant_attenuation>
       <linear_attenuation>0</linear_attenuation>
       <quadratic_attenuation>0</quadratic_attenuation>
     </spot>
   </technique_common>
   <extra>
     <technique profile="FCOLLADA">
       <intensity>1</intensity>
     </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>
 <light id="spot_light">
   <technique_common>
     <spot>
       <color>1 1 1</color>
       <constant_attenuation>1</constant_attenuation>
       <linear_attenuation>0</linear_attenuation>
       <quadratic_attenuation>0</quadratic_attenuation>
       <falloff_angle>40</falloff_angle>
       <falloff_exponent>1</falloff_exponent>
     </spot>
   </technique_common>
   <extra>
     <technique profile="FCOLLADA">
       <intensity>1</intensity>
       <outer_cone>45</outer_cone>
       <aspect_ratio>1</aspect_ratio>
       <dropoff>0</dropoff>
       <penumbra_angle>5</penumbra_angle>
       <target_default_dist>240</target_default_dist>
     </technique>
   </extra>
 </light>