|
Maximum Resolution in Mental Ray for Maya
-reg flag doesn’t help for HUGE render
Multiple camera rig?
This may sound crazy, but I have to produce a 218,400 x 36,000 pixel image. I am rendering with Mental Ray for Maya. This is a highly-detailed render that will be printed for an interior wall of a building. The wall is 60-feet by 10-feet tall and will be printed in 4.5 x 10-foot panels. The printer doing the job handles a resolution of 300 dpi and the goal is to have an extremely sharp, detailed print. You can do the math. I am looking for a script that will let me generate a series of aligned cameras so that I can produce image slices for each panel, each at a fraction of the final resolution.
Now, I have long successfully used the “-reg” command-line flag to render print-resolution images in slices, which can be easily reassembled into a single image. Someone else posted an example here. For convenience, I’m just duplicating their numbers. For an image with and x-y resolution of 5,0000 x 3,000, rendered in 5 (tiny!) slices, it looks like this:
render -r mr -v 5 -x 5000 -y 3000 -reg 0 999 0 3000 -im part1 example.mb
render -r mr -v 5 -x 5000 -y 3000 -reg 1000 1999 0 3000 -im part2 example.mb
render -r mr -v 5 -x 5000 -y 3000 -reg 2000 2999 0 3000 -im part3 example.mb
render -r mr -v 5 -x 5000 -y 3000 -reg 3000 3999 0 3000 -im part4 example.mb
render -r mr -v 5 -x 5000 -y 3000 -reg 4000 4999 0 3000 -im part5 example.mb
Trouble is, my image resolution is -x 218400 -y 36000. For practicality, I resolved to render this at half res, -x 109200 -y 18000. That’s still 1,966 megapixels!
When I attempt to batch render lots of thin slices (14 or so), the resolution of each slice is 7800 x 18000 (the slices are vertical). This isn’t small, but it’s easily small enough to render—it’s a detailed image, but fairly simple in terms of memory and rendering requirements. At 14K, the entire image renders in about 20 minutes.
However, as soon as Mental Ray sees the -x and -y total resolution of the image (regardless of the -reg values) it fails and generates an error in the log:
SCEN .02 warn 077059:camera x resolution -29136, increased to 1
RC .02 082059: camera x resoluition -29136, increased to 1
I’ve traced this to some set limit in Mental Ray that wants to create a frame buffer for the entire size of the final image (the -x and -y resolution), regardless of what’s actually being rendered in that slice using the -reg flag. The limit for -x -y seems to be around 32K (32,000 pixels). In my own testing, this bears out. I can render an image just up to about 30K with the -reg command—even if it’s 95 percent empty space— before I start getting this error and job failure. Note, I’m not running out of memory. Mental Ray returns an error and quits before my processor or memory usage goes over 10 percent, as soon as it logs the big resolution.
My only hope seems to be to render lower-resolution frames from a series of cameras that can be stitched together. It needs to be completely seamless. Does anyone have a camera script that will generate a series of offset cameras whose combined output matches the output of a single target camera? Anybody have an idea of how to script it? I’ve searched and can’t find anything. In Maya’s camera settings there are lots of film back and other offset settings - I can move a camera around without changing its angle of view, but I can’t figure this problem out. If I change the aspect ratio of the render resolution, the camera field of view changes dramatically, and I can’t match the original camera. I need to create a row of cameras that render a smaller region that combined, exactly match the field of view of a parent camera. Anybody know of a solution?
Thanks!
|