PDA

View Full Version : Rendering in very large resolutions


Xenophobe
09-08-2007, 07:04 PM
Is there a way to render a very large image in "pieces"? Like, instead of having to wait hours for the complete render, you render one "piece" of the image at a time and after that you merge them in Photoshop?

Thanks in advance...

Kako
09-08-2007, 07:48 PM
Yes, there is.
You can do a command line render with the -reg flag to choose the region you wish to render.
For example, to render a 4000 x 2400 image divided in four parts, you would have something like this:

render -r mr -reg 0 2000 0 1200 -cam camera1 -im image_01 sceneFile.mb
render -r mr -reg 0 2000 1200 2400 -cam camera1 -im image_02 sceneFile.mb
render -r mr -reg 2000 4000 0 1200 -cam camera1 -im image_03 sceneFile.mb
render -r mr -reg 2000 4000 1200 2400 -cam camera1 -im image_04 sceneFile.mb

You can put all these lines in a text file with a .bat extension and just run the file.
Also, if you're rendering with mental ray using GI ou FG, remember to do a render in a lowres version just to save the GI and FG maps, then render the highres parts using the saved maps. Otherwise, you may have seams when you stitch the regions in photoshop.

Look for command line render in the help files to get some more details about the flags you can use.

Good luck,
Kako.

DrYo
09-08-2007, 07:59 PM
Cool beans, that's good solid practical info

Xenophobe
09-08-2007, 08:06 PM
That's what I was looking for. Thanks a lot!

dan1el
09-08-2007, 08:14 PM
The freeware renderpal is a good program giving you a GUI for rendering (Google it)

Xenophobe
09-08-2007, 09:46 PM
You can put all these lines in a text file with a .bat extension and just run the file.
Also, if you're rendering with mental ray using GI ou FG, remember to do a render in a lowres version just to save the GI and FG maps, then render the highres parts using the saved maps. Otherwise, you may have seams when you stitch the regions in photoshop.

Look for command line render in the help files to get some more details about the flags you can use.

Good luck,
Kako.

Sorry for my ignorance, but there are no problems in rendering a low res version for the FG maps? It has nothing to do with the overall quality of the final render?

myself44
09-09-2007, 06:46 PM
Sorry for my ignorance, but there are no problems in rendering a low res version for the FG maps? It has nothing to do with the overall quality of the final render?
No problem.
FG rays, GI photons are only shot for calculation, so using a map avoid the rays and photons to behave differently from one render to another.
So even if the resolutions are different, the number of rays/photon, as well as their behaving, stay the same.

Good luck, actually I've been wondering about seperate renders too
But hey Kako, do I just copy/paste those lines in notepad then change the ext to .bat... and I just run ( double click) it ? I mean, do I have to open maya , open my scene, position my camera then, double click on that .bat file ?

sry, Im a bit confused too :P

thx

DrYo
09-09-2007, 07:46 PM
The batch renderer is actually a separate program, on Windows it's called mayabatch.exe.

When you invoke the batch renderer from the Maya menus, then mayabatch.exe runs in the background. The idea is that you can continue to work in the Maya GUI while rendering takes place behind the scenes. Practically speaking, this is only worthwhile if you have multiple processors and you can assign render jobs per processor.

If you type "render" at the command line (or invoke it from a batch file) then windows recognizes this as an alias for "mayabatch.exe."

Command line or batch file rendering is almost always a better choice than rendering from the Maya GUI, because the GUI uses up a lot of RAM and system resources. Sometimes, rendering from the command line can make the difference between running out of RAM or not. And of course, if you run out of RAM, your render runs at 10% speed because the hard drive is going crazy trying to swap out the virtual memory.

Xenophobe
09-09-2007, 08:42 PM
And correct me if I'm wrong: when you type 'render' at the command prompt without using any additional flags, the program deduces you're using the options you saved in the 'Render Global Settings', right?

Kako
09-10-2007, 03:34 AM
And correct me if I'm wrong: when you type 'render' at the command prompt without using any additional flags, the program deduces you're using the options you saved in the 'Render Global Settings', right?
Yes, it does. It considers all the settings you have in your saved scene, including the render layers you have set.
Changing the image resolution and reusing FG maps would be a problem if you have FG based on radius control and view dependency.

But hey Kako, do I just copy/paste those lines in notepad then change the ext to .bat... and I just run ( double click) it ? I mean, do I have to open maya , open my scene, position my camera then, double click on that .bat file ?
No need to open maya. As DrYo said, it runs as a separate program. You can double click it or run in from the command line too. If you do open maya and change the camera position though, remember to save the file again so that the changes are considered in the batch render.

Kako.

DrYo
09-10-2007, 05:10 PM
BTW, you can override the Render Settings in the scene file using command line flags. For example, the scene file could have a frame range of 1 to 100 in Render Settings, but you could specify to render frames 101 to 200 with command line flags:

render -s 101 -e 200 myscene.ma

CGTalk Moderation
09-10-2007, 05:10 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.