PDA

View Full Version : Mental Ray Debugging Question to Experts (Memory HDRI FG Black Buckets)


oliviercefai
02-04-2007, 10:14 AM
Hello,

I am debugging a Mental Ray error that seems to be experienced by several users in this forum and also on Autodesk's and CGSociety's.
I need support from some experts here, since I believe I have read a tested comments from at least 30 posts... with no success.

Basically errors while doing large rendering: either black/losts buckets spread accross the image or a full empty buckets image (with only crosses marking the buckets zones). This happens on large renderings: 5000x5000 and up to 10000x10000

No More Memory errors
Like many others, I have had several memory crashes calculating large images in the past, so I used the backburner split lines function, until max9/backburner 2007 which ended up not reliable enough for production. So I end up giving up backburner and switching to Deadline, which worked really well in cropping the render in tiles (2000x2000), each being sent to a different rendernode: No more memory error, a first good result :-)

However, I still get black buckets as soon as I exceed 6000x6000 for the final image size (although cropping renders into smaller images!)

Here is the set-up for 'sanity check'
Dual Xeon with 4Gb, rendering distributed to a farm of several Dual Xeons with 2Gb each. Plenty disk space (Raid 0) and gigabit network (no latency)
Of course /3Gb switch and clean machine install
Scene in max9 32bits, HDRI + Final gather + log exposure (activated for background), most nurbs geometry so around half a million polygons in the end. Not a big deal here.
Lighting with a couple of MR spots + skylight sets with hdri environment and FG - No photon
Most materials use various Arch&Design and Car Paint shaders
All usual MR sets checked (tried large BSP/BSP with different sizes, even Grid), placeholder, memory limit 1024/512/2048, MR map manager, bitmap pager on/off
Different FG presets tried: Low Mid High, interpolation radius standard or set to pixels
Tried with FG save to disk on and off

Now here is the little debugging:
Problem seems to come from FG calculations based on HDRI image: (I use a 6000x6000 HDRI studio lighting) because I can really see it during FG calculation, and it work without FG (obviously scene totally inacceptable then).

Testing difference with max9 64bits under winxppro64
Rendering works up to 8000x8000, no more lost buckets and the max memory used was 1.6gb despite 4gb installed on the machine: this means that the problem is linked to calculation rather than memory (one of the main difference between 32 and 64); alternatively, it could be linked to MR internal/FG buffer memory management but not actual RAM installed on the system.

So here are a few questions I am still trying to answer:
- Bitmap pager: Is the bitmap page option (on/off) passed to rendernodes in a network rendering set-up?
- Bitmap pager: which set should be use on such configuration?
- FG file save when doing network rendering of a single frame: since each node would use the same file for different images (each slice), how could that work??
- How to convert a .hdr file into an .exr? (MR message windows alerts that .hdr is not recognized an thus will be used as raw)
- Is there a way to force FG-only calculation on a single 64bits machine like with MR standalone and have that reused and shared by 32bits rendernodes?

Will keep you posted a soon as I find a decent solution; please post if you have any good finding.

Cheers
Olivier

nisus
02-19-2007, 04:46 AM
Hi,

Did you turn of the visual frame buffer?
Did you try rendering a FG map on lower resolutions or even ideal diffuse?

rgds,

nisus

MasterZap
04-18-2007, 11:26 PM
The "black buckets on large renderings" is simply max's framebuffer management running out of RAM, and not being able to accept buckets from mr. The only short term solutions are "more RAM" and "64 bits". Othet than that I can only say "stay tuned" ;)

Apparently Max - unlike mr - just silently fails it's memory allocation with no error messages.

NOTE: This has nothing to do with FG, or any other such problems that may in the past have generated "black splotches". Mr is actually successfully rendering the image, and is completely oblivious to max's inability to receive and display the buckets.

I suggest you render your FG map first at a lower resolution, hit the "read only" FG map mode, and then use some split-render MaxScript such as this one that I slapped together:


rollout SplitRender "Split Render Tool" width:250 height:100
(
radiobuttons splitcount "Pieces to split render in:" labels:#("1", "4", "9", "16") default:2
spinner width "Total width:" type:#integer range:[0,32000,3000]
spinner height "Total height:" type:#integer range:[0,32000,2400]
spinner overlap "Pixel overlap:" type:#integer

checkbutton show "Show image while rendering" checked:on

edittext filename "File name:" text:"my_filename"
edittext extension "File type:" text:".jpg"

button doRender "Do the render"

on doRender pressed do (
a = splitcount.state
b = splitcount.state * splitcount.state
-- actual render width and height
w = width.value / a
h = height.value / a

bm = bitmap w h
p = overlap.value - 1

for i=0 to b-1 do
(
row = i / a
col = i - floor(row) * a

render renderType:#blowup region:#((w/a)*col,(h/a)*row,w/a*(col+1)+p,(h/a)*(row+1)+p) outputwidth:w outputheight:h outputfile:(filename.text + row as string + col as string + extension.text) vfb:show.checked progressbar:(not show.checked) to:bm
)
unDisplay bm
)
)

-- create the rollout window and add the rollout
if splitRenderFloater != undefined do
(
closerolloutfloater splitRenderFloater
)
SplitRenderFloater = newRolloutFloater "Split Render Tool" 250 225
addRollout SplitRender SplitRenderFloater




/Z

mmikee
05-01-2007, 07:25 AM
Thanks for the script Zap. Does this script respect tiff images and the alpha chanel ?

Regards,
Mike

nisus
05-01-2007, 10:37 PM
Hi Zap,

How can I use your script with network rendering?
Can it support crop rendering?

rgds,

nisus

Spacelord
05-21-2007, 03:56 PM
Thanks Zap,
I've seen a couple of scripts that do a similiar job,
but never deal with final gather. But Rendering a lower resolution FGmap is a great idea !!
I hope someday Mental Images figure out a way to keep the FG sampling the same regardless of which crop or region its rendering.

mmikee
05-21-2007, 07:45 PM
I hope someday Mental Images figure out a way to keep the FG sampling the same regardless of which crop or region its rendering

I render the FG map and save it, then render the regions using the saved map. I am not sure if this is what you were
talking about.

Regards,
Mike

Spacelord
05-21-2007, 08:58 PM
Hi Mike,
Yes thats the correct way to go about rendering large images.
rendering the low res fG map (res 1000x1000), loading the frozen map then adjust resolution settings (3000x3000) or whatever res you want. Then render it out with a render crop script.

What I mean is Mental Ray changes its sampling based on what portion of the image its rendering. Example if I render a 2500x1500 image with final gather, without loading a fgmap.
Then render just the top right hand corner out without freezing the fgmap you will notice the fgmap does not match the image that was render all at once.


FG sends out different samples for each crop, it doesn't see the whole picture, It should reference it some how.
This would be handy for rendering changes to an interior, where I might change a table and just need to render region that section. I find sometimes it matches up okay other times I have to feather the edge of the region to blend it into the image.

cheers

chaka
05-23-2007, 09:01 AM
somebody can tell how use the script??? i never have used a script :(

this script support .tga??? or only jpeg


in the version standolone of mentalray , these problem not exist????

Spacelord
05-23-2007, 09:15 PM
copy and paste the script Masterzap has created into a notepad file. Save it with a .ms instead of .txt file extension.
Drag it into a max viewport and it should work.
Theres other ways to do it but that works for me.

cheers

chaka
05-24-2007, 06:44 AM
yeah its works :D thanks bulleye

i did a render 6000*4500 in format .tga

this script is awesome.

nisus
06-12-2007, 12:01 PM
Hi Zap,

How can I use your script with network rendering?
Can it support crop rendering?

rgds,

nisus

Hi Zap,

Have you seen this question or did you look over it?


rgds,

nisus

dflipb
06-25-2007, 05:10 PM
can anyone help me get this workign for maya 7?

I really need it!!

Thanks.

dflipb

TheAtheist
12-05-2007, 04:04 AM
Hi Mike,
Yes thats the correct way to go about rendering large images.
rendering the low res fG map (res 1000x1000), loading the frozen map then adjust resolution settings (3000x3000) or whatever res you want. Then render it out with a render crop script.



Hi all, new to this forum. Thanks to oliviercefai over at CGtalk for the link .

I'm planning to save an FG map at 300x225 then use it on a render at 1680x1260, will this work correctly without the crop script or will it just look wrong?

lontra
12-05-2007, 04:42 AM
I'm planning to save an FG map at 300x225 then use it on a render at 1680x1260, will this work correctly without the crop script or will it just look wrong?

Maybe an 300x225 FG map is a bit too small... Don't forget that Mr will have to interpolate from the frozen FG map to the final resolution size. In your case the final image size is 5.6 times bigger than the frozen FG map. You will most definitely lose lots of detail in the interpolation process...

My advice is to build the FG map at half size. That way Mr will only interpolate every other pixel.

As for the render itself, it depends on scene size, amount of Ram, etc. Hard to say...

Cheers...

TheAtheist
12-05-2007, 05:28 AM
Maybe an 300x225 FG map is a bit too small... Don't forget that Mr will have to interpolate from the frozen FG map to the final resolution size. In your case the final image size is 5.6 times bigger than the frozen FG map. You will most definitely lose lots of detail in the interpolation process...

My advice is to build the FG map at half size. That way Mr will only interpolate every other pixel.

As for the render itself, it depends on scene size, amount of Ram, etc. Hard to say...

Cheers...

Thanks, that makes sense.

I have been having trouble with the speed of my renders so was hoping this would help speed things up. I think there must be something wrong with my setup though as I've selcted 'read only (FG freeze)' but it still computes the FG! I thought it would just go straight to rendering and skip the FG stage? EDIT: Never mind, i was being thick, hadn't ticket both boxes!

My system is:

AMD 64 x2 4600+
4gig ram
300gig HDD x 2
XP pro 32 bit

I've been getting render times of between 10 - 15hrs for 1800x1260 interior images. All fairly basic using daylight, log exp control and medium settings for FG. I was expecting renders to take half this time with my setup, any ideas why they take so long?

lontra
12-05-2007, 03:42 PM
Again, hard to say... Can we see a print-screen of the scene? Maybe some more info on the lighting setup, FG settings, etc.

Even with 4 Gb of ram in your system, the XP 32 will only allocate 2Gb for max (unless you use the 3Gb switch - google it...). Try updating your OS to XP 64, that way max can use all your ram... ;)
I'm pretty sure you see a major speed change with that one... ;)

Cheers

3DMadness
12-07-2007, 04:02 AM
I would also recommend switch to xp x64 with 4gb of ram.

And if you have max 2008 you can use lightportal to use a low fg map with interpolation and put ambient occlusion to help getting the details back.

LostOne
11-19-2008, 01:15 PM
I'm using zaps script but I'm having problem stitching the tiles together, they just don't match. Anyone else had the same problem?

LostOne
11-26-2008, 02:50 PM
I'm using zaps script but I'm having problem stitching the tiles together, they just don't match. Anyone else had the same problem?
NVM, wrote my script that does it.

lessthanfred
12-17-2009, 08:27 PM
Hi,

Really sorry to introduce myself with a question on an old thread but I have been struggling with this problem for a couple of days and my deadline is on Monday.

I used the script above and it seems to solve the problem except... I don't know where the resulting file/files are saved to. Any ideas?

Thanks very much.

ismailpegasus
01-16-2010, 10:30 AM
Hi,

Really sorry to introduce myself with a question on an old thread but I have been struggling with this problem for a couple of days and my deadline is on Monday.

I used the script above and it seems to solve the problem except... I don't know where the resulting file/files are saved to. Any ideas?

Thanks very much.

i'm kinda late!! but maybe someone will have the some prob "where is the images !!" and look at this thread
so here is the path
C:\Documents and Settings\Administrateur\Mes documents\3dsmax\sceneassets\images

good luck