Results 1 to 4 of 4

Thread: lighting texture

  1. #1
    woodi
    Guest

    lighting texture

    Hi folks,
    I wonder whether collada supports using textures on lights i.e. a projector or the flashlight from doom3 . I have already consulted the specs but something like that is not meantioned there.
    Any suggestions?

    Regards,
    Stefan

  2. #2
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771
    In general, have a look at how COLLADA FX represents shaders with textures in the COLLADA 1.4.1 Release Notes Revision A.

    For the actual shader, you'll want to use a projected texture "light shader"... e.g: Projected Texture simple overview

    If you want to associate the texture with a specific light (as opposed to a full-screen effect), you can add an <extra> element that contains the texturing information to the <light> that you want to project the texture from.

  3. #3
    woodi
    Guest
    Hi,
    thanks for the reply first . I think the last part of it answered what I
    wanted to now. I'm rather new to collada and sometimes still not quite
    sure of how to express certain things correctly.

    Since I want to use a shader with my light source I would probably go for something like this, right?:
    Code :
    <light name=".." id="..'>
     <technique_common>
      ... 
     </technique_common>
     <extra>
      <technique_common>
       <instance_effect url="...">
        ...
       </instance_effect>
      </technique_common>
     </extra>
    </light>
    Where the specified effect contains the shader and its setup.

  4. #4
    Senior Member
    Join Date
    Aug 2005
    Location
    California
    Posts
    165
    You shouldn't use <technique_common> in your <extra>. What you are trying to do isn't part of COLLADA's common profile and it would be very misleading.
    It wouldn't be valid anyways. The only child allowed in <extra> is <technique> with a profile attribute to identify the profile.
    Code :
    <extra>
      <technique profile="mySpecialProfile" >
        <instance_effect url="...">
       ...

    -Andy

Posting Permissions

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