THE BOX RENDERING METHOD
Garry Curtis January 23 2007 A tutorial for Realsoft3D V5
Skill Level Suggested :
Another tutorial in the "Saved From The Abyss" Series , which are tutorials
concerning little known but very useful information that may have very briefly appeared on
the Realsoft3D Mailing List .
If you've ever had the bad experience of loosing a lengthy
Super High Quality rendering project due to a software crash or power outage etc ,
then this tutorial is definitely for you .
We've all faced that kind of frustration , and if you haven't yet ,
you will . Realsoft has given us tools that we can easily use to avoid this kind of problem .
That is , to render your images out to disk in a series of Box Renders . The tools are
there , and knowing exactly what to do when things go wrong is the secret to preventing our
well known friend 'Murphy's Law' from turning a productive day , into a very bad one .
That necessity basically forced me into looking at Realsoft's Box
Rendering alternative , and exploring the options it provides for saving lost
rendering time , and for basically taking back full control of a rendering network ,
instead of being forced to sit and twidle my thumbs waiting for that giant rendering
project to finish .
There are actually 2 distinct methods involved in this approach .
Realsoft has included software (ShowImg.exe) that will load the partially rendered data that
is sitting in your 'temp' file , show it , and will save it out as a .BMP file . This way ,
as the manual states , you can just set up a render box for the data that is not there ,
data that was in the process of being rendered when your computer crashed , and then place
that rendered box data onto the partially completed image , using a paint or image program .
We'll examine that option here , first .
The 2nd method that I humbly suggest , is to manually set up your project
to "Box-Render" all your data to a particular folder , in chunks , so that you can assemble
them later in a paint program . This way you can have full control of the file(s) and are not
dependant on RS3D to save partially rendered data for you to collect later in case of a crisis .
Maybe more importantly to some , is this 2nd method's option to stop a render
at any time for any reason , and then start right back up again with BatchRenW , very quickly
loading just the projects that are left to be done , without fear of a glitch or a bug destroying
that data . Actually using the 2 methods together would be the best of both worlds .
Both methods will be covered here , and it may become a little slow going , but hopefully
it will be worth it in the end .
Let's Get Started
I mentioned that Realsoft has already provided a software utility
called "ShowImg.exe" that we can use to view our partially rendered image data that
is sitting in your 'temp' file , either during the render , or after a system crash . The
manual states that we can restart the rendering process from where it was when the crash
occurred . It's a good idea to know how this works , and a very , potentially usefull method
that we should most definitely be , at least aware of .
Start RS3D and look at the "Rendering Settings" Control Tab
(3rd from the left) . Double click on the "Reasonable Quality" setting , for example , and
we'll notice at the top of the Property Window that appears , is a little box called "Box Rendering" .
This is checked by default and for a good reason . In fact , possibly for the very reason that
we're here today writing and reading this tutorial .
The Render Settings Control Tab and Panel
This control directs RS3D to use the distributed rendering method
for rendering on machines and/or networks with more than one processor available for the task .
In doing so , RS3D will render each partially completed image data portion (the render boxes)
to a certain directory to be assembled automatically when that image data is finished rendering !
(note : this applies to single processor setups too)
If it does not finish due to virus attack , power failure or
a weak table leg , then that data will remain there for us to retrieve and collect , using
the ShowImg.exe program . You do not have to start all over again from square one , but only
have to save the partially rendered image out to a directory of your choice . The data
that is being rendered by all your network rendering machines is right here . so you don't
have to go hunting it down .
See ! All That Render Time Was Not Wasted After All !
The image that you are looking at should be saved out to a
directory of your choice by "File/Save/Current Channel" . Then restart your render
project , but activate the "Render-Box" option this time and set the numeric inputs
to correspond to render only the part that is missing from the complete render (the
missing part will be shown as 'blacked-out' boxes) . See the image below for an example
of the "Render-Box" that may be required (for the above image) . The resulting much
smaller image will later be pasted (in a paint program) to the larger image , saved from
the ShowImg utility .
Now We Activate The Render Box
The trick with this method , is to make sure you do not
re-start the rendering process again , or mistakenly assume all was lost due to the crash .
Once you have recovered from your S/W or hardware crash , go directly to the
default temp directory
(usually C:\Documents and Settings\Bill Gates\.realsoft\temp , on Windows XP)
and open one of the recent .r3i files that are sitting there waiting for you (there may be
old .r3i files there too , so make sure you select one of the most recent ones) .
Just double click on
one of those files and the ShowImg program will automatically appear and show you that one
.r3i box file . Select "Open Rendering Boxes" (from the ShowImg File/ menu) , select the same file
again (or another of the most recent ones) and the ShowImg.exe utility will automatically
open all the boxes present in this folder that pertain to this image and present them to you
as a bitmap image , like the one above .
You may have instinctively looked in the folder that had you instructed
RS3D to render your image or images to . You may indeed see that image there , but when you try to
open it , you'll quickly notice that the image appears empty , or corrupted . It is , due to the
untimely and sudden "Stop!" that may have occured while you were down the street having a cheeseburger .
Normally , RS3D will collect render boxes in the default temp
folder and when completed those .r3i boxes will be cut from "temp" and pasted as a bitmap
(or whatever type of file you previously decided on) into your working folder . However , if a crash
occurs , obviously that process gets interupted and the render boxes remain , intact .
THAT'S IT !
Well , you may be saying "jeez , I wish I would have know about
that before ! " . Yes , I said that too , so decided to write this tutorial , in an effort
to stop such a huge waste of time from happening to others . Especially when the tools to prevent
such a thing from happening (high quality image data loss) were right there all along , but
almost totally unknown , or only known by a very few .
Let me present the second method now , and actually , for the most part ,
the above Realsoft method of recovering data in the temp directory will be a life saver and
probably good enough . I've presented this second method for those times when you just can not ,
under any circumstance , afford to loose 2 days of rendering time , and so must absolutely
be assured of that data being there , exactly where you placed it ! Feel free to call me
a control freak , by all means .
OK , So What's The Second Method?
Right , let's get started on this very simple method of using Realsoft3D's
box rendering options . First , download this
4 Additional File Rendering Settings
file that contains a set of 4 File Rendering Boxes all ready to be added to your default startup
project . Simply start RS3D , then load this project , but make sure you check "Selected Sections
Only" . Uncheck every single box , except the "File Rendering" section . Also notice that "replace"
is already checked by default , so uncheck that , since we want to add these settings but not
replace your current ones . All done , so click "OK"
Load the file into your Startup project
Now , click on the "File Rendering Settings" tab and you'll notice
that some new file rendering settings have been added ... then again , perhaps you've never
been adventurous enough to head way down to this new territory of the RS3D interface , or
maybe just never had any need to . This particular Tab of settings are there for one reason ,
for you to select when rendering images or animations directly to a file .
You do not need to build that File Rendering Window up from scratch ,
filling in all those many fields with data for export , but only need to
select one from the list , or create your own and then save it for later use or
continual use later .
The File Rendering Settings Tab
NOW WHAT ?
If you double click on one of these 4 new File Rendering
settings you'll see in the Property Window that they are all 800 x 800 pixel
render sizes , but you'll also notice (near the bottom) that the "Render Box"
is already "Active" (see image below). Notice too that each render box represents a different one quarter
(400x400) section of the image size . This is the whole key to rendering with
this method . Each quarter will be assembled later , and if a machine crash
should occur , then just the quarters that did not get completed will have
to be done .
Normally you would summon the File Rendering Window ,
and select , for instance , the NTSC output setting , choose a filename and hit the "Render
Image" button . Great ! However , another advantage of this working method lies beyond the complex
RS3D interface . These above , newly loaded 'File Rendering Settings' represent a totally new
way of rendering your project's images to disk using a very simple utility program that
Realsoft has included with your program's install ... BatchrenW.exe (the capital "W"
stands for "Window" , as in "a GUI window" to work with - Batchren.exe is the DOS version) .
How does it work ? Well , as you may already know , BatchrenW.exe
can render a series of RS3D rendering projects , but since you are not running a CGI
Studio that Disney has contracted to offload specific raytraced sequences , you probably never
thought you would have the need to examine this compact utility program . Truth is , this little
gem represents a powerfull way of working outside "the Box" , using ... the Box !
Enough Talk , Please !
OK , I don't blame you for getting bored with this preamble . Let's go :
1) Create a simple project in RS3D ... A sphere , sitting on a cube , perhaps .
2) The File Rendering method requires 2 things ... a light , and a camera . Do it .
3) Save this project as "box-test.r3d" (make sure that your "Selected Sections Only" is unchecked)
4) Now we set it up . Open the 'File Rendering ' window ( "File/Render") .
5) The settings I've provided will render at "Reasonable Quality" to a .bmp , so choose , at top ,
Configuration"1A" which will render the Top-Left corner of your image to a file named
"1A.bmp" to the "C:\boxes" directory . (if you're one of those people without a 'Boxes' directory on
their C: drive , create one to avoid error messages) .
The File Rendering Window
6) Save your project again , this time we will rename it as "1-A.r3d" .
7) Select Configuration "1B" which will render the Top-Right corner of your image to a file named
"1B.bmp" , and then Save your project as "1-B.r3d" .
8) Do the same for 'File Renderer Configuration' '2A' & '2B' (bottom-left , bottom-right).
9) Now close RS3D and go have a good stretch , you deserve it for all your hard work !
Finally , now that everything is in it's proper place , go to the
the Realsoft3D root directory (probably
c:\Program_Files\Realsoft3D\ etc etc ) and double click
on our previously mentioned 'BatchrenW.exe' , and load those last 4 files we just created
, and then hit the "Render all" button . Now , just sit back and smoke your pipe while the images are being
carefully rendered to disk .
Seriously ! All that BatchrenW.exe needs in order to do it's work is already
contained in those 4 project files . All that's required from you is to make sure the output
folder exists , and that you have payed your monthly 'Electricity Bill' on time (for a change) .
So in the meantime , say bad karma and a giant bolt of lightning
finally tracks you down and momentarily cuts off the AC power going to your Ice Hut ? Do you
curse the day you were born and start the whole process of rendering all over again from
'Square 1' ??? No ! Of course not . "Render-Box-Man !!!" , ... saves the day(s) !
If you look into your "Boxes" directory you will see the segments of
the render job that were raytraced to disk , except for the ones that , sadly , didn't make it , due to
your brother-in-law's faulty lightning rod installation . You can easily reload and let the
missing ones render , while you head for town to check out the latest Imax 3D release .
In fact , you could break that last segment down into 4 more
boxes if the rendering time did actually warrant such a thing , or use the above
Realsoft method to recover all those partially rendered boxes . (best of both worlds)
Print resolutions (or even HD resolutions of 1920 x 1080) can
sometimes mean more than just a day or two of rendering , especially when you want that
one special render to be "just perfect" . I've included here a series of 16 File Rendering
Configurations representing 16 separate boxes for just such a rendering task .
This may seem extravagant at first , but when you consider a situation where one
rendering box might represent 8 hours of processing time on a 10 Ghz rendering network ,
the apparent extravagant quality of playing it safe , may quickly fade .
A 16 Render Box Series
Time Is Money ... Is It Done Yet ?
It's all safely done , and now we will take
each image and reassemble them in an image manipulaton program that preferably supports a
numeric input control . We know each image is 400 x 400 and offset by multiples of 400
so we would input those corresponding numbers into the image controller .
If you are
stuck without such a handy control , just zoom in a few times and match the images
up by eye . It may take a few undo's , but it's not hard once you've done it a couple
of times . Even with numeric control you may have to rely on 'trial&error' to reassemble
a crashed render . Just take your time and zoom right in , it's not hard at all .
Paint Program's Numeric Window
Well , if you managed to hang in here for all of that , I
thank you for taking the time to do so . Make's my efforts worth it . Please let
me know if there are any errors in this document , or if any of the above suggestions or steps
are simply not working for you . I actually did try to keep it as short as possible , and
may have been a little too brief on certain points . I'm most interested in correcting
any mistakes on my part , or in helping anyone that's interested to get the hang of these
two systems .
"Cheers !" & Best of Luck With Your Work .