Results 1 to 8 of 8

Thread: shader code in exported .dae?

  1. #1
    Junior Member
    Join Date
    Sep 2009
    Posts
    5

    shader code in exported .dae?

    Using latest ColladaMaya (v1.2.0.802) exporting a model from Maya 2008 with a cgfx shader, I was surprised to see the actual cgfx shader code pasted into the .dae, and no mention of the .fx file specified in maya.

    Is there a way to instead store a reference to the .fx? I don't see how embedding the shader code in every exported model would be useful, as I would imagine is almost always the case that shaders should be shared across models, especially in game dev. Also, changing shader code and needing to re-export every asset seems prohibitive.

  2. #2
    Junior Member
    Join Date
    Sep 2009
    Posts
    5

    Re: shader code in exported .dae?

    Also, importing the exported .dae back into maya it seems all material information was lost.

    I got a "No shader data exist!" error on importing.

  3. #3

    Re: shader code in exported .dae?

    Miken,

    you are using the wrong forum. Please read the support section of the website where you downloaded the installer from carefully. It clearly states:
    Support: Please send an email to support@opencollada.org
    It is impossible for us to support users if requests are not directed to us.

    Sebastian

  4. #4
    Junior Member
    Join Date
    Sep 2009
    Posts
    5

    Re: shader code in exported .dae?

    Sorry for that, will do. Was hoping maybe other users had similar experiences and wanted to discuss.

  5. #5
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771

    Re: shader code in exported .dae?

    Quote Originally Posted by miken
    Is there a way to instead store a reference to the .fx?
    In COLLADA 1.5, the <profile_BRIDGE> element is used to reference external FX systems like DirectX FX and CgFX. Note that <profile_CG> is for Cg not CgFX.
    Quote Originally Posted by miken
    I don't see how embedding the shader code in every exported model would be useful, as I would imagine is almost always the case that shaders should be shared across models, especially in game dev. Also, changing shader code and needing to re-export every asset seems prohibitive.
    In COLLADA, effects are assets that are referenced by URL and are inherently sharable. You can create a .dae document that contains only a library of effects. Each effect can be described by one or more profiles as well. Check your tool's import/export options to see if it supports the work flows you want.

  6. #6
    Junior Member
    Join Date
    Sep 2009
    Posts
    5

    Re: shader code in exported .dae?

    Thanks marcus.

    Does anyone know of any Maya exporter that supports Collada 1.5 and referencing effects as an external .dae?

    I don't believe ColladaMaya does.

  7. #7
    Senior Member
    Join Date
    Aug 2004
    Location
    California
    Posts
    771

    Re: shader code in exported .dae?

    OpenCOLLADA does.

  8. #8
    Junior Member
    Join Date
    Sep 2009
    Posts
    5

    Re: shader code in exported .dae?

    Thanks, I finally got around to trying out OpenCOLLADA - it looks like it does exactly what I was looking for

    Cheers

Posting Permissions

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