Simply Maya User Community

Simply Maya User Community (https://simplymaya.com/forum/index.php)
-   Lighting & Rendering (https://simplymaya.com/forum/forumdisplay.php?f=17)
-   -   HUGE rendering problem - batch render different than single frame (https://simplymaya.com/forum/showthread.php?t=33608)

rodrigocastro1 20-01-2015 08:20 PM

Quote:

Originally Posted by NextDesign (Post 357573)
Hi Rodrigo, When exactly does Maya crash?

Right after the first frame finishes rendering. It saves the files (I'm rendering vray elements) and after that, it immediately crashes (fatal error and closes).

Thanks for the quick response by the way.

NextDesign 21-01-2015 03:28 PM

Hmmm... Could you try disabling the V-Ray frame buffer and then trying it again? What OS are you running Maya on?

rodrigocastro1 21-01-2015 04:37 PM

I've just ended a support chat with Chaos Group. Apparently there is a bug in first Vray 3.0 version. As soon as I can, I'll test your code to see if it is fixed with what they did. Thank you very much

harishankar 29-08-2015 05:38 AM

@NextDesign

Hey man, Thanks for this wonderful script. I have a doubt in what are all i have to change. I am new to this. So having total confusion.

I started to change the values in yellow, then got confused totally. Kindly help.
Thanks a lot

NextDesign 30-08-2015 02:28 PM

Quote:

Originally Posted by harishankar (Post 359493)
I started to change the values in yellow, then got confused totally.

Hi Harishankar,

All you really need to change are the numbers on these lines:

Code:

int $startFrame = 3;
int $endFrame = 24;

Start frame is the first frame to render, and end frame is the last frame to render. The script will render all values in-between. Make sure that you keep the semicolon ; as MEL requires this. Also be sure to execute this script in the MEL lab of the script editor, and not the python tab.

Let me know if you're still stuck.

-John

harishankar 31-08-2015 02:45 AM

Quote:

Originally Posted by NextDesign (Post 359502)
Hi Harishankar,

All you really need to change are the numbers on these lines:

Code:

int $startFrame = 3;
int $endFrame = 24;

Start frame is the first frame to render, and end frame is the last frame to render. The script will render all values in-between. Make sure that you keep the semicolon ; as MEL requires this. Also be sure to execute this script in the MEL lab of the script editor, and not the python tab.

Let me know if you're still stuck.

-John


Thanks mate. I started modifying few more, that's why i was getting error. It works like a charm now.

Once again thanks, you saved my day.

blacko0ps 05-11-2015 01:11 AM

Hi NextDesign,

Thank you so much for your awesome script!! However, it seems I can't get it to work correctly with Renderman and "it" render viewer. It does render the image, but much smaller resolution than the actual resolution in the render settings. Even, when I increase the size, still it doesn't change. Also, it doesn't save the renders. I would appreciate if you could help.

Thanks

NextDesign 30-11-2015 05:51 PM

Hi blacko0ps, sorry for the delay.

Do you have a test resolution defined? (https://knowledge.autodesk.com/suppo...frame-htm.html)

murambi 10-03-2016 01:30 PM

Hi John,
Been using this script for a few years now but I keep running into memory problems. When I render a scene with hundreds and hundreds of frames, maya crashes because of memory problems. My server has 68GB of RAM, so I was wondering whether or not anyone else is having this problem?

HeshamBonzi 26-02-2017 07:04 AM

Quote:

Originally Posted by NextDesign (Post 312967)
Wow, it seems this script has attracted quite a bit of attention :)

Here is a fixed version that will allow rendering in multiple renderers, as well as work in Maya 2011!

Code:

// Batch rendering workaround - John Mather (NextDesign)
string $filename = "render";
string $cameraName = "persp";

int $startFrame = 1;
int $endFrame = 3;

string $directory = (`workspace -q -rd` + "images/");

for ($i = $startFrame; $i <= $endFrame; $i++)
{
    currentTime $i;

    // Old version
    // render -x `getAttr defaultResolution.width` -y `getAttr defaultResolution.height` $cameraName;
   
    // New version - supports MR and other renderers!   
    renderWindowRender redoPreviousRender renderView;
   
    string $concatFilename = $directory + $filename + "." + $i;

    if (`getApplicationVersionAsFloat` >= 2011)
        // Thanks to nowayfra on creativecrash for his workaround
        catch(eval(renderWindowSaveImageCallback ("renderView", $concatFilename, `getAttr defaultRenderGlobals.imageFormat`)));
    else
        renderWindowSaveImageCallback ("renderView", $concatFilename, `getAttr defaultRenderGlobals.imageFormat`);

    print ("Saved " + $concatFilename + "\n");
}

print ("Completed rendering of " + ($endFrame - $startFrame) + " frames.\n");

P.s. Many thanks goes out to nowayfra on CreativeCrash for his Maya 2011 fix! (http://www.creativecrash.com/forums/...on_post_306312)

Edit: Fixed a small bug that would stop all frames from being rendered.

wow the script is working very well , but the problem now is that the extension of the images is saving as an ISO image !! lol how does it happens ?!
I set render settings to be the output render image is .png
please help. I need to save as .png or .psd better
Thanks.

NextDesign 27-02-2017 11:27 PM

Quote:

Originally Posted by HeshamBonzi (Post 362471)
wow the script is working very well , but the problem now is that the extension of the images is saving as an ISO image !! lol how does it happens ?!
I set render settings to be the output render image is .png
please help. I need to save as .png or .psd better
Thanks.

Hi Hesham,

That's actually an older version of the script. Try the one here: https://simplymaya.com/forum/showpos...7&postcount=23

known 23-11-2017 01:37 AM

Quote:

Originally Posted by NextDesign (Post 362476)
Hi Hesham,

That's actually an older version of the script. Try the one here: https://simplymaya.com/forum/showpos...7&postcount=23

I have been searching this kind of thing, Im in trouble because mycharacter move on viewport and dont move on batch render , first of all thanks for this mel, but actually this still rendering in *.img which I cant convert in another format like jpg,etc. :help:

Sword422 27-02-2018 10:11 AM

Help...
 
Hi guys,

I have the same problem too, I have attached the two image below. The thing is, I am new in MEL coding so I have no clue how, or where to paste this code in the program. Can someone send me a description or video tutorial on this, so I can finish my render? :Dhttps://imgur.com/a/RigLF

Sword422 27-02-2018 11:23 AM

Got it :D
 
I have done it, and it works wery well. Altrough, I am not able to select my cameras, it only wants to render the persp. camera. In the newer versions, I can not see the camera selecting line in the script. Can you tell me the way to select different cameras?

onemillionthanks 27-07-2018 07:31 AM

one million thanks - and a question
 
hi john,

not sure if you'll get this but also wanted to sign up to say thank you very very much and to ask you a question about your amazing script.

does it handle sub frames per chance? i have a scene time warp in my scene and when it hits those frames where it kicks in, the render just ceases. it has worked brilliantly up to those frames though. wondered if there were a bit of code to add that might get me over this hurdle. i noticed the timeline went to frame 670.2 and the frame never finished rendering.

so angry i never got interested in coding.

cheers!

super happy dude.


All times are GMT. The time now is 01:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Simply Maya 2018