HDRI Lighting in Unreal Engine

Now this HDRI is added in our Engine Content and we will use it as our “Environment Background” and as “SLS Specified Cubemap” for lighting the scene through “Skylight”.

Using HDRI as environment background – To do so, we need a sphere to map our HDRI onto it. Luckily, Unreal Engine already have this static mesh available to use, it’s been hidden away in “Engine Content”. To get “EditorSky Sphere” in the scene, first we to unhide the Engine Content –

Click on Content Browser and after that click on “View Options” in bottom right. We have to check “Show Engine Content” to be able to see the “Engine Content” in Content Brower.

Engine Content1Engine Content2After getting the “Engine Content” folder in Content Browser, look for “Editor Meshes” folder.

Engine Content3In “EditorMeshes” folder you will find “EditorSky Sphere”

Engine Content4Drag and Drop “EditorSky Sphere” in the Engine viewport and position it accordingly (Center of the scene)

Editorsky

After placing the “EditorSky Sphere” in the scene, it’s time to set the material of the sphere to use HDRI as projected map.

Select “EditorSky” Sphere from ‘World Outliner’ or by clicking it in ‘Viewport’ –

It’s good idea to get some knowledge about ‘Material Creation’, I highly recommend to go through this awesome video tutorial by EPIC –

https://www.youtube.com/watch?v=Yb4uu2NEC0E

Editorsky MaetrialPurpose of all these nodes is to get UVW mapping correct and ability to change rotation of HDRI. As the material is “Unlit” and Texture is plugged into “Emissive” node, Lighting will not affect it and we can easily control the intensity of the texture.

To get the best visual resolution of HDRI, we need to use these settings (You need to apply this on individual HDRI you import). –

HDRi QualityAfter applying material on EditorSkySphere –

Sky example

Now we will create “SkyLight” –

Skylight CreationWe have everything in place now. Lighting Build is next step.

After this Place a Post Process volume with “Unbound” Option checked to bring in the “Eye Adaptation back”. We added Post Process Volume at the end because if we already used Post Process Volume at the start, we were not be able to get the idea of HDRI illumination through Skylight. A properly lit environment is first step towards realism, increasing light intensity and exposure through Post Process comes second.

“As for Lightmap resolution – I am using “256” on all objects at this stage, will be increasing some of them as we progress further.”

Side Note – This document by Digital Tutors is good for understating some basic terminology for texturing

http://blog.digitaltutors.com/cover-bases-common-3d-texturing-terminology/

Before building lighting, we will set the ‘Lighting Quality” and ‘Lightmass Settings” as –

Build QualityLightmass Settings

What are these values and how they control lighting quality?

All these values and other things will be covered in next tutorial series.

Here are the final results –

FinalResults HDRI (1) FinalResults HDRI (2) FinalResults HDRI (3) FinalResults HDRI (4) FinalResults HDRI (5)

 

Tutorial File Download Link (Unreal Engine 4.10 and above)https://www.dropbox.com/s/8gp9ze6mko8bi7v/Simple%20Extrior%20HDRI%20Setup.7z?dl=0

 

 

 

 

Pages: 1 2

76 Comments

  1. Excellent tutorial, really useful… thank you so much for doing this 🙂


  2. That is really helpful and well explained. Thank you!

  3. 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 ?

    1. Author

      Adding a Post Process volume will do the job. I have added this info above.

  4. 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.

    Do I miss something.

    Thanks !!!
    Fabien

    1. Author

      Hi Fabian,

      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.

      1. Hello, I am not able to find information to increase the HDRI’s resolution from 512×512 to its original size. Can you please help?

  5. hi,

    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?

    1. Yes he has a directional light included in the scene. But it doesn’t affect the world, so I don’t know why it’s included in the project file

  6. thx you very much for the tutorial file…

  7. than you very much,

    This tutorial are super easy to understand with details explanation.

    Can’t wait for the next tutorial.

  8. HI raghu excelent tut, i want to ask one thing what if i rotate the sky hdri through material constant node will it effect sky light automatically? how do i link hdri sphere to sky light?

  9. 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

    why?

    1. EXACT same issue here!

      any help pr hint would be appreciated!

      1. The error I got is:

        Error [SM5] (Node TextureSample) Coercion failed: MaterialFloat3 Local4 = (Local1 / Local3);
        : float3 -> float2

        I could get you a screenshot, but appears not to be possible in the comment area

        greets

          1. Hey Raghu,

            I really appreciate your help, I´ve downloaded some “real” HDRs and got it right so far, the problem is now UE4 says when rendering this:

            Error EditorSkySphere Object has overlapping UVs.
            Info EditorSkySphere Lightmap UV are overlapping by 50.0%. Please adjust content – Enable Error Coloring to visualize.

            I used the same EditorSkySphere as you in the EngineContent from UE4…so what to do?

            greets

          2. Hello Raghu,

            Would you be able to re-host your solution? I’m encountering the same problem and hole your solution can address it!

            Thanks!

    2. 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.

      1. That takes us up to the next level. Great potgins.


  10. @peter – I suggest taking a look at the SM_Sky_Sphere; That one does not spit out that overlapping uv error.

  11. HI RAG, GREAT WORK THERE….

    I did as same as your tutorials but when I build lighting I get and error for the SKYSPHERE saying that has overlapped UVs and further saying 50% of bla bla bal…. 🙂

    Please advice me for this…

    Thanks Rag…
    All the best..

  12. 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

  13. How did you get those shadows?
    Neither SkyLight or Directional Light seems to gerenate the shadows.

    I tried everything in my own tests…


  14. I just cant wait for your next tutorial!! It help so much!! thanks

  15. Thank you so much for your explanation! this is a major help!!

  16. I get and error for the SKYSPHERE saying that has overlapped UVs

  17. Can you align a direct light with the HDRI sun and link to it? (for rotation)

    Thanks!

    1. Author

      Yes you can, I already answered this question in the comments. (reply to SAM)

  18. 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!

  19. 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

  20. Thanks for making this tutorial! It’s the only one I could find

  21. 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.

  22. Maybe im late since the dropbox file is not there anymore someone still have that? Please post it thank you i cannot proceed without those.

  23. Everything looked good so far but the only thing bothering me is that the quality(resolution) of the skybox seem to suffer. Even after selecting nomipmap there’s still a quality loss that can be seen and when comparing it with the original image, the difference is pretty obvious.

    Any suggestion or solution about this?
    P.S Nice tut btw keep up the good work!!

  24. Skylight doesn’t take HDRI when using Specified cubemap….Am I Doing Anything wrong?



  25. Just Wanted to thank you for sharing this amazing tutorial !
    really appreciate it 😀

  26. Thank you so much. This article was very useful.

  27. my entire model is black… hdri not giving enough light. level has precomputed visibility volumes precomputed visibility will not beeffective

  28. Hi! First of all thank you so much for the tutorial! Very helpful! Is there a way to use HDRI together with directional light to keep the light shafts? Thanks!

  29. +1 for thank you so much for the great tutorial!!

  30. Hi,

    Awesome tutorial! Thank you.

    I am wondering if it is possible to reposition the SkySphere with the hdri with it? The problem I am having is the horizon of the hdri I am using is showing too much and I would like to lower the sphere in relation to my scene. I can move the sphere, but the image does not move with it.

    Thanks,

    Jeremy

  31. Greetings! Fantastic tutorial but I’m wondering if you could provide a new Dropbox download link for the tutorial file? Tnx!

  32. When you ultimately do struck a give, you’ll nonetheless possess a excellent possibility of benefiting from actions.

  33. Unfortunately there is something really bad working. HDRI just tints the scene, but there is no dynamic range – shadows are totally blured etc. And it is not about lightmap resolution. I think it does not use HDR but only LDR information.


  34. Can you share the link to the setup again?

  35. Thank you so much for showing how to disable autoexpose in project setting!

  36. Hi! Thanks for the nice tutorial! Very helpful! This tutorial are super easy to understand with details explanation.

    Can’t wait for the next tutorial.

  37. I’m trying to follow along with this but the link doesn’t work for me to compare to my scene. I’m trying to use this to help light an interior scene. In my interior, everything is massively blown out. You mentioned changing the exposure in post process volume, but didn’t give details on that. Can you share any info on that? Thanks.

  38. I work on Estates most of the Time with the Unreal Engine. And yes the HDRI works like a charm. I loke your Post i keep up from now!

  39. A very well described and nice tutorial. Thank you very much! I will follow your blog in the future.

  40. Thank you for providing this comprehensive guide to implementing 3ds Max and Vray lighting workflows in Unreal Engine 4. Your explanation illuminates how these diverse platforms can be skillfully harnessed to achieve similar results. Highlighting the importance of both natural and artificial lighting, HDRI usage, and understanding camera physics aligns perfectly with the arch-vis industry’s requirements. Your deep dive into the significance of understanding human eye adaptation and DSLR exposure in virtual rendering adds a unique perspective, showing how these real-world phenomena impact virtual environments. Your effort to simplify the migration between these software platforms, coupled with your focus on education and understanding of the fundamental principles, is greatly appreciated.

  41. This information about HDRI is truly valuable. I’ll be keeping up with your blog for any updates.

  42. Guter Artikel. Ich werde in den nächsten Wochen mit der Unreal Engine 5 meine ersten Schritte machen. Ich hoffe, ich bekomme das auch so gut hin.

Leave a Reply

Your email address will not be published. Required fields are marked *