Integrating 3D models with photography
Interested in integrating your 3D work with the real world? This might help
# 106 20-01-2015 , 08:20 PM
Registered User
Join Date: Jan 2015
Posts: 3

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.

# 107 21-01-2015 , 03:28 PM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988
Hmmm... Could you try disabling the V-Ray frame buffer and then trying it again? What OS are you running Maya on?


Imagination is more important than knowledge.
# 108 21-01-2015 , 04:37 PM
Registered User
Join Date: Jan 2015
Posts: 3
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

# 109 29-08-2015 , 05:38 AM
Registered User
Join Date: Aug 2015
Posts: 3
@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

# 110 30-08-2015 , 02:28 PM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988

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


Imagination is more important than knowledge.

Last edited by NextDesign; 30-08-2015 at 02:31 PM.
# 111 31-08-2015 , 02:45 AM
Registered User
Join Date: Aug 2015
Posts: 3

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.

# 112 05-11-2015 , 01:11 AM
Registered User
Join Date: Nov 2015
Posts: 1
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

# 113 30-11-2015 , 05:51 PM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988


Imagination is more important than knowledge.
# 114 10-03-2016 , 01:30 PM
murambi's Avatar
Head of 3d Admedia
Join Date: May 2007
Location: nairobi , ken-ya
Posts: 1,340
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?

# 115 26-02-2017 , 07:04 AM
Registered User
Join Date: Feb 2017
Posts: 1

Wow, it seems this script has attracted quite a bit of attention user added image

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! (https://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.

# 116 27-02-2017 , 11:27 PM
NextDesign's Avatar
Technical Director
Join Date: Feb 2004
Posts: 2,988

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


Imagination is more important than knowledge.
# 117 23-11-2017 , 01:37 AM
Registered User
Join Date: Nov 2016
Posts: 1

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. user added image

# 118 27-02-2018 , 10:11 AM
Registered User
Join Date: Feb 2018
Posts: 2

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? user added imageuser added image

# 119 27-02-2018 , 11:23 AM
Registered User
Join Date: Feb 2018
Posts: 2

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?

# 120 27-07-2018 , 07:31 AM
Registered User
Join Date: Jul 2018
Posts: 1

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.

Posting Rules Forum Rules
You may not post new threads | You may not post replies | You may not post attachments | You may not edit your posts | BB code is On | Smilies are On | [IMG] code is On | HTML code is Off

Similar Threads