I can't export my CGFX shaders into Maya, can you help? i followed the instructions on the user guide, either trying exporting to a maya or CGFX file, with no success.
Can you help please?
In advance, Thank you for your hadvice.
I can't export my CGFX shaders into Maya, can you help? i followed the instructions on the user guide, either trying exporting to a maya or CGFX file, with no success.
Can you help please?
In advance, Thank you for your hadvice.
what's the specific problem? have you got the CGFX plugin loaded in Maya?
yes, the CGFX plugin is loaded in Maya.. although it crashes Maya when we try to use it.
We're actually using the Feeling Software Collada plug in because of the game engine we use. When I try to load a CGFX made with Mental Mill (as opposed to one supplied by a coder) it doesn't work, and Maya crashes: "fatal error", without more detail why.
Does this happen with any type of shader or only shaders that use certain features (like bump mapping, for example)?
To me it looks like that maya is using a deprecated cg compiler .dll. If you have the cg Toolkit installed, you could try replacing Mayas cg.dll and cgGL.dll with the dll's coming from the toolkit.
Be sure to make a safe copy though
It would be interesting to know whether you can run for example the component_falloff shader. If that works this indicates that some shader features cause the cg compiler to fail.
Best Regards,
Ruediger
out of interest, this is the error I get, when exporting the simplest of phong shaders:
// CgFX compilation successful for file: E:/pitches/barbarian/shadertest/export test.cgfx
// Error: CG ERROR : Invalid stateassignment handle. //
// Error: //
// cgfxShaderNode::cgErrorCallBack
// Error: CG ERROR : Invalid stateassignment handle. //
// Error: //
// Error: CG ERROR : Invalid program handle. //
// Error: //
// cgfxShaderNode::cgErrorCallBack
// Error: CG ERROR : Invalid program handle. //
// Error: //
// Error: CG ERROR : Invalid program handle. //
// Error: //
// cgfxShaderNode::cgErrorCallBack
// Error: CG ERROR : Invalid program handle. //
// Error: //
// Error: CG ERROR : The compile returned an error. //
// Error: //
// cgfxShaderNode::cgErrorCallBack
// Error: CG ERROR : The compile returned an error. //
// Error: //
// Error: CG ERROR : Invalid stateassignment handle. //
// Error: //
// cgfxShaderNode::cgErrorCallBack
// Error: CG ERROR : Invalid stateassignment handle. //
// Error: //
// Error: CG ERROR : Invalid program handle. //
// Error: //
// cgfxShaderNode::cgErrorCallBack
// Error: CG ERROR : Invalid program handle. //
// Error: //
// Error: CG ERROR : Invalid program handle. //
// Error: //
// cgfxShaderNode::cgErrorCallBack
// Error: CG ERROR : Invalid program handle. //
// Error: //
// Error: CG ERROR : The compile returned an error. //
// Error: //
// cgfxShaderNode::cgErrorCallBack
// Error: CG ERROR : The compile returned an error. //
// Error: //
// Error: CG ERROR : Invalid program handle. //
// Error: //
// cgfxShaderNode::cgErrorCallBack
// Error: CG ERROR : Invalid program handle. //
// Error: //
and this is the error from exporting the falloff shader (the same?):
// CgFX compilation successful for file: E:/pitches/barbarian/shadertest/component_falloff.cgfx
// Error: CG ERROR : Invalid stateassignment handle. //
// Error: //
// cgfxShaderNode::cgErrorCallBack
// Error: CG ERROR : Invalid stateassignment handle. //
// Error: //
// Error: CG ERROR : Invalid program handle. //
// Error: //
// cgfxShaderNode::cgErrorCallBack
// Error: CG ERROR : Invalid program handle. //
// Error: //
// Error: CG ERROR : Invalid program handle. //
// Error: //
// cgfxShaderNode::cgErrorCallBack
// Error: CG ERROR : Invalid program handle. //
// Error: //
// Error: CG ERROR : The compile returned an error. //
// Error: //
// cgfxShaderNode::cgErrorCallBack
// Error: CG ERROR : The compile returned an error. //
// Error: //
// Error: CG ERROR : Invalid stateassignment handle. //
// Error: //
// cgfxShaderNode::cgErrorCallBack
// Error: CG ERROR : Invalid stateassignment handle. //
// Error: //
// Error: CG ERROR : Invalid program handle. //
// Error: //
// cgfxShaderNode::cgErrorCallBack
// Error: CG ERROR : Invalid program handle. //
// Error: //
// Error: CG ERROR : Invalid program handle. //
// Error: //
// cgfxShaderNode::cgErrorCallBack
// Error: CG ERROR : Invalid program handle. //
// Error: //
// Error: CG ERROR : The compile returned an error. //
// Error: //
// cgfxShaderNode::cgErrorCallBack
// Error: CG ERROR : The compile returned an error. //
// Error: //
// Error: CG ERROR : Invalid program handle. //
// Error: //
// cgfxShaderNode::cgErrorCallBack
// Error: CG ERROR : Invalid program handle. //
// Error: //
// Warning: There are no lights in the scene. //
What I wonder is, that the first line says:
* Which Maya version are you using?// CgFX compilation successful for file: ...
* Did you already try to replace cg.dll and cgGL.dll ?
It still looks like there's something weird going on in the maya cgFX node itself.
- Ruediger
As for the DLLs, I have isntalled the Nvidia CG toolkit, if that's what you're referring to. so in C:\Program Files\NVIDIA Corporation\Cg\bin i have
cg.dll
cgc.dll
cgD3D8.dll
cgD3D9.dll
cgGL.dll
glut32.dll
msvcp71.dll
msvcr71.dll
Are you advising me to copy them somewhere in the maya folder? I can't find them in C:\Program Files\Autodesk\Maya2008. where do you say I have to copy them to?
I'm using Maya 2008
Just try replacing cg.dll and cgGL.dll which are located under
C:\Program Files\Autodesk\Maya2008\bin
- Ruediger