Home Technical Talk

[Maya 2009] Rendering + Melscript

polycounter lvl 14
Offline / Send Message
sama.van polycounter lvl 14
Hello...

I am having some problem to set an output directory for my rendering settings...

I played with the "defaultRenderGlobals" node but nothing here...

I also checked the documentation and nothing to set a directory in the "render" or "Mayatomr" commands...


I just want to do a render from a camera and then to drop the render in a wanted directory...

Both Maya software or Mentalray, I do not mind, I take the first it works :)


Thank you for your help T_T...

Replies

  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Hah, yeah, welcome to the fun of this!
    I've had the same issues, what I ended up doing was just letting it output the render to the current project's default folder (usually /images/ if I remember right), then using the sys command to copy the image to the correct location afterward.

    Seems to work fine, although it feels like a massive hack not being able to specify an output location for a single render. It always seems to want to use the Project settings and you can't override that.

    You'd probably have to make your script Set the current Project to the correct location, then set the Images project folder to the appropriate subdirectory (or maybe "" if you want the image in the root folder). I haven't tried that yet, though.
  • animatr
    Options
    Offline / Send Message
    animatr polycounter lvl 18
    yup. What MoP said is what I do. I set my project to be the desired path and then it outputs to that automatically. I remember searching for like 2 hours on how to specify with a flag, a direct path. seems so dumb that isn't in there,
  • sama.van
    Options
    Offline / Send Message
    sama.van polycounter lvl 14
    Hahah thanks guys!

    Yes I was thinking about the system command but... raaaaa Mayaaa.....
  • Illusions
    Options
    Offline / Send Message
    Illusions polycounter lvl 18
    Several options to choose from:

    1. If you're rendering in Windows, you can initiate a batch render via .bat files, which also happen to allow you to choose where to output files to. The only limitation being that while you can choose where to output images to, if you're using render layers, rendered images will be placed in a folder named after the render layer in that output folder location. For example if you wanted to render to folder C:/myRenderFolder/images/ and were rendering a file with a render layer called layer_01, images that resulted from rendering that layer would end up in C:/myRenderFolder/images/layer_01/

    Here are some links to get started:

    Tutorial on how to batch render using .bat files

    List of Common Maya Render Flags

    A List of More Specific Flags

    How to stop a command line render*

    *Note: Where the instructions refer to Render.exe, more often than not it will be mayabatch.exe instead


    2. If you're content to place images in whatever project folder you're currently using: link


    3. When editing your project, instead of putting in a relative path for images, type in an absolute path, ie. C : \aFolderName\example\etc\

    No spaces between the C the : and the \ though, I only put those in because otherwise it would look like an emoticon... :\

    Hope this helps. I'm not completely sure of what the problem is though, is there a particular instance where you would want images from a render to not be in a folder in the project directory you've setup?
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Illusions: You might open a random scene file and want to dump out images into the same folder as the scene file. If your project is not set (or different) at this point, then it's a pain to try and get the Project setup to match.

    Thanks for the links!
  • Lamont
    Options
    Offline / Send Message
    Lamont polycounter lvl 15
    You can get the directory of the file with a command and instead of doing outPutFileName.ext, do DriveLetter:/Full/Path/To/File/outPutFileName.ext. Solved my problems for getting Maya to spit things out where I wanted them via Mel.
Sign In or Register to comment.