Primary Navigation Menu

HDRI Lighting in Unreal Engine

HDRI Lighting in Unreal Engine

I will be taking 3ds Max and Vray lighting workflow as a reference to recreate the same in Unreal Engine 4. Main focus will be on Unreal Engine, just giving reference to 3ds max and Vray settings. (It’s not a 3ds Max and Vray Tutorial)

General Lighting methods prevailing in Arch-Vis industry using 3ds Max and Vray –

I will be recreating this workflow concerned with HDRI and Directional light as SUN light for Interiors and Exteriors. It is imperative that we first know how to use HDRI correctly to simulate proper lighting with correct exposure.

In above scenarios (Exterior and Interior) VrayPhysical Camera plays a vital role in simulating DSLR exposure with physically accurate lighting values (Real life light intensity values in Luminance or Radiance).

It is important to know why we use Physical Camera features in any Rendering Engine. In real life, human eye plays a critical role in compensating for difference in light intensities we encounter on daily basis by controlling amount of light entering, through increasing or decreasing iris size.

When it comes to simulating human eye behavior technically, DSLR Cameras come really close to do so with ample amount of control and as we are already using these cameras to take photographs of our surroundings, it is easy if we recreate those settings virtually in our rendering engines also. It’s a well-known fact that to render virtual images/environments, basic knowledge of photography and light behavior plays a critical role.

When we take photographs with DSLR camera on “Manual mode”, we start to get an idea about the settings concerned to capture “what we are seeing in real time” and “what we are getting as photograph” ( not too bright or too dark). I will not be divulging much into DSLR and Manual settings more, but that does not mean I will leave it here as it is – for all the techno freak guys, reading this material will certainly help (I highly recommend going through this) –

Question – Why the hell I am reading about human eye and DSLR camera in a blog concerned with light setup in Unreal Engine?

Answer – It’s always important to understand basics that are concerned with lighting workflow irrespective of application and also Unreal Engine got this awesome “Eye Adaptation” already incorporated in the form of “Auto Exposure”. But to understand that properly, it’s important to get some basic idea first.

In Unreal Engine when we create a scene, which covers both exteriors and interiors simultaneously, controlling light balance becomes somewhat difficult due to variation in light intensities concerning exterior and interior environment. Also as character moves like a real human being in interactive environment, it’s wise to simulate human eye adaption in Engine itself to create realistic feel and workflow. All the information regarding the Auto exposure is given in the following link –

“I will try to persuade EPIC to include Physical Camera settings in Engine. It will make the Engine’s Lighting workflow as per with other render engines, which in turn will be super easy to migrate and understand.”

Now as we have some basic understating about the exposure settings in the Engine, we will proceed with creating a simple scene only lit by HDRI. I am assuming that my readers have some basic knowledge of Unreal Engine, so will skip some fundamental steps.

Open Unreal Engine and create a new project by selecting “First Person Template”

In this project we will create a new “empty level” for our HDRI workflow (save it before starting work).

Now import your geometry/meshes into content folder of Unreal Engine (For more details about elaborate steps involved – see this tutorial)

Disable Auto Exposure from project settings

After that we will create “Lightmass Importance Volume” covering all of our meshes in the level which are going to render.

Next step will be of creating Box Reflection Capture wrapping entire meshes. This is very important for simulating correct reflections on objects inside and outside the building, you can also use large sphere reflection capture in exteriors (results want change that much).

Now it’s time setup HDRI as our environment background and create “Skylight” that will use the same HDRI for lighting but before that we have to import our HDRI into Engine. There are several methods to do so but we will go for the easiest one i.e. Drag and Drop.

hello,
very ineresting
how can you control intensity of lightning and shadows of the scene in casewhen hdri is not giving enough light to show mesh/model?
and how you control scale? to have mesh relating proportions to hdri space ?

Hello,
I followed your tutorial is great but I wondering it miss some element no ?
When I import a HDR into Unreal, the compression setting is set to HDR RGB no sRGB and so sRGB is unchecked, and into the material I got error and so I need to put the compression setting to default and check sRGB.
Then I need to put the HDR at 0.05 in brightness if not it’s only white.
And I really don’t know how do you get the hdr at this beautiful resolution, I can only get the hdr blurred in 512×512.

I have added the information required to get the best resolution out of HDRI, check it above.

Colour information contained in some HDRI’s tends to blown away the lighting information, as we use HDRI inverse gamma and overall multiplier in VRayHDRI map, you can safely decrease the HDRI brightness as required to get the desired results.

nice tutorial, but i also guess there is something missing…i tried to recreate this scene with my own models and it doesn’t look like your endresult….do you have a directional light added? because i don’t see shadows in my scene, but yours is well shadowed…

how can i adjust the exposure of my hdri? is it possible to change it not in the post processing volume?

hi.
thx for this tutorial.
i jot an error when i “sky sphere material”
– i have import your same HDRI in unreal (drag and drop)
– in sky sphere material i drag and drop the texture
– in sky sphere material if i attact “texture sample” box in “emissive color” i get ERROR
– the errore detail is [SM5]
– i tried with another HDRI and i get same error

If possible, upload the Screenshot of the Material you are using as an image on Dropbox or something like that and share link here. It’s a common error and can be corrected easily, but I need to know what exactly you are doing wrong.

I have just done this and got the map to display correctly. You need to feed your Normalize node into a LongLatToUV node, then into your HDR texture sample. That goes into the Emissive and the result is as it should be.

I noticed the HDR in the Skylight is very limited range. There are no directional shadows at all. The result is basicallt just tinted occlusion.
Is there a known way to use ONLY an HDR to light a scene with directional shadows fromt he hotspots int he image – similar to how it is done in the VFX industry

I followed this to the letter, but am getting 50% overlapping UV errors on the skybox and the scene overall seems very dark. I am also getting issues with overlapping UV’s when importing archmodels assets (10% overlapping UV’s) even after using steamroller and looking at the second UV channel in UE4 as sucessfully flattened. I officially give up!

Hi;
Thank you for sharing your experience…
But I have shadows issue, as mentioned in some posts above;
I opened your project (HDRI_Setup level), added a simple asset, rebuild lighting (Production)… but NO SHADOWS..!! Although there were a directional light in the level
May be you should post a statement about this issue …
Best Regards

A quick tip for someone sticks on the sky sphere uv overlap problem.
find “M_Procedural_Sky_MASTER_UE4″ material in Content Browser -> Engine Content, use this material for the skysphere, simply replace the texture”cube map” in the material by our own hdri map. the uv problem should be solved.