3dsMax extra light parameters MAX3D extension

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

Max Light Parameters

This <extra> at the <light> level includes extra light parameters supported by ColladaMax to express 3dsMax-specific features.


It is worth mentioning that <ambient> lights are not a standard type of light in 3dsMax. Instead of an ambient light in the scene graph, like COLLADA has, 3dsMax has one global ambient light color parameter. On import, ColladaMax will merge all the ambient lights from the scene graph into one. On export, ColladaMax will create one ambient light in the current visual scene.


The following parameters are present on all three types of light directly supported by 3dsMax: <directional>, <spot> and <point> lights.


Element Attributes supported Description
<decay_type> Enumerated-type value. 0: No decay. 1: Inverse linear decay. 2: Inverse quadratic decay. Decay is not meant to be used with near/far attenuation.
<decay_start> sid Contains one floating-point value. An offset at which to start the light color decay. This element's contents can be animated using the sid attribute.
<use_near_attenuation> Boolean. Whether near attenuation is used. Near attenuation is used to avoid lighting objects close to the light.
<near_attenuation_start> sid Contains one floating-point value. The distance at which the light color starts to increase. Any pixel closer to the light than this distance should not be lit by the light. This element's contents can be animated using the sid attribute. This value should always be smaller than <near_attenuation_end>.
<near_attenuation_end> sid Contains one floating-point value. The distance at which the light color is fully applied to pixels. All pixels further away from the light than this distance will be fully lit unless far attenuation is enabled. This element's contents can be animated using the sid attribute. This value should always be greater than <near_attenuation_start> and if far attentuation is applied, this value should always be smaller than <far_attenuation_start>.
<use_far_attenuation> Boolean. Whether far attenuation is used. Far attenuation is used to avoid lighting objects far from the light.
<far_attenuation_start> sid Contains one floating-point value. The distance at which the light color starts fading. All pixels closer to the light than this distance will be fully lit unless near attenuation is applied. This element's contents can be animated using the sid attribute. If near attenuation is applied, this value should always be greater than <near_attenuation_end>. This value should always be smaller than <far_attenuation_end>.
<far_attenuation_end> sid Contains one floating-point value. The distance at which a light stops affecting pixels. This element's contents can be animated using the sid attribute. This value should always be greater than <far_attenuation_start>.

Examples

   <light id="directional-light">
     <technique_common>
       <directional>
         <color>1 1 1</color>
       </directional>
     </technique_common>
     <extra>
       <technique profile="MAX3D">
         <decay_type>0</decay_type>
         <decay_start>40</decay_start>
         <use_near_attenuation>0</use_near_attenuation>
         <near_attenuation_start>0</near_attenuation_start>
         <near_attenuation_end>40</near_attenuation_end>
         <use_far_attenuation>0</use_far_attenuation>
         <far_attenuation_start>80</far_attenuation_start>
         <far_attenuation_end>200</far_attenuation_end>
       </technique>
     </extra>
   </light>
   <light id="point-light">
     <technique_common>
       <point>
         <color>1 1 1</color>
         <constant_attenuation>1</constant_attenuation>
         <linear_attenuation>0</linear_attenuation>
         <quadratic_attenuation>0</quadratic_attenuation>
       </point>
     </technique_common>
     <extra>
       <technique profile="MAX3D">
         <decay_type>0</decay_type>
         <decay_start>40</decay_start>
         <use_near_attenuation>0</use_near_attenuation>
         <near_attenuation_start>0</near_attenuation_start>
         <near_attenuation_end>40</near_attenuation_end>
         <use_far_attenuation>0</use_far_attenuation>
         <far_attenuation_start>80</far_attenuation_start>
         <far_attenuation_end>200</far_attenuation_end>
       </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>43</falloff_angle>
         <falloff_exponent>0</falloff_exponent>
       </spot>
     </technique_common>
     <extra>
       <technique profile="MAX3D">
         <decay_type>0</decay_type>
         <decay_start>40</decay_start>
         <use_near_attenuation>0</use_near_attenuation>
         <near_attenuation_start>0</near_attenuation_start>
         <near_attenuation_end>40</near_attenuation_end>
         <use_far_attenuation>0</use_far_attenuation>
         <far_attenuation_start>80</far_attenuation_start>
         <far_attenuation_end>200</far_attenuation_end>
       </technique>
     </extra>
   </light>