HDRi Sky Lighting Tutorial

preview

Thought I should do a quick tutorial on how I use these HDRi Skydomes I’m selling. Note that this is just one of many possible workflows, and there are probably lots of tricks I’m missing and even things I do completely wrong. I should also say that I work mostly with still images, not animations.

1. Here is a typical architectural scene. It is a model I made of Waro Kishi’s Fukaya house in Japan that never really went anywhere.

wire

2. I use a gamma 2.2 workflow together with reinhard color mapping, so not strictly LWF but shares some of the advantages. I don’t want this to turn into a LWF tutorial or discussion, but this post on cgpov.com pretty much sums up how I feel a gamma corrected workflow helps us as visualisation artists.

mapping

The reinhard color mapping helps to control burnt out (overexposed) areas. Screenshot of my color mapping set up: The burn value of the reinhard color mapping typically ranges from .75 for an exterior to 0.05 for an interior. You need to experiment with the value until you gain control over the burnt out areas. Here is an example with a camera pointing at the HDR sky:

burnvalue

For the final render, I use the Vray Frame Buffer, and add a slight s-curve to the output to compensate for the lack of contrast that the gamma corrected workflow introduces:

curves correction

3. Add a vray dome light and load the exr/hdr using the max bitmap loader. Set the mapping type to environment/spherical. If you are using .hdr files, you can use the vrayHDRi loader instead. It makes no difference whether you use the bitmap loader or the vrayHDRi loader, the vrayHDRi adds a bit more control in that you can control the render multiplier independently from the viewport multplier. Set the output of the .exr to 1 and the vraylight multiplier to 1. If your hdr/exr has no alpha channel it seems you can save quite a bit of memory while rendering (approx 200mb in my case) if you load the exr/hdr as realpixel float rgb rather than the rgba option. (NOTE: ONLY applicable to 3dsmax 2009)

EDIT: Please don’t pay too much attention to the 3dsmax 2009 realpixel hdri loading option, it just saved a little bit of memory which is why I mentioned it. I now use a later version of max and no longer have this option either.

bitmaploaderparams
[Click for original size]

4. To rotate the HDR you need to enter a U offset value from 0-1, so to rotate 180 degrees with would enter 0.5, 270 degrees 0.75 etc.

5. Add a vrayphysicalcamera, and set the aperture and shutter speed to something that would work for a typical outdoor scene, like F4, 1/200th & ISO 100. Remember that you are in effect using a completely manual camera, there is no ‘P’ or automatic mode so you need to experiment with different exposures until you get a good result.

scenesetup
[Click for original size]

6. Hit render and see what you get. If it looks too dark/bright I tend to adjust the bitmap’s output rather than the vraylight multiplier, so that I can have a couple of ready setup HDRi’s ready to drag and drop onto the dome light. In the examples below I use an output value of 1.5.

Tags: , , ,

Comments

  1. Thanks for sharing some tone mapping secrets :]

  2. Interesting tutorial, Peter. Now try the same experiment. Thank you

  3. Been waiting for this one for a while Peter.

    Nice too see this is identical to what I do in Mental Ray too. Apart from I add my curves in Photoshop.

    Maybe i’ll do a similar tut for MR, best purchase some of the HDR’s though first :)

  4. Robert Baker

    Great tutorial Peter. Nice to see some insight to what I’m doing. I like your tutorials; they are always concise and to the point. Keep up the great work!

  5. Nice tutorial, especially the color mapping tips. Thanks for sharing!

  6. Nice tutorial. I actually ended up right in line with your workflow for the most part. I do not have the Max connectivity extension installed at the moment, so our exr loading options differ a bit. I need to look at using Reinhard as in your approach.

    Of note, I found strong effects on the outcome (quality and rendertime) within the domelight settings by adjusting the balance between the store with irradiance map, resolution, and subdivision.

    WIthout store with irradinace map checked, you have to use much higher subdivisions to reduce grain and can thus expect higher rendertimes. But to go along with the great rendertimes you sacrifice an amount of shadow definition.

    Concerning the resolution setting, I found that it had little effect on render time, but shadow definition can change quite a bit when it is adjusted when store with irradiance map in not checked.

    My preferred settings in the domelight for quality:

    Store with irradiance map - off…Subdivisions - 12 to 24…Resolution - 1600

    For speed:

    Store with irradiance map - on…Subdivisions - 8 to 12…Resolution - 800

  7. I was right on the doggy with the setup as well. The only difference is I was using Linear, Affect Colours in Colour Mapping and adjusting the HDRi exposure with Dome light multiplier. The burn reduction tip in Reinhard is welcomed. Great HDRi’s Peter. Thanks a mill!

  8. @beestee, I use max 2009, no connectivity extension (i dont think). Thanks for your findings, personally, I tend to use universal settings and leave most things like this at default but its good to know anyway.

    @Dan, you’re welcome, make sure you show me something nice you’ve made with them!

  9. After digging I can confirm that the loader with the connectivity extension does not have the same options. I removed the new exr loader (fOpenEXR.dlu) from the stdplugs folder and the one with the same interface as yours comes up. No option for RealPixel RGB in the new one, so I think I will stick with the old one.

  10. Interesting. I just hope using realpixel RGB is OK and i’m not misleading any of you ;-) In my tests it seems to work exactly the same as RGBA and like I said saves quite a lot of memory when rendering.

  11. christoph

    hi! i can confirm also that the new I/O plugin from the connectivity extension not only doesn´t have those mentioned options, it also has a big bug. in my case no light is emitted from the exr unless i deactivate (remove) the new fopenexr.dlu from the max plugin directory, then everythink works flawless…

  12. Hiya - thanks for all the hard work Peter. Just out of interest, have you experimented with the Gamma setting when using the VrayHDRI as the environment map? Do you leave it as 1.0 - we’ve tried it in various settings, and I’ve seen on the internet people suggesting that you should use it at 0.454 to counteract the Gamma 2.2 bitmap input (1 / 2.2 = 0.454).

    When you do implement this you get much stronger contrast in the light/shadow, but perhaps lose some of the subtlety of leaving it as Gamma 1.0.

    Any thoughts?

  13. Hi James,

    I *think* that the correct workflow would be to leave the gamma at 1. You definitely get stronger shadows when changing the gamma, but my feeling is that the colors in general get a bit messed up, and the rendered output no longer matches the backplate jpgs. I usually supplement the exr sky with a vraysun if I want stronger shadows.

    Of course its up to you how you use the exr’s, and i would welcome any insights or suggestions!

  14. PS. I’m not even sure where to change the gamma when using the max exr loader, rgb level, rgb offset, exponent, white point, black point??? can anyone help?

  15. You may have to set the Gamma when loading the map in the Max bitmap loader (e.g. below the file name) - given options:-

    Use image’s own gamma
    Use system default gamma
    Override (numerical input)

    More options which affect the light quality…I wonder which is “correct”?

  16. pretty sure those gamma options are greyed out when loading exr files

  17. Ahh…I’m loading an HDR no an EXR (would have expected the loader to be ’similar’ at least.)

    Out of interest - did you light your Farnsworth House images with HDRi or Vray Sun/Sky?

  18. It was a HDRi combined with vraysun, let me check which one…………

    ……

    ………

    1725 Sun Clouds

  19. I often play with the gamma to get sharper shadows out of HDR maps (In fact I think I may be the guy who originally suggested this). If you use .exrs, you’re better off changing the gamma in PShop or any other photo editor. Or you can convert the .exr to a hdr and load it via the VrayHDRI map, which lets you change the gamma on the fly.

    As Peter said, you may see some changes in colours when doing this, and in some cases, it will make it difficult to use the map as a backplate. However, this is not always the case and neither do you absolutely have to use 0.454. Some maps will see noticeable improvements by lowering the gamma to 0.6 or 0.7 alone.

    Having said that, I’ve got a couple of Peter’s map and they have such a wide dynamic range that they (at least the sunny ones) give you sharp shadows out of the box without any need to touch the gamma.

  20. Hey Peter!
    I am following your blog from quite a while… I have little question regarding gama… if you have Reinhard

    mul 1
    burn 0.25
    gama 2.2

    Then wots ur LUT system gama ?

    2.2 ? or u dont use it at all and leave it 1 on default ?

    In my max I got
    Enable gama/lut
    Gama: 2.2
    Affect color selectors tick
    affect material editor tick
    Bitmap files
    both 2.2

    max 2010 x64

    Thanx for your help ! And see you around :)

    btw. somehow when you upload sliders on your web it kill my mouse and make it invisible :o !

  21. I normally use color correction maps to apply inverse gamma to my bitmaps and colors, not sure why, but your settings look fine as well (and yours is the more correct way of doing it)

  22. Do you have simillar settings for Mental Ray also ?

    I ask that because we use Mental Ray at work, no vray that’s sad.

    I put your blog in my inspiration blogroll :)

  23. correntes

    Hello Peter,

    I have one problem. Well i was trying this hdri workflow but i cant keep the dome light multiplier at 1. I have to bump it to 60 or 80 so a i can see the hdri in background.

    I work with LWF and i understand manual photography too so i’m familiarized and understand the vraycamera parameters .

    My goal is to have a physical correct relation with dome light multiplier and the hour of the day that i’m recreating.

    Thanks in advance

  24. @correntes are you using one of my HDRs or something else?

    @zeller samuel thanks for your comments! most of this should be applicable to MR too, but I’m afraid I have no clue about how MR’s color mapping works

    @bitrateqz lovely render!

  25. Im gonna try one HDRI for Mental ray with your settings at work and also for Octane render just to see if I can mimic this setup
    Do you have a different setup for interiors shots or do you use the same settings ?

  26. mostly the same, maybe lower the reinhard burn to 0.05 if there is lots of light coming through windows, then I probably would compensate with a stronger s-curve to get more contrast back

  27. correntes

    well for now i’m using some hdris from dosch to see if i can adapt tho hdri+vraysun

    but if i succeed i plan to buy some of your hdrs they seem pretty good :)

  28. peter,

    i’ve noticed when you place the hdri as a texture on the dome light, you lose the alpha channel as it reads it as an object. is the correct way to get back the alpha cut out by making the light invisible? i’ve noticed that method changes the result a bit. thanks.

  29. @correntes yes it’s very possible with other HDRi’s that you might need to have a multiplier of 60 or similar

    @bshigeta not having ‘affect alpha’ on dome lights is a current limitation which might be added in future releases on vray. Until then, you can instance the exr to the environment and then turn on far clipping in your camera and set it to 999999999999 (or another really high number!) then you should get a nice alpha channel

  30. Hi peter, ive tried to use your settings for render but im getting too much noise. do you know why? BTW, ive bought the dusky pinky sky its awesome! ty!

  31. well noise is down to what you set the image sampler and noise threshold to, both of which i didnt cover..

  32. Interesting technique in regards to inserting the HDRI into a light dome. After some tests I definitely see the advantages of this. I used to just use the physical sky setups in both mental and V-Ray.

    However I would be correct in assuming once you use HDRI as a lighting source physical camera’s and phyiscal settings on IES lights no longer apply?

    It turns into some kind of a bizzare balance with multipliers. But I think it’s worth it this way. Cheers peter.

  33. szarlei

    peter, i dont know if i understood properly :)
    if I buy for eg. HDRi - 1725, i get one hdri image and 11 jpegs, right ?:)

  34. @szarlei yes, thats correct. The 11 staight shots of the sky are for compositing your render into, although as I’ve said before, I usually find the sky rendered directly from the HDRi is good enough.

  35. excellent tutorial peter, thanks. would you mind sharing how you do your background skies? in model or post or are the part of the hdri? if not then where did you get them? many thanks.

  36. Hi Kevin, the background skies are almost always part of the HDRi as rendered. Occasionally I substitute them out for the straight shots of the sky in post (I include these straight shots in the HDR skies I am selling)

  37. George R

    I’d love to know how you combine VRaySun with these as you suggest. How do you balance the HDR and the Sun?

  38. Thanks Peter. So are the background skies in your Line House renders from your HDR skies also?

  39. Yes, all apart from one of the views as far as I can remember

  40. niksoftarg

    Fantastic Tutorial….why did you use a vraylight and not the vray::enviroment?

  41. metrocubicodigital

    Using vray sun + your hdri 1725.
    Im getting very nice results with exponential color mapping all values at 1.
    Pretty close to your brightness/ contrast and shadow sharp.
    Gamma 2.2 in 3dsmax settings equal like mentioned above by dariusz.

    My only problem now is when using vray sun (which i ve tried to match exactly with the hdri sun position height) seems to give me some subtle double shadows. Its hard to notice but its there - dual shadow by vray sun and hdri.
    Peter how do you deal with vray sun + hdri shadows in your scenes?

  42. Hi Peter.
    Thanks for all your tutorials and now the skies. We bought a few of them to try it out. After fixing the fOpenExr.dlu it´s looking good. I still have one problem though. Alpha channel. The trick with far clipping is good but the dome is still visible to refraction. So I can´t replace the background seen through glass and that´s a big problem. Any thoughts?

  43. kevin miller

    I’ll make a deal, I will purchase 2 of the HDRIs tomorrow if you make a good tuturial using MR in max and help make sure they come out right. I have had issues with enough light coming from the skydome and proper shadow casting since the domes can be rather large. It could most likely be me but I have tried tutorial after tutorial and purchased several HDRI skies and the lighting is not bright enough for a clear, sunlit day.

    I am getting frustrated but I want to believe this can work……

  44. Hi Kevin, I’d have to learn how to use MR first! Maybe someone else here can help out?

  45. DrZukunft

    Hey Peter

    I have some problems using your maps with Vray RT.
    For some reason they seem to appear overbright (like if i had expose off on my vraycamera on another hdri map). rendering is fine though.

    I offcause use vray sp4a and vray rt 1.5 sp1a

    When i use the exact same camera/lightning/bitmap/scenesetup settings on another map i get perfectly fine results, its only your maps that seems to be causing me problems.

    Do you have any idea why?

    Another question:
    When i try to convert the exr -> hdr (using photoshop cs4), it decreases the filesize from about 160 mbyte to roughly 50 mbyte. However, the lightning seems to be messing up (like when downsizing the files as in my previous post).
    Do you know any way this is possible, and why do you use exr format instead of hdr? (hdr is supported by vrayhdri which have a (IMO) better interface. Also vrayhdri supports mirrored ball as some of my hdr maps are in, which makes it easier to swap between them. Why vradyhdri doesnt support exr is beyond my understanding.

    Also a note regarding the alphamap issue:
    If you set the vray domelight to invisible and put in an instance of your hdri map to your environment/background, you will get perfectly fine rendered alphamaps.

    //Drzukunft

  46. Hello Doctor,

    Do you use custom max gamma settings? If so, maybe you need to specify gamma 1 when loading the exr? FWIW I have no problems with my maps and vrayRT, the output matches normal vray output.

    I’m sure exr support to vrayhdri will happen soon… maybe in sp5?

    Its my understanding that exr has better color accuracy than radiance (.hdr) hence the file size difference. I think radiance is a bit like an 8bit jpg that happens to have more dynamic range, whereas exr preserves all the colours from the raw file better. I’m sure I read something about that in my HDRi Handbook anyway. I dont want to lose any color info hence my choice of format.

    Thanks for the tip on the alpha map issue, will try it out.

  47. DrZukunft

    Hey Peter

    Thank you, it helped with overriding images own default gamme, and setting it to 1.

    Now my only problem is to find out how to make a lowres version for previews.

    Did that alpha mapping work out for you? as far as i can see the IBL isnt calculated twice (from both light and environment map).

    regarding hdr VS exr, ive read a bit up on it, and it seems your correct with exr having a wider colorspace than hdr. Also, as you properbly know, exr supports layers (which is useful with vrayrendelements -> vraymtlselect, iam a heavy photoshopper though).

  48. hi peter. lovely stuff, thank you. i’m having similar problems with a subtle double shadow when i combone the hdr file with a vray sun despite matching as close as i can the position of the sun to the hdr file. any advice? thanks again.

  49. Just realised that when you said in an earlier comment that the Gamma options are greyed out, that means you have Gamma correction off in your Gamma/LUT settings…

    As per my comment to your newest tutorial…correct?

Leave a Comment