Results 1 to 2 of 2

Thread: Material transparency

  1. #1
    Junior Member
    Join Date
    Mar 2006
    Location
    Mountain View, CA
    Posts
    4

    Material transparency

    I'm trying to understand how to interpret the <transparency> and <transparent> elements in some of the default materials.

    The phong material has:
    <transparent>RGBA</transparent>
    <transparency>0..1</transparency>
    and the diffuse color has an alpha component.

    For materials in DirectX and OpenGL, the opacity of the object usually goes in the alpha component of the diffuse color.

    I may be misunderstanding the collada spec, but my reading of the spec
    is that the transparent and transparency elements allow you to take
    into account the color and intensity of refracted light when computing
    the color of a surface. The spec says that the refracted light is
    added to the reflected light. This is something that the standard DX
    and OGL lighting models do not account for.

    However, I think the Max, Maya, and SoftImage exporters are
    using the <transparent> and <transparency> elements just to control
    the opacity of a material. They either set <transparency> to 1.0 and
    use a gray-scale color for <transparent>, or vice versa. This may be
    a way of working around a deficiency in the collada spec that does
    not allow you to specify both a diffuse color and a diffuse texture.
    If you don't look at the transparency/transparent elements, the only
    way to have a partially transparent textured object would be to
    hard-code the transparency in the alpha channel of the texture.

    How are other people handling this? I don't care about refracted light in my shading, but I do want to be able to set a constant opacity for textured objects.

  2. #2
    Senior Member
    Join Date
    Jul 2004
    Location
    Santa Clara
    Posts
    356
    Hi Brent,

    this post may have the information you are looking for.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •