High-dynamic-range rendering: Difference between revisions

Content deleted Content added
m Undid revision 1006821609 by 2600:6C65:747F:D528:1D3F:72FB:2FAD:BD28 (talk) LCD displays fits previous grammar usage better, and it still works. LCDs sounds informal
Game engines that support HDR rendering: mark Godot as citation needed
 
(38 intermediate revisions by 31 users not shown)
Line 1:
{{distinguish|High dynamic range video}}
[[File:Lost Coast HDR comparison.png|thumb|300px|right|A comparison of the standard fixed-aperture rendering (left) with the HDR rendering (right) in the video game ''[[Half-Life 2: Lost Coast]]'']]
{{Short description|Rendering of computer graphics scenes by using lighting calculations done in high-dynamic-range}}
'''High-dynamic-range rendering''' ('''HDRR''' or '''HDR rendering'''), also known as '''high-dynamic-range lighting''', is the [[Rendering (computer graphics)|rendering]] of [[computer graphics]] scenes by using [[computer graphics lighting|lighting]] calculations done in [[high dynamic range]] (HDR). This allows preservation of details that may be lost due to limiting [[contrast ratio]]s. [[Video game]]s and [[Computer animation|computer-generated movies and special effects]] benefit from this as it creates more realistic scenes than with the more simplistic lighting models used.
[[File:Lost Coast HDR comparison.png|thumb|300px|right|A comparison of the standard fixed-aperture rendering (left) with the HDR rendering (right) in the video game ''[[Half-Life 2: Lost Coast]].'' The HDRR was tone mapped to SDR for broad compatibility with almost all displays.]]
 
'''High-dynamic-range rendering''' ('''HDRR''' or '''HDR rendering'''), also known as '''high-dynamic-range lighting''', is the [[Rendering (computer graphics)|rendering]] of [[computer graphics]] scenes by using [[computer graphics lighting|lighting]] calculations done in [[high dynamic range]] (HDR). This allows preservation of details that may be lost due to limiting [[contrast ratio]]s. [[Video game]]s and [[Computer animation|computer-generated movies and special effects]] benefit from this as it creates more realistic scenes than with the more simplistic lighting models. HDRR was originally required to [[Tone mapping|tone map]] the rendered image onto [[Standard-dynamic-range video|Standard Dynamic Range]] (SDR) displays, as the first [[High-dynamic-range television#Displays|HDR capable displays]] did not arrive until the 2010s. However if a modern HDR display is available, it is possible to instead display the HDRR with even greater contrast and usedrealism.
Graphics processor company [[Nvidia]] summarizes the motivation for HDR in three points: bright things can be really bright, dark things can be really dark, and details can be seen in both.<ref name="6800_Leagues_HDR">{{cite web | url= http://download.nvidia.com/developer/presentations/2004/6800_Leagues/6800_Leagues_HDR.pdf | title= High Dynamic Range Rendering (on the GeForce 6800) | author= Simon Green and Cem Cebenoyan | year= 2004 | publisher= nVidia | work= [[GeForce 6]] Series | page= 3 }}</ref>
 
Graphics processor company [[Nvidia]] summarizes the motivation for HDRHDRR in three points: bright things can be really bright, dark things can be really dark, and details can be seen in both.<ref name="6800_Leagues_HDR">{{cite web | url= http://download.nvidia.com/developer/presentations/2004/6800_Leagues/6800_Leagues_HDR.pdf | title= High Dynamic Range Rendering (on the GeForce 6800) | author= Simon Green and Cem Cebenoyan | year= 2004 | publisher= nVidia | work= [[GeForce 6]] Series | page= 3 }}</ref>
 
==History==
 
The use of [[high-dynamic-range imaging]] (HDRI) in computer graphics was introduced by Greg Ward in 1985 with his open-source [[Radiance (software)|Radiance]] rendering and ''lighting simulation'' software which created the first file format to retain a high-dynamic-range image. HDRI languished for more than a decade, held back by limited computing power, storage, and capture methods. Not until recently{{whenWhen|date=JulyJanuary 2025|reason=“Recently” is ambiguous, especially when referring to a 40-year-old technology. Also, it wasn’t all that recent: if a Half-Life 2 expansion could use HDR in 2005 or so, that’s halfway between the invention of the technology and the current year. That is by no means recent in the history of 2017HDR.}} has the technology to put HDRI into practical use been developed.<ref name=reinhard1>{{cite book
| last = Reinhard
| first = Erik
Line 21 ⟶ 24:
|access-date=18 August 2009}}</ref>
 
In 1990, Eihachiro Nakame, ''etand al.'',associates presented a lighting model for driving simulators that highlighted the need for high-dynamic-range processing in realistic simulations.<ref name="nakamae1">{{cite book
| author = Eihachiro Nakamae
|author2=Kazufumi Kaneda |author3=Takashi Okamoto |author4=Tomoyuki Nishita
|s2cid=11880939 | title= A lighting model aiming at drive simulators
| journal=SIGGRAPH
| year=1990
| doi = 10.1145/97879.97922
| pageisbn = 395978-0201509335
|s2cid=11880939 |chapter title= A lighting model aiming at drive simulators
| isbn = 978-0201509335 }}</ref>
| title = Proceedings of the 17th annual conference on Computer graphics and interactive techniques
| year = 1990
| last1 = Nakamae
| authorfirst1 = Eihachiro Nakamae
| last2 = Kaneda
| first2 = Kazufumi
| last3 = Okamoto
| first3 = Takashi
| last4 = Nishita
| first4 = Tomoyuki
| pages = 395–404
| s2cid = 1764391011880939
}}</ref>
 
In 1995, Greg Spencer presented ''Physically-based glare effects for digital images'' at [[SIGGRAPH]], providing a quantitative model for flare and blooming in the human eye.<ref name="spencer1">{{cite book |author = Greg Spencer
|author2 = Peter Shirley
|author3 = Kurt Zimmerman
|author4 = Donald P. Greenberg
|s2cid = 17643910
|title = Physically-based glare effects for digital images
|journal = SIGGRAPH
|year = 1995
|doi = 10.1145/218380.218466
|page = [https://archive.org/details/computergraphics00sigg/page/325 325]
|isbn = 978-0897917018
|citeseerx = 10.1.1.41.1625
|title chapter = Physically-based glare effects for digital images
|url = https://archive.org/details/computergraphics00sigg/page/325
|title = Proceedings of the 22nd annual conference on Computer graphics and interactive techniques - SIGGRAPH '95
}}</ref>
|year = 1995
|last1 = Spencer
|first1 = Greg
|author2 last2 = Peter Shirley
|first2 = Peter
|author3 last3 = Kurt Zimmerman
|first3 = Kurt
|author4 last4 = Donald P. Greenberg
|first4 = Donald P.
|s2cid = 17643910
}}</ref>
 
In 1997, [[Paul Debevec]] presented ''Recovering high dynamic range radiance maps from photographs''<ref>{{cite journalbook
| doi=10.1145/258734.258884
| author=[[Paul E. Debevec]] and [[Jitendra Malik]]
| doi-access=free
| title= Recovering high dynamic range radiance maps from photographs
| author=[[Paul E. Debevec]] and [[Jitendra Malik]] | title=Proceedings of the 24th annual conference on Computer graphics and interactive techniques - SIGGRAPH '97
| journal=SIGGRAPH
| titlechapter= Recovering high dynamic range radiance maps from photographs
| yeardate=1997
| url=http://www.debevec.org/Research/HDR
| pages=369–378
}}</ref> at SIGGRAPH, and the following year presented ''Rendering synthetic objects into real scenes''.<ref>{{cite journal
| isbn=0897918967
}}</ref> at SIGGRAPH, and the following year presented ''Rendering synthetic objects into real scenes''.<ref>{{cite journalbook
| author=Paul E. Debevec
| title=Proceedings of the 25th annual conference on Computer graphics and interactive techniques - SIGGRAPH '98
| titlechapter= Rendering synthetic objects into real scenes: bridgingBridging traditional and image-based graphics with global illumination and high dynamic range photography
| yeardate=1998
| pages=189–198
| author-link=Paul E. Debevec
| doi=10.1145/280814.280864
| title= Rendering synthetic objects into real scenes: bridging traditional and image-based graphics with global illumination and high dynamic range photography
| isbn=0897919998
| journal=SIGGRAPH
| url doi-access= http://www.debevec.org/Research/IBL/ free}}</ref> These two papers laid the framework for creating HDR ''light probes'' of a ___location, and then using this probe to light a rendered scene.
| year=1998
| url = http://www.debevec.org/Research/IBL/ }}</ref> These two papers laid the framework for creating HDR ''light probes'' of a ___location, and then using this probe to light a rendered scene.
 
HDRI and HDRL (high-dynamic-range [[image-based lighting]]) have, ever since, been used in many situations in 3D scenes in which inserting a 3D object into a real environment requires the lightprobelight probe data to provide realistic lighting solutions.
 
In gaming applications, ''[[Riven|Riven: The Sequel to Myst]]'' in 1997 used an HDRI postprocessing shader directly based on Spencer's paper.<ref name="computergraphicsworld">{{cite journal|author=Forcade, Tim|date=February 1998|title=Unraveling Riven|journal=Computer Graphics World}}</ref> After [[Electronic Entertainment Expo|E3]] 2003, [[Valve Corporation|Valve]] released a demo movie of their [[Source engine]] rendering a cityscape in a high dynamic range.<ref>
{{cite web | url= https://www.youtube.com/watch?v=Xb1yrhgRVMQ |archive-url=https://ghostarchive.org/varchive/youtube/20211221/Xb1yrhgRVMQ |archive-date=2021-12-21 |url-status=live| title= Half-Life 2: Source DirectX 9.0 Effects Trailer (2003) | author= Valve | year= 2003 | publisher= YouTube }}{{cbignore}}
</ref> The term was not commonly used again until E3 2004, where it gained much more attention when [[Epic Games]] showcased [[Unreal Engine technology#Unreal Engine 3|Unreal Engine 3]] and Valve announced ''[[Half-Life 2: Lost Coast]]'' in 2005, coupled with open-source engines such as [[OGRE 3D]] and open-source games like ''[[Nexuiz]]''.
 
By the 2010s, [[High-dynamic-range television#Displays|HDR displays]] first became available. With higher contrast ratios, it is possible for HDRR to reduce or eliminate [[tone mapping]], resulting in an even more realistic image.
 
==Examples==
 
One of the primary advantages of HDR rendering is that details in a scene with a large contrast ratio are preserved. Without HDRHDRR, areas that are too dark are clipped to black and areas that are too bright are clipped to white. These are represented by the hardware as a floating point value of 0.0 and 1.0 for pure black and pure white, respectively.
 
Another aspect of HDR rendering is the addition of perceptual cues which increase apparent brightness. HDR rendering also affects how light is preserved in optical phenomena such as [[Reflection (physics)|reflections]] and [[refraction]]s, as well as transparent materials such as glass. In LDR rendering, very bright light sources in a scene (such as the sun) are capped at 1.0. When this light is reflected the result must then be less than or equal to 1.0. However, in HDR rendering, very bright light sources can exceed the 1.0 brightness to simulate their actual values. This allows reflections off surfaces to maintain realistic brightness for bright light sources.
Line 78 ⟶ 100:
 
===Output to displays===
Although many manufacturers claim very high numbers, [[plasma displays]], [[LCDliquid-crystal displaysdisplay]]s, and [[Cathode ray tube|CRT displaysdisplay]]s can deliver only a fraction of the contrast ratio found in the real world, and these are usually measured under ideal conditions.{{Citation needed|date=February 2015}} The simultaneous contrast of real content under normal viewing conditions is significantly lower.
 
Some increase in dynamic range in [[LCD monitors]] can be achieved by automatically reducing the backlight for dark scenes. For example, LG calls this technology "Digital Fine Contrast";<ref>[http://www.lge.com/about/press_release/detail/PRO%7CNEWS%5EPRE%7CMENU_20075_PRE%7CMENU.jhtml Digital Fine Contrast]</ref> Samsung describes it as "dynamic contrast ratio". Another technique is to have an array of brighter and darker LED backlights, for example with systems developed by BrightSide Technologies.<ref>[http://www.dolby.com/promo/hdr/technology.html BrightSide Technologies is now part of Dolby -] {{webarchive|url=https://web.archive.org/web/20070910145331/http://www.dolby.com/promo/hdr/technology.html |date=2007-09-10 }}</ref>
 
[[OLED]] displays have better dynamic range capabilities than LCDs, similar to plasma but with lower power consumption. [[Rec. 709]] defines the color space for [[HDTV]], and [[Rec. 2020]] defines a larger but still incomplete color space for [[ultra-high-definition television]].
 
Since the 2010s, OLED and other [[High-dynamic-range television#Displays|HDR display technologies]] have reduced or eliminated the need for [[tone mapping]] HDRR to [[Standard-dynamic-range video|standard dynamic range]].
 
===Light bloom===
Line 92 ⟶ 116:
Flare is the diffraction of light in the human lens, resulting in "rays" of light emanating from small light sources, and can also result in some chromatic effects. It is most visible on point light sources because of their small visual angle.<ref name="spencer1"/>
 
OtherwiseTypical display devices cannot display light as bright as the Sun, and ambient room lighting prevents them from displaying true black. Thus HDR rendering systems have to map the full dynamic range toof what the eye would see in the rendered situation onto the capabilities of the device. This [[tone mapping]] is done relative to what the virtual scene camera sees, combined with several [[full screen effect]]s, e.g. to simulate dust in the air which is lit by direct sunlight in a dark cavern, or the scattering in the eye.
 
[[Tone mapping]] and [[Bloom (shader effect)|blooming shaders]] can be used together to help simulate these effects.
Line 99 ⟶ 123:
{{main|Tone mapping}}
Tone mapping, in the context of graphics rendering, is a technique used to map colors from high dynamic range (in which lighting calculations are performed) to a lower dynamic range that matches the capabilities of the desired display device. Typically, the mapping is non-linear – it preserves enough range for dark colors and gradually limits the dynamic range for bright colors. This technique often produces visually appealing images with good overall detail and contrast. Various tone mapping operators exist, ranging from simple real-time methods used in computer games to more sophisticated techniques that attempt to imitate the perceptual response of the human visual system.
 
[[High-dynamic-range television|HDR displays]] with higher dynamic range capabilities can reduce or eliminate the tone mapping required after HDRR, resulting in an even more realistic image.
 
==Applications in computer entertainment==
 
{{update|section|inaccurate=yes|reason=The Wii is dead, Sproing is dead, statement uses "will support" - did they ever?, every gaming unit mentioned here is dead?|date=January 2022}}Currently HDRR has been prevalent in [[Video game|games]], primarily for [[Personal Computer|PCs]], [[Microsoft]]'s [[Xbox 360]], and [[Sony]]'s [[PlayStation 3]]. It has also been simulated on the [[PlayStation 2]], [[GameCube]], [[Xbox (console)|Xbox]] and [[Amiga]] systems. [[Sproing Interactive Media]] has announced that their new Athena game engine for the [[Wii]] will support HDRR, adding Wii to the list of systems that support it.
 
In [[desktop publishing]] and gaming, color values are often [[Video post-processing#Uses in 3D rendering|processed]] several times over. As this includes multiplication and division (which can accumulate [[Round-off error|rounding errors]]), it is useful to have the extended accuracy and range of 16 bit integer or 16 bit [[floating point]] formats. This is useful irrespective of the aforementioned limitations in some hardware.
 
===Development of HDRR through DirectX===
Complex shader effects began their days with the release of [[Shader|Shader Model 1.0]] with [[DirectX]] 8. Shader Model 1.0 illuminated 3D worlds with what is called standard lighting. Standard lighting, however, had two problems:
 
#Lighting precision was confined to 8 bit integers, which limited the contrast ratio to 256:1. Using the [[HSV color space|HVS color model]], the value (V), or brightness of a color has a range of 0 – 255. This means the brightest white (a value of 255) is only 255 levels brighter than the darkest shade above pure black (i.e.: value of 0).
Line 114 ⟶ 140:
On December 24, 2002, [[Microsoft]] released a new version of [[DirectX]]. DirectX 9.0 introduced Shader Model 2.0, which offered one of the necessary components to enable rendering of high-dynamic-range images: lighting precision was not limited to just 8-bits. Although 8-bits was the minimum in applications, programmers could choose up to a maximum of 24 bits for lighting precision. However, all calculations were still integer-based. One of the first [[graphics card]]s to support DirectX 9.0 natively was [[ATI Technologies|ATI]]'s [[Radeon R300|Radeon 9700]], though the effect wasn't programmed into games for years afterwards. On August 23, 2003, Microsoft updated DirectX to DirectX 9.0b, which enabled the Pixel Shader 2.x (Extended) profile for ATI's [[Radeon R420|Radeon X series]] and NVIDIA's [[GeForce FX]] series of graphics processing units.
 
On August 9, 2004, Microsoft updated DirectX once more to DirectX 9.0c. This also exposed the Shader Model 3.0 profile for [[highHigh-levelLevel shaderShader languageLanguage]] (HLSL). Shader Model 3.0's lighting precision has a minimum of 32 bits as opposed to 2.0's 8-bit minimum. Also all lighting-precision calculations are now [[FLOPS|floating-point based]]. [[NVIDIA]] states that contrast ratios using Shader Model 3.0 can be as high as 65535:1 using 32-bit lighting precision. At first, HDRR was only possible on video cards capable of Shader-Model-3.0 effects, but software developers soon added compatibility for Shader Model 2.0. As a side note, when referred to as Shader Model 3.0 HDR, HDRR is really done by FP16 blending. FP16 blending is not part of Shader Model 3.0, but is supported mostly by cards also capable of Shader Model 3.0 (exceptions include the GeForce 6200 series). FP16 blending can be used as a faster way to render HDR in video games.
 
Shader Model 4.0 is a feature of DirectX 10, which has been released with Windows Vista. Shader Model 4.0 allows 128-bit HDR rendering, as opposed to 64-bit HDR in Shader Model 3.0 (although this is theoretically possible under Shader Model 3.0).
Line 124 ⟶ 150:
 
===Game engines that support HDR rendering===
*[[Unreal Engine| 5]]
*[[Unreal Engine 54]]
*[[Unreal Engine|Unreal Engine 3]]<ref>{{cite web|url=http://www.unrealengine.com/features/rendering/ |title=Rendering – Features – Unreal Technology |year=2006 |work=Epic Games |access-date=2011-03-15 |url-status=dead |archive-url=https://web.archive.org/web/20110307074455/http://www.unrealengine.com/features/rendering |archive-date=2011-03-07 }}</ref>
*[[Unreal Engine|Unreal Engine 4]]
*[[Unreal Engine|Unreal Engine 3]]<ref>{{cite web|url=http://www.unrealengine.com/features/rendering/ |title=Rendering – Features – Unreal Technology |year=2006 |work=Epic Games |access-date=2011-03-15 |url-status=dead |archive-url=https://web.archive.org/web/20110307074455/http://www.unrealengine.com/features/rendering |archive-date=2011-03-07 }}</ref>
*[[Chrome Engine|Chrome Engine 3]]
*[[Source (game engine)|Source]]<ref>{{cite web | url=http://source.valvesoftware.com/rendering.php | title=SOURCE – RENDERING SYSTEM | year=2007 | work=Valve | access-date=2011-03-15 | url-status=dead | archive-url=https://web.archive.org/web/20110323182005/http://source.valvesoftware.com/rendering.php | archive-date=2011-03-23 }}</ref>
*[[Source 2 (game engine)|Source 2]]
*[[REDengine | REDengine 3]] <ref>{{cite web | url=http://www.pcgamer.com/the-amazing-technology-of-the-witcher-3/ | title=The Amazing Technology of The Witcher 3 | year= 2015 | work= PC-Gamer | access-date= 2016-05-08}}</ref>
 
*[[Serious Engine 2]]
*[[MT Framework|MT Framework 2]]
*[[RE Engine]]
*[[REDengine | REDengine 3]] <ref>{{cite web | url=http://www.pcgamer.com/the-amazing-technology-of-the-witcher-3/ | title=The Amazing Technology of The Witcher 3 | year= 2015 | work= PC-Gamer | access-date= 2016-05-08}}</ref>
*[[CryEngine]],<ref>{{cite web | url=http://www.xbitlabs.com/articles/video/display/farcry13.html | title=FarCry 1.3: Crytek's Last Play Brings HDR and 3Dc for the First Time | year=2004 | work=X-bit Labs | access-date=2011-03-15 | url-status=dead | archive-url=https://web.archive.org/web/20080724214109/http://www.xbitlabs.com/articles/video/display/farcry13.html | archive-date=2008-07-24 }}</ref> [[CryEngine 2]],<ref>{{cite web | url=http://crytek.com/cryengine/cryengine2/overview | title=CryEngine 2 – Overview | year= 2011| work=CryTek | access-date= 2011-03-15 }}</ref> [[CryEngine 3]]
*[[Dunia Engine]]
*[[Gamebryo]]
*[[Godot (game engine)]]{{cn|date=May 2025}}
*[[Decima (game engine)|Decima]]<ref>{{Cite news|last=Pereira|first=Chris|date=December 3, 2016|title=Kojima Partnering With Killzone, Horizon Dev Guerrilla for Death Stranding|work=[[GameSpot]]|publisher=[[CBS Interactive]]|url=https://www.gamespot.com/articles/kojima-partnering-with-killzone-horizon-dev-guerri/1100-6445954/|url-status=live|access-date=December 3, 2016|archive-url=https://web.archive.org/web/20191204214057/https://www.gamespot.com/articles/kojima-partnering-with-killzone-horizon-dev-guerri/1100-6445954/|archive-date=December 4, 2019}}</ref>
*[[Unity (game engine)|Unity]]
Line 140 ⟶ 171:
*[[Unigine]]<ref>{{cite web | url=http://unigine.com/products/unigine/ | title=Unigine Engine – Unigine (advanced 3D engine for multi-platform games and virtual reality systems) | year=2011 | work=Unigine Corp. | access-date=2011-03-15 }}</ref>
*[[Frostbite 2]]
* [[Bohemia Interactive|Real Virtuality 2, 3, and 4]]{{cn|date=April 2024}}
*[[Real Virtuality (game engine)#Real Virtuality 2|Real Virtuality 2]], [[Real Virtuality (game engine)#Real Virtuality 3|Real Virtuality 3]], [[Real Virtuality (game engine)#Real Virtuality 4|Real Virtuality 4]]
* [[HPL Engine 3]]
* Babylon JS <ref>{{cite web |url=http://doc.babylonjs.com/page.php?p=25362 |title=Archived copyBabylonDoc |access-date=2015-07-03 |url-status=dead |archive-url=https://web.archive.org/web/20150704155945/http://doc.babylonjs.com/page.php?p=25362 |archive-date=2015-07-04 }}</ref>
* [[Torque 3D]] <ref>{{Cite web | url=https://github.com/GarageGames/Torque3D/blob/development/Templates/Full/game/core/scripts/client/postFx/hdr.cs |title = MIT Licensed Open Source version of Torque 3D from GarageGames: GarageGames/Torque3D| website=[[GitHub]] |date = 2019-08-22}}</ref>
* [[X-Ray Engine]]
 
Line 159 ⟶ 190:
*[https://web.archive.org/web/20110711112223/http://transporter-game.googlecode.com/files/HDRRenderingInOpenGL.pdf High Dynamic Range Rendering in OpenGL] ([[PDF]])
*[http://www.microsoft.com/whdc/winhec/partners/shadermodel30_NVIDIA.mspx Microsoft's technical brief on SM3.0 in comparison with SM2.0]
*[https://web.archive.org/web/20060113032428/http://www.tomshardware.com/2006/01/13/new_3d_graphics_card_features_in_2006/ Tom's Hardware: New Graphics Card Features of 2006]
*[https://web.archive.org/web/20060421205054/http://users.erols.com/chare/video.htm List of GPU's compiled by Chris Hare]
*[http://www.techpowerup.com/gpudb/ techPowerUp! GPU Database]