Jump to content

IBL and shadows in mental ray vs v-ray


TomD_Arch
 Share

Recommended Posts

So I am wondering after messing around with Grant Warwick's shadder test scene, why does v-ray create shadows on objects when lighting a scene with an HDRi image, but mental ray doesn't seem to. I managed to get a nice render using the mr AREA LIGHT in conjunction with the IBL, but clearly this is not the same kind of efficiency you get with v-ray. I've searched around and even went back to reading some older posts here, including the not relevant IBL post I wrote a while back.

Link to comment
Share on other sites

tet.jpg

 

I think you may be missing something, I just did this quick test and everything seems to be working as it should. Max 2014 one skylight with an HDR image, no sun, no extra lights. Photon mapping and Final Gather.

 

I am attaching the scene and a free image from Hyper focal, that IMO are the best HDRI for this type of work.

Here is the scene for limited time

Link to comment
Share on other sites

@Francisco- The first thing I am noticing is you are using a .exr file for your IBL image. When I opened your model and rendered I got an exact duplicate of the image you posted here. So I went and swapped out, in all the necessary slots, one of the HDRi images I was using, re-rendered and the image was way darker.

 

What is the significance of .exr files?

Link to comment
Share on other sites

HDRI stand for High Dynamic Range Image and this mean a image file format that contains more light information that your regular JPG or anything that is 8Bit deph.

HDR and EXR are image file format that can contain a large bit deph data, 32 Bits or 16 Bits are the standard. EXR also has other capabilities but for dynamic range it is almost the same than HDR formats.

 

There is some people that uses jpg images to give some color variation to the renderings, but for this you need to really push the light intensity to height values and it is not really recommended. Also using JPG you will never get sharp shadows. You can find hundred of HDR images on the internet, some free other paid, but not all of them have a wide range or had enough light information to create hard shadows, one work around in V Ray is crank the gamma or brightness of the image to push those shadows, but if your image is create correctly you don't need to do this.

There is a few companies that create good/ready to go HDRI, one is CG source or is Hyper Focal and others.

 

There is a blog post in this mere website explaining HDRI on CG renderings.

Link to comment
Share on other sites

So just a reminder...I am working in mental ray. I took your .exr file and plugged into my scene. Worked! the render time seemed to jump up just a touch.

 

So I opened the HDRi file I had been using and just saved it as an .exr. That worked also.

 

Does anyone know why this might make a difference, or is able to explain it???

Link to comment
Share on other sites

what file did you re-save as .exr that suddenly worked ?

 

HDRi file refers simply to type of image regarding its dynamic range, but file formats that support that dynamic range differ between few, most popular being older ".hdr" and newer ".exr".

Both offer linear (gamma 1.0) storage of floating point precision data in 32bit color depth. Exr additionally also offers a smaller half-floating point precision format (called 16bit, but don't focus on that, it's not 16bit per channel in same way as 16bit tiff is, the format is still linear), compression methods (like zip for file storage savings) and storing additional data inside (like passes, buffers, scene info,etc.. anything).

 

But regarding dynamic range, both will provide the same visual output. I've only seen Peter Guthrie saving his HDRi as both .exr and .hdr since he considered (without really any proof to which he admits, but rather feeling) the .exr to provide slightly crisper detail. I stay away from .exr as a texture format, because 3dsMax is much slower in its use (like viewport, material editor,etc..) than .hdr. But of course, I use it to save renders, but that is different thing altogether.

 

It's always the same thing:

 

HDRi file with enough dynamic range for sunny days (16+ stops ideally), .exr or .hdr file format loaded linearly (gamma 1.0, 2014+ Max does it automatically, but before, the bitmap loader did it also with additional UI)

Link to comment
Share on other sites

I agree with your logic and the science. I took an HDRi image I have used in the past. opened it in photoshop and simply saved it as an OPEN.exr file format. Next I constructed the simple scene and placed a skylight. Saved it once as "ibl openexr" and a second as "ibl HDRi" with both files saved I then dragged the .exr file into the perspective view of the "ibl openexr" file and instanced it into a material slot and then the skylight slot. I then did the same exact thing for the HDRi. next I rendered both. See results below...

 

exrVShdr.jpg

Link to comment
Share on other sites

hdriLoader.jpg

There should not be any difference between an exr images that was saved as HDR image. If you are getting different light information there is something wrong with your process.

When you load an EXR image in to 3ds Max you'll get an extra window that give you some options, for instance if you are using multi layer exr for texturing or something, but for lighting you should leave everything as default. You can do some color correction adjustment if you like but default should work fine.

When you open an HDRI file format in 3ds Max a different screen with other options pop up, you can see in the attached images, here you can actually reduce the bit depth data of this image, by default max shows 16 Bit, or at least used to, you should be sure to use 32 bit or real pixels. This way you are ensuring to use all the light information from image have.

exrLoader.jpg

Link to comment
Share on other sites

You know, I am quite intrigued right now. I didn't use MentalRay for 4 years, but I'll go ahead tomorrow and test it :- )

 

I still suspect it's mistake you are doing with the bitmap loader but if that's not the case, than MentalRay is just...well it is anyway, but even more so.

 

Edit: Did my tests. Zero difference, as expected. Will upload screenshots.

 

Images:

 

1) HDR Bitmap loader : Offers all bit depths in integer and floating point despite it being strange choice. Autodesk being stone-agey. 32bit is the one to choose, being the only linear floating point option.

 

2)EXR Loader : Shows 16bit(half-precision) floating point per channel. That's 30 stops, should be more than enough.

 

3)HDR Result

4)EXR Result

 

I used Single skylight, Photographic exposure control and only swapped the files. The Image being 1735 ClearSky from Peter Guthrie, who offers directly both .exr and .hdr files for conveniency.

 

Bitmap loader.jpg

 

EXR results.jpg

 

One moment, I also have the 0082-05 sample.

EXR loader.jpg

HDR results.jpg

Edited by RyderSK
Link to comment
Share on other sites

So to clarify I am loading both the original .hdr and then the re-saved .exr from the .hdr via the drap and drop method used here->

 

http://area.autodesk.com/blogs/garyd/gpu-ambient-occlusion-ao-and-ibl-w-mental-ray-in-3ds-max-2014

 

Oddly, when I use the bitmap loading .hdr and the proper settings as Franciso has shown above it works.

 

Lesson learned: You can load an .exr via the direct drag n drop to viewport method and mental ray sets it up, but for an .hdr fomate you have to load via the bitmap method and using the 'Real Pixels' setting.

Link to comment
Share on other sites

So to clarify I am loading both the original .hdr and then the re-saved .exr from the .hdr via the drap and drop method used here->

 

http://area.autodesk.com/blogs/garyd/gpu-ambient-occlusion-ao-and-ibl-w-mental-ray-in-3ds-max-2014

 

Oddly, when I use the bitmap loading .hdr and the proper settings as Franciso has shown above it works.

 

Lesson learned: You can load an .exr via the direct drag n drop to viewport method and mental ray sets it up, but for an .hdr fomate you have to load via the bitmap method and using the 'Real Pixels' setting.

 

Try to load it single time with correct setting and then try drag'n'drop again to see if it remembers it as new defaults.

 

0082-05 Sample. Look how much better, more natural it looks. With older PG's HDRi there is lack of dynamic range forcing huge color cast as the Sky deeply overpowers the sun in strange fashion. Unless you white-balance it to as hell with blue tones.

 

CG Source > Absolutely everything else.

 

0082-05 sample.jpg

Edited by RyderSK
Link to comment
Share on other sites

I never drag and drop stuff in the scene, I like to have absolute control of everything lol

 

So yes I think when you drag and drop the HDR format, maybe is clipping it to 16 bits or something different, then you have different exposure.

 

Hey Juraj, so Guthrie updated his images? bummer I have some old one from him, I like how much information they had but yes the color cast was way to much.

Wonder if he just color correct them or merge the original again with a better process.

Your last image look much better.

Link to comment
Share on other sites

The last image is "0082-05" from CG-Source, the one Thomas used in his tests as well, I just had it as well on HD.

 

Although yes, Peter re-worked his older set, but I think the update just removes the horizon buildings and some noise. It doesn't introduce bigger dynamic range. I think the standard fare is to simply accept their colorness as artistic tool, or do what Bertrand and many others did, desaturate them and lower gamma/boost sun. But by that time, you might just as well use CG-Source which are double the resolution and has double the dynamic range to start with.

Link to comment
Share on other sites

Just a reminder not to use Mentals IBL without Render Optimizer:

http://www.infinity-vision.de/software/render-optimizer/

 

By default max is set to 64 samples for IBL and that is "conveniently" hidden in UI, and is also stupidly high value with Unified sampling. Start testing with 1, higher value will most definitely be needed, but as high as 64 almost certainly not.

Link to comment
Share on other sites

  • 2 months later...

Juraj and all, your map blur setting is default blurry(1.0) on the HDRI. Set it to .01 and see what happens. My guess is your color problem will go away too. I discovered this 3 weeks ago using max 2014. If you use the default material settings for the HDR in mr, you will get a dark, underexposed, shadowless mess on any scene bigger than a teapot, and the teapot by itself won't look much better. My sky domes work now with changing this one one setting on the map. It was a great day. I'm also asking myself if everyone uses vray because they didn't know how to get HDR sky domes to work right in mental ray.

Link to comment
Share on other sites

  • 2 months later...
I'm also asking myself if everyone uses vray because they didn't know how to get HDR sky domes to work right in mental ray.

 

Among one of the reasons I changed to VRay, yes, there are others, but this one was one of them, I admit. Good tip to know when I have to do my next scene in MR.

Link to comment
Share on other sites

To modify what I posted earlier. I discovered this worked in 3ds max 2014. This is what I used successfully at my office. I have tried this in 2013 at home but the blur setting doesn't work as described. So beware it may be only in newer versions of max. Would be interested if someone could test this with 2016. And, once u setup one sky dome map. Don't switch it out with a different one. It will mess up.

Edited by MarcellusW
Link to comment
Share on other sites

  • 4 weeks later...
I'm also asking myself if everyone uses vray because they didn't know how to get HDR sky domes to work right in mental ray.

 

How long have you been using HDR sky domes in Mental Ray? It wasn't that people didn't know how to get good results with this method, but that it just didn't work properly at all in Max 2013 or previous, thus the reason the features were hidden. There were tools to expose the features, but even then it was a very tedious and laborious process to get good results from Max and MR using HDR IBL.

Link to comment
Share on other sites

How long have you been using HDR sky domes in Mental Ray? ...

 

Admittedly, I am still quite new to it. I had used Max 2014 and had problems with the HDRI until I changed the blur setting. I had tried it at home with Max 2013 and it did not work. What I dont understand is if this was changed from 13 to 14, why wasn't it listed as a new major feature in the 3ds max press release (i couldn't find it at least).

Link to comment
Share on other sites

Even though the blur control in bitmaps may affect the intensity of shadows in a IBL setup the main factor to have hard or intense shadows is the quality or EV's of the HDRI. Most of the HDRI around the net do not have many EV or they are compressed or even 16 bit instead full float.

If I remember in Max 2013 there was not an actual IBL configuration by default, you could do it but you need to unlock some mental ray elements that were Hidden.

in Max 2014 and above you could use real IBL setup with most of the same controls you can find in Maya Mental Ray.

 

VRay had the advantage of producing better shadows in a IBL setup because the way they calculate GI. In the case of Mental Ray it was later introduced that algorithm, FG was not as precise to create ibl compared to Irradiance maps or Brute force method. You could do a semi BF with mental ray but still was not correct or a real IBL setup. Maya mental ray was always a head of 3D Max with better implementations of GI.

 

To answer your question, yes you won't be able to create the same effect in Max 2013 compared to Max 2014. Unless you unlock that feature and do some works around.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...