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.

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.

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

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

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.

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.

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.

OpenCOLLADA does.

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

Cheers