0

I'm struggling to see how I should use material and lighting values obtained from 3DS Max to recreate similar lighting. I am taking the material and lighting from a Collada file exported from 3DS Max and using them to render a scene in OpenGL. The scene is rendered using a Blinn-Phong shader. However the scene always ends up way to bright.

The light data from 3DS max seems quite odd to me. It consists of two lights, an ambient light and a directional light which only has a single colour. As I was not quite sure what this single colour relates to I've applied it to both the diffuse and specular components of the light.

Anyways, does anyone know if there is something odd with the 3DS Max/Collada material and lighting data? Or have you used it successfully with no problems meaning that I'm simply doing something wrong?

Edit #1

As requested, heres the material/lighting info from collada. I'm afraid I cannot post any screenshots, however the scene is coming out painfully bright, e.g Oranges becoming bright yellow. The specular values in particular seem very high, yet they seem to work fine in Max...

Collada Material:

<library_effects>
<effect id="WorldTexture">
  <profile_COMMON>
    <newparam sid="world_texture_png-surface">
      <surface type="2D">
        <init_from>world_texture_png</init_from>
      </surface>
    </newparam>
    <newparam sid="world_texture_png-sampler">
      <sampler2D>
        <source>world_texture_png-surface</source>
      </sampler2D>
    </newparam>
    <technique sid="common">
      <blinn>
        <emission>
          <color>0 0 0 1</color>
        </emission>
        <ambient>
          <color>0.588 0.588 0.588 1</color>
        </ambient>
        <diffuse>
          <texture texture="world_texture_png-sampler" texcoord="CHANNEL1"/>
        </diffuse>
        <specular>
          <color>0.9 0.9 0.9 1</color>
        </specular>
        <shininess>
          <float>10</float>
        </shininess>
        <reflective>
          <color>0 0 0 1</color>
        </reflective>
        <transparent opaque="A_ONE">
          <color>1 1 1 1</color>
        </transparent>
        <transparency>
          <float>1</float>
        </transparency>
      </blinn>
    </technique>
  </profile_COMMON>
  <extra>
    <technique profile="OpenCOLLADA3dsMax">
      <extended_shader>
        <apply_reflection_dimming>0</apply_reflection_dimming>
        <dim_level>0</dim_level>
        <falloff_type>0</falloff_type>
        <index_of_refraction>1.5</index_of_refraction>
        <opacity_type>0</opacity_type>
        <reflection_level>3</reflection_level>
        <wire_size>1</wire_size>
        <wire_units>0</wire_units>
      </extended_shader>
      <shader>
        <ambient_diffuse_lock>1</ambient_diffuse_lock>
        <ambient_diffuse_texture_lock>1</ambient_diffuse_texture_lock>
        <diffuse_specular_lock>0</diffuse_specular_lock>
        <soften>0.1</soften>
        <use_self_illum_color>0</use_self_illum_color>
      </shader>
    </technique>
  </extra>
</effect>

Collada Lights:

<library_lights>
<light id="EnvironmentAmbientLight" name="EnvironmentAmbientLight">
  <technique_common>
    <ambient>
      <color>0.6235294 0.6235294 0.6235294</color>
    </ambient>
  </technique_common>
</light>
<light id="FDirect001-light" name="FDirect001">
  <technique_common>
    <directional>
      <color>0.937255 0.7921569 0.5411765</color>
    </directional>
  </technique_common>
  <extra>
    <technique profile="OpenCOLLADA3dsMax">
      <max_light>
        <aspect_ratio>1</aspect_ratio>
        <atmosphere_color_amount>1</atmosphere_color_amount>
        <atmosphere_on>0</atmosphere_on>
        <atmosphere_opacity>1</atmosphere_opacity>
        <attenuation_far_end>100</attenuation_far_end>
        <attenuation_far_start>80</attenuation_far_start>
        <attenuation_near_end>26.8</attenuation_near_end>
        <attenuation_near_start>0</attenuation_near_start>
        <contrast>0</contrast>
        <decay_falloff>40</decay_falloff>
        <decay_type>0</decay_type>
        <diffuse_soften>0</diffuse_soften>
        <falloff>902</falloff>
        <hotspot_beam>900</hotspot_beam>
        <multiplier>0.5</multiplier>
        <overshoot>0</overshoot>
        <shadow_density>1</shadow_density>
        <shadow_map>0</shadow_map>
        <target_distance>440</target_distance>
        <use_far_attenuation>0</use_far_attenuation>
        <use_near_attenuation>0</use_near_attenuation>
      </max_light>
    </technique>
  </extra>
</light>
</library_lights>
Edric
  • 24,639
  • 13
  • 81
  • 91
AzCopey
  • 430
  • 3
  • 12
  • Could you post relevant sections of the exported file (as text - perhaps ASE) and screenshots from your app vs MAX? – Ani Jun 21 '12 at 16:36
  • @ananthonline I've edited my post with the info you've asked for. – AzCopey Jun 22 '12 at 09:11
  • Its an old question but your `EnvironmentAmbientLight's` color should be `1 1 1`. If you use lighter color, model will be brighter. – Blind Ninja May 24 '16 at 07:40

0 Answers0