Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Exporting CGFX shaders into maya2008

  1. #1
    Join Date
    Oct 2008
    Posts
    7

    Default Exporting CGFX shaders into maya2008

    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.

  2. #2
    Join Date
    Sep 2008
    Posts
    4

    Default

    what's the specific problem? have you got the CGFX plugin loaded in Maya?

  3. #3
    Join Date
    Oct 2008
    Posts
    7

    Default

    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.

  4. #4
    Join Date
    Jun 2007
    Location
    Berlin
    Posts
    447

    Default

    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

  5. #5
    Join Date
    Oct 2008
    Posts
    7

    Default error message

    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: //

  6. #6
    Join Date
    Oct 2008
    Posts
    7

    Default falloff

    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. //

  7. #7
    Join Date
    Jun 2007
    Location
    Berlin
    Posts
    447

    Default

    What I wonder is, that the first line says:

    // CgFX compilation successful for file: ...
    * Which Maya version are you using?
    * 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

  8. #8
    Join Date
    Oct 2008
    Posts
    7

    Default cg DLLs

    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?

  9. #9
    Join Date
    Oct 2008
    Posts
    7

    Default

    I'm using Maya 2008

  10. #10
    Join Date
    Jun 2007
    Location
    Berlin
    Posts
    447

    Default

    Just try replacing cg.dll and cgGL.dll which are located under

    C:\Program Files\Autodesk\Maya2008\bin

    - Ruediger

Posting Permissions

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