Rendering huge images with VRay 1.4 for Sketchup
-
Vray 1.4 constantly crashed when trying to render at high resolutions like 32K x 16k or quad that. So, exporting to an usable format like PNG or JPG was impossible.
As we cannot wait hours (or days) for renders to complete just to have vray crashing on us on export, an alternative method needed to be found.
This is what I came up with:STEP 1 - render to VRImage Raw Image file, and leave VFB mode to Preview or No Memory
this will produce a .vrimage file on your hard drive. (options - output)
tip: do not render channels you won't use, so, if you do not need an alpha channel, uncheck it from options - VFB channelsYou better have a rendering farm or a spare computer you can forget of for a while at this point. I don't.
STEP 2 - convert .vrimg to .exr
Get chaosgroup utility vrimg2exr.exe - it is part of vray for 3ds, but not for ketchup, so I don't know how you will do that vrimg2exr.exe is a standalone command line utility, that allows transformation of the proprietary .vrimg format to the open .exr.
Example: vrimg2exr file.vrimg file.exr -half -bufsize 2000
"- half" parameter makes the conversion using 16 bit per channel instead of float 32, and not only is crucial to later conversions but reduces file size dramatically as it enable compression (from 3.7 GB to 70 MB in my case)
"- bufsize 2000" sets the working buffer to 2GB of ram, and the bigger the better (speed wise), but exceeding 3000 caused crashes as this utility might be 32 bit only.
STEP 3 - open the file.exr with Photoshop
Photoshop opens the .exr format, and is the only image editor able to do it, as far as I found. Adobe has a exr2png ($) conversion utility but with limited options.
Beware, the .exr filter used by PS has changed on the recent versions, and you might find usefully to know that the old filter can be still used instead of the new by simply overwriting the corresponding file. (it seems the new filter has some channel issues some users on the net found undesirable).
Also on the .exr home site you will find a PS filter for opening this format, freely downloadable, although I found it unnecessary.STEP 4 - hold your horses, step 3 needs an addendum:
I recommend using a x64 version of PS for opening huge .exr files, for obvious memory reasons.
Even so, allocate lots of ram for PS and hdds with lots of free space for temps (in excess of 40GB, beware SSD owners), from options-performance in ps, before opening the .exr.
Au contraire, crashes might occur when exporting.If using the new ps .exr filter on opening, a dialog will pop asking how to load the alpha channel (even if not existing). I selected to load it as an alpha channel, not transparency. Of course, my render lacked alpha to begin with, so no alpha channel was generated on import.
Convert the image to 8 bit per channel at this time, if you desire. It is now you will be grateful for that -half parameter, as 32 bit per channel images will convert white to 50% gray.
SO, STEP 4 - EXPORT TO WHATEVER: .JPG, .PNG, .TIF, .PSB
For my purposes, a lossless format is preferable, as .PNG or .TIF. Specifically I used PSB (Large Document Format)
DONE.
-
Why would you ever need a 32,000 wide pixel image?
I always just render straight to EXR from V-Ray and have never had an issue with memory. If you open the EXR in Photoshop, you will need ProEXR in order to see your channels. I open the file, make my exposure and level adjustments and then send the file to 8 bit or 16 bit if necessary. 32 bit is just a waste of time. It's really there for high end Hollywood video comping from what I understand. Besides, being out of 8 bit disables some of Photoshop's filters.
Just to add, V-Ray 2.0 has a lot of improvements on memory as well as 64 bit rendering capabilities. Also, now that we have the progress bar back, your can render to EXR and use No Memory feature and actually know where you are in the rendering process.
I found that rendering to VRIMG and then converting was a total waste of time. Pay the $100 and get ProEXR and you will not regret it.
-
@valerostudio said:
Why would you ever need a 32,000 wide pixel image?
Thanks for the reply.
I found that rendering to VRIMG and then converting was a total waste of time. Pay the $100 and get ProEXR and you will not regret it.
To produce a gigapixel spherical panorama (streetview like) of a virtual environment ready to be sliced and served.
Thoght that outputting to EXR is the same as rendering then saving, as did not allow me to select no memory, so vrimg/nomemory seemed to be the only option to avoid crashes. Also, converting the vrimg to exr was relatively fast so no problem there.
Cheers.
-
Would you mind sharing what one of these things look like with a link? I am very curious.
-
@valerostudio said:
Would you mind sharing what one of these things look like with a link? I am very curious.
Gladly, in a few days, as I'm currently on the clock with a Project. Maybe monday.
-
Vray 1.49 does export directly to .exr if you want to, so the vray image file conversion step is not required.
-
@dtolios said:
Vray 1.49 does export directly to .exr if you want to, so the vray image file conversion step is not required.
Except that it does.
I repeat: exporting directly to exr (or exporting to jpg, png, etc) requires Vray to perform an in memory render, then exporting the result to file by means of a filter. This two step process always fail when rendering huge images, that was the reason for the whole post. Obviously, that's a known issue even to the CG, as they added the NoMemory/proprietary vrimg rendering option, which is a one step process only. Funny thing, there is no conversion utility included with vray for sketchup, so I believed the information provided could be of some use.
But if you don't believe me, try your method with a 64K X 32K render directly to exr, and tell us how it went. I personally made three tests (all failed), but due to excessive render time at such resolutions, I will be not attempting a fourth. Even if such a test would work, it's clear to me there is no reliability in it, as opposed to vrimg rendering that worked every single time.
-
Has anyone experienced any issues with bump not rendering, when using render to vrimg?
-
Sorry being an idiot, had accidentally deleted the source files. Doh!!!
Advertisement