Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

Physically Based Lighting in Unreal Engine 4

0 Aufrufe

Veröffentlicht am

Talk held at Unreal Meetup Munich on 15th May 2019.

I talked about some of the theoretical background of physically based lighting, demonstrated a workflow + containing value tables needed to be able to easily use the workflow.

Veröffentlicht in: Präsentationen & Vorträge
  • Als Erste(r) kommentieren

Physically Based Lighting in Unreal Engine 4

  1. 1. we are experts in UNREAL a great engine for our games we love the Unity engine 2nd best thing in life we have 40 talents on the team with international background we love to be healthy we support our team we are located in Munich the heart of Europe we create games and we love it Founded in 2013 25+ projects released Ostwind – Ari’s Ankunft Das Boot VR Ostwind – Das Spiel Coal Mine VR Quarantine Open World Efficient Tools Setup/ Automation Agile Project Management Virtual Reality Interactive Non-Game Applications
  2. 2. We are a rapidly growing independent developer with 42 employees and a proven track-record of delivering both internal and external IP’s from Conception through Release, and beyond. We have specialized in development using the Unreal Engine since 2014, and have already shipped more than 12 released products of various sizes for both corporate and entertainment applications. This has allowed us to build an efficient and state-of-the-art technology stack (including automated testing and open-world benchmarking) that allows us to improve our overall efficiency while reducing both cost and personnel overhead. We strongly value the importance of on-time and on-budget production and pride ourselves on our strong Project Management and External Collaboration skills. With our deep understanding of both open-world environments and performance, as well as our automated tool-chain built around fast and efficient iterative development, we feel we are a perfect fit for your project needs and are excited at the prospect of partnering to deliver an AAA Experience your players will love.
  3. 3. • Physically Based Rendering • Physical light units • Light temperature • Measured light values • Brightness • Exposure Values • Auto Exposure/ Eye Adaption • Color Correction • Color Spaces • Display Device
  4. 4. Source: https://academy.allegorithmic.com/courses/the-pbr-guide-part-2
  5. 5. Source: https://academy.allegorithmic.com/courses/the-pbr-guide-part-2Source: https://seblagarde.wordpress.com/2014/04/14/dontnod-physically-based-rendering-chart-for-unreal-engine-4/
  6. 6. Source: https://academy.allegorithmic.com/courses/the-pbr-guide-part-2Source: https://seblagarde.wordpress.com/2014/04/14/dontnod-physically-based-rendering-chart-for-unreal-engine-4/
  7. 7. Source: https://academy.allegorithmic.com/courses/the-pbr-guide-part-2Source: https://seblagarde.wordpress.com/2014/04/14/dontnod-physically-based-rendering-chart-for-unreal-engine-4/
  8. 8. NAME UNIT NAME UNIT SYMBOL RELATIONSHIP Steradian/ square radian sr Luminous flux/ power lumen lm cd * sr Luminous intensity candela cd lm / sr Luminance Nit nt cd / m² Illuminance lux lx lm / m² Converison of nit to lux : 1 lx = 1 nt * π (~ 3.14159)
  9. 9. Source: https://medium.com/@Dropality/matching-lights-color-temperature-to-your-home-8ee80cc79474
  10. 10. Illuminance (lux) Surfaces illuminated by 0.00013 Moonless, overcast night sky (starlight) 0.00022 Star light 0.001 Clear night sky (new moon) 0.002 Moonless clear night sky with airglow 0.02 Half moon in 45° height 0.05–0.36 Full moon on a clear night 0.27 Full moon in zenith 1 Deep twilight; candle at 1m distance 3.4 Dark limit of civil twilight under a clear sky 10 Twilight; street lights 20–50 Public areas with dark surroundings 50 Family living room lights (Australia, 1998) 80 Office building hallway/toilet lighting 100 Very dark overcast day; corridor lighting 150 Train station platforms 320–500 Office/ room lighting 400 Sunrise or sunset on a clear day. Source: https://en.wikipedia.org/wiki/Lux, https://de.m.wikipedia.org/wiki/Beleuchtungsstärke#Beispiele, http://stjarnhimlen.se/comp/radfaq.html#10 Illuminance (lux) Surfaces illuminated by 750 Dawn (sun just beneath horizon) 1000 Overcast day; typical TV studio lighting 1,400 Soccer stadium of category 4 (elite) 6,000 Overcast sky, sun height 16° (winter, midday) 10,000 In shadowed area during summer 10,000–25,000 Full daylight (not direct sun) 15,000 Minimum requirement for dental light 19,000 Overcast sky, sun height 60° (summer, midday) 20,000 Clear sky, sun height 16° (central Europe midday during winter) Contribution of sun: 8,000 Contribution of sky light: 12,000 90,000 Clear sky, sun height 60° (central Europe midday during summer) Contribution of sun: 70,000 Contribution of sky light: 20,000 32,000–100,000 Direct sunlight 105,000 5mW laserpointer, red (635nm), 3mm ray diameter 130,000 Sun overhead 160,000 Modern operating room light (3,500K) 427,000 5mW Laserpointer, green (532nm), 3mm ray diameter
  11. 11. Source: https://en.wikipedia.org/wiki/Brightness • Visual perception! • Subjective • “Brightness is the perception elicited by the luminance of a visual target” • Photography uses EV (exposure value) to unify brightness
  12. 12. https://www.dpmag.com/how-to/tip-of-the-week/the-sunny-f16-rule/
  13. 13. EV Chart of Full stops (ISO 100) EV f/1 f/1.4 f/2 f/2.8 f/4 f/5.6 f/8 f/11 f/16 f/22 f/32 EV -2 4" 8" 15" 30" 64" 128" 256" 512" -2 -1 2" 4" 8" 15" 30" 64" 128" 256" 512" -1 0 1 sec 2" 4" 8" 15" 30" 64" 128" 256" 512" 0 1 1/2 1 sec 2" 4" 8" 15" 30" 64" 128" 256" 512" 1 2 1/4 1/2 1 sec 2" 4" 8" 15" 30" 64" 128" 256" 2 3 1/8 1/4 1/2 1 sec 2" 4" 8" 15" 30" 64" 128" 3 4 1/15 1/8 1/4 1/2 1 sec 2" 4" 8" 15" 30" 64" 4 5 1/30 1/15 1/8 1/4 1/2 1 sec 2" 4" 8" 15" 30" 5 6 1/60 1/30 1/15 1/8 1/4 1/2 1 sec 2" 4" 8" 15" 6 7 1/125 1/60 1/30 1/15 1/8 1/4 1/2 1 sec 2" 4" 8" 7 8 1/250 1/125 1/60 1/30 1/15 1/8 1/4 1/2 1 sec 2" 4" 8 9 1/500 1/250 1/125 1/60 1/30 1/15 1/8 1/4 1/2 1 sec 2" 9 10 1/1000 1/500 1/250 1/125 1/60 1/30 1/15 1/8 1/4 1/2 1 sec 10 11 1/2000 1/1000 1/500 1/250 1/125 1/60 1/30 1/15 1/8 1/4 1/2 11 12 1/4000 1/2000 1/1000 1/500 1/250 1/125 1/60 1/30 1/15 1/8 1/4 12 13 1/8000 1/4000 1/2000 1/1000 1/500 1/250 1/125 1/60 1/30 1/15 1/8 13 14 1/8000 1/4000 1/2000 1/1000 1/500 1/250 1/125 1/60 1/30 1/15 14 15 1/8000 1/4000 1/2000 1/1000 1/500 1/250 1/125 1/60 1/30 15 16 1/8000 1/4000 1/2000 1/1000 1/500 1/250 1/125 1/60 16 17 1/8000 1/4000 1/2000 1/1000 1/500 1/250 1/125 17 18 1/8000 1/4000 1/2000 1/1000 1/500 1/250 18 19 1/8000 1/4000 1/2000 1/1000 1/500 19 20 1/8000 1/4000 1/2000 1/1000 20 21 1/8000 1/4000 1/2000 21 EV f/1 f/1.4 f/2 f/2.8 f/4 f/5.6 f/8 f/11 f/16 f/22 f/32 EV
  14. 14. • UE4.19+, better 4.21+ • Enable Pre-Exposure in Project Settings (Rendering/ Default Settings)
  15. 15. Scene Setup •Properly valued PBR Textures Light Setup •Sky •Sky Light •Directional Light •Post Process Sky Setup •HDR sky image •Manual exposure (PPV) •Camera settings use Sunny16 to match target scenery Sky Luminance •Depends on how HDR image was exposed, can be a mult of up to 100k •Needs to look properly exposed •Measure using Pixel Inspector Directional Light Intensity •Use lux charts as base line •125k lx for full bright sun Double check values •Use white, fully rough mat on sphere/ plane •Needs to measure lux values found in tables •Can be compared to self measured values Tweak •Use reference material to adjust light values •Eye balling •Artistic Style Convert to auto exposure •Look up matching EV values •Set Min/Max EV to same •Set exposure compensation to match previous settings (usually -1 to -1.5) •Vary Min/Max EV by 1-3 steps
  16. 16. Check Base Color values 2. Snip area 1. Enable Base Color Visualization 3. Compare with chart
  17. 17. Fake bounce light (make sure to set value of color high enough) Might only make sense for fully dynamic lighting setup! Avoid for baked lighting. Lux Meter Material In Starter Content / Materials is a Color Checker
  18. 18. Measure LUX values on your own using a LUX meter! Use Eye Adaption node in materials to compensate for auto exposure (contains value auto exposure is outputting roughly between 0 [dark] – 64+ [very bright])
  19. 19. Fix editor materials to work with high light values range by adding Eye Adaption node Use fixed exposure quickly
  20. 20. Source: https://academy.allegorithmic.com/courses/the-pbr-guide-part-2 • It‘s easy! • Normalized textures – can be reused in every project and work in every environment • Quick setup of base lighting for wanted scenario • No need to guess values • Realistic composition of lights (sun, artificial lights) • When lighting is setup that way, the only thing which is left is exposure and post • Ready for LDR and HDR display devices (just need to cut off values for LDR) (+ for whatever comes in future) • Ability to use known camera values (ISO, Aperture, Shutter Speed)
  21. 21. Source: https://academy.allegorithmic.com/courses/the-pbr-guide-part-2 • Need for newest engine version • Some engine materials won‘t render correctly (e.g. Landscape brush) if not fixed manually or in a later release • Planar reflections blow out when pre-exposure is enabled • It‘s a team effort – everyone should understand how it works to not break it
  22. 22. l.lang@aesir-interactive.com Talk to me or apply via aesir-interactive.com/jobs PARTNER OF THE REMOTE CONTROL FAMILY
  23. 23. Source: https://academy.allegorithmic.com/courses/the-pbr-guide-part-2 • Unreal by default uses Rec709/sRGB, D65 color gamut for output • PC monitors usually use sRGB color space • HDR display devices use more color rich color gamut Source: https://en.wikipedia.org/wiki/SRGB, https://docs.unrealengine.com/en-us/Engine/Rendering/HDRDisplayOutput, https://www.flickr.com/photos/jeanrouck/13262569773
  24. 24. Source: https://en.m.wikipedia.org/wiki/Exposure_value#EV_as_a_measure_of_luminance_and_illuminance Lighting condition EV100 Daylight Light sand or snow in full or slightly hazy sunlight (distinct shadows) 16 Typical scene in full or slightly hazy sunlight (distinct shadows) 15 Typical scene in hazy sunlight (soft shadows) 14 Typical scene, cloudy bright (no shadows) 13 Typical scene, heavy overcast 12 Areas in open shade, clear sunlight 12 Outdoor, natural light Rainbows Clear sky background 15 Cloudy sky background 14 Sunsets and skylines Just before sunset 12–14 At sunset 12 Just after sunset 9–11 The Moon altitude > 40° Full 15 Gibbous 14 Quarter 13 Crescent 12 Blood 0 to 3[6] Moonlight, Moon altitude > 40° Full −3 to −2 Gibbous −4 Quarter −6 Aurora borealis and australis Bright −4 to −3 Medium −6 to −5 Milky Way galactic center −11 to −9 Lighting condition EV100 Outdoor, artificial light Neon and other bright signs 9–10 Night sports 9 Fires and burning buildings 9 Bright street scenes 8 Night street scenes and window displays 7–8 Night vehicle traffic 5 Fairs and amusement parks 7 Christmas tree lights 4–5 Floodlit buildings, monuments, and fountains 3–5 Distant views of lighted buildings 2 Indoor, artificial light Galleries 8–11 Sports events, stage shows, and the like 8–9 Circuses, floodlit 8 Ice shows, floodlit 9 Offices and work areas 7–8 Home interiors 5–7 Christmas tree lights 4–5 Can be directly used for auto exposure or mapped using EV100 chart
  25. 25. Source: https://en.m.wikipedia.org/wiki/Exposure_value#EV_as_a_measure_of_luminance_and_illuminance EV100 Luminance Illuminance cd/m2 (nit) lx −4 0.008 0.156 −3 0.016 0.313 −2 0.031 0.625 −1 0.063 1.25 0 0.125 2.5 1 0.25 5 2 0.5 10 3 1 20 4 2 40 5 4 80 6 8 160 7 16 320 8 32 640 9 64 1280 10 128 2560 11 256 5120 12 512 10,240 13 1024 20,480 14 2048 40,960 15 4096 81,920 16 8192 163,840
  26. 26. For better and quicker bake results, check out Luoshuang‘s GPU Lightmapper (https://forums.unrealengine.com/development-discussion/rendering/1460002-luoshuang-s-gpulightmass)

×