Home Technical Talk

Maya scene won't load CgFX

polycounter lvl 11
Offline / Send Message
stickadtroja polycounter lvl 11
So I created this environment scene in Maya 2011, and use two different CgFX shaders for all the objects, one that allows for texture blending and one for everything else. So I saved everything in one folder, and moved the CgFX files and all the textures there, beacuse I want somebody else to be able to open the scene without reconfigure any of the shaders.

But I tested it on my friends computer, by sending him the project folder with everything in it, and he opens it in maya 2011, but the everything is wrong. The CgFX shaders won't work. They are displayed in the Hypershade as a "uknown" object, even though he has the CgFX plugin loaded. Why doesn't it work?

When I move the folder around on my on computer there is no problem opening the scene, and I made sure all the filepaths for both shaders and textures goes to the project folder.

Please help me polycount!

Replies

  • stickadtroja
    Options
    Offline / Send Message
    stickadtroja polycounter lvl 11
    i was thinking that maybe there is a way of exporting the shaders... dont know if im on the right track though?

    Anyone who knows?
  • throttlekitty
    Options
    Offline / Send Message
    I'm a bit stumped. You sent him the scene file + shader file + textures? The only thing I can think of is that the paths are different on his system, or that the scene references to the external files are absolute, not relative to your project folder. eg: c:\long\path\to\projects\turkeyassassin\file.ext as opposed to /projects/turkeyassassin/file.ext
  • kodde
    Options
    Offline / Send Message
    kodde polycounter lvl 18
    I do recollect having seen this issue. Can't remember if it was sorted or not. What's throwing me of is the fact that the shaders don't show up as empty CGFX shader nodes (empty since file can't be found). Instead they are showing up as "unknown" shaders. As if the CGFX plugin is not functioning correct.

    I have a weird suggestion. Try opening Maya first, then open your file through the Maya interface. That is, do not open Maya by doubleclicking the file through your OS interface. Why? Cause Maya takes a few seconds to properly load the CGFX plugin. What if Maya hasn't managed to load the plugin fast enough as it is starting the application and immediately loading the scene.
  • stickadtroja
    Options
    Offline / Send Message
    stickadtroja polycounter lvl 11
    THANKS so much for the replies!

    throttlekitty: i thought of this and made sure that all the paths was relative... i could of course missed one or two but it shouln't made all the materails in the scene broken.

    i made some progress. another friend tried to open it and now some of the materials work. actually only the koddeshader nodes are pink. the other shader loads fine, and its also a cgfx.
    heres two screenshots with the pink nodes.

    IMG_21082012_111254.png

    as you can see ground loads fine. all the other ones are standard lamberts used as placehoders...

    IMG_21082012_111847.png

    and as you can see, its able to find the koddeshader, cuz that path is right in the last picture, but it still shows up as pink?

    my problem before was suggested by friend that the other guy has the wrong graphics card that dont work to well with cgfx. so that could be the reason for the "unkown" nodes.

    btw i just want to point out that im very grateful for using the koddeshader, and the other one aswell, free shaders saves a poor jobseeker like me a world of trouble!
  • throttlekitty
    Options
    Offline / Send Message
    Actually, a better question for your friend is if they can create cgfx nodes/shader attachments in their own scene with no issues.

    Just a thought - I had an issue with importing objs via drag and drop when Maya was started via a desktop shortcut. Microsoft UAC actually can get in the way, even when disabled, koddes post reminded me a little of that.
  • stickadtroja
    Options
    Offline / Send Message
    stickadtroja polycounter lvl 11
    turns out that you were right, both of you. my first friend, who got the "unkown" nodes, opened it from the file->open and it worked like a charm. you wouldnt know how reliefed i am. totally saved my day.

    but the other guy, with the pink nodes, he still cant get it to work. so i asked him to download a new samle of koddeshader, and make a new cgfx node in the hypershade and try it out. he got all kinds of errors. heres a pic:
    IMG_21082012_132406.png

    doesn't affect me though so just if kodde was intrested.

    thanks guys! im super happy right now! :)
  • kodde
    Options
    Offline / Send Message
    kodde polycounter lvl 18
    Glad it worked out.

    The CGFX shaders can use different profiles for the Vertex Shader and the Pixel Shader. They are defined at the bottom of the .cgfx file. Sounds like your second mate didn't have a GFX card that would support the profiles used in the shader. You might be able to use different profiles without any major difference in the shading results.
Sign In or Register to comment.