Displacement mapping: Difference between revisions

Content deleted Content added
GreenC bot (talk | contribs)
Reformat 1 archive link. Wayback Medic 2.5 per WP:USURPURL and JUDI batch #24
 
(48 intermediate revisions by 41 users not shown)
Line 1:
{{short description|Computer graphics technique}}
[[Image:Displacement.jpg|thumb|Displacement mapping]]
{{More citations needed|date=June 2023}}
'''Displacement mapping''' is an alternative computer graphics technique in contrast to [[bump mapping]], [[normal mapping]], and [[parallax mapping]], using a ([[procedural texture|procedural]]-) [[texture mapping|texture-]] or [[heightmap|height map]] to cause an effect where the actual geometric position of points over the textured surface are ''displaced'', often along the [[Locally|local]] [[surface normal]], according to the value the texture function evaluates to at each point on the surface. It gives surfaces a great sense of depth and detail, permitting in particular self-occlusion, [[self-shadowing]] and silhouettes; on the other hand, it is the most costly of this class of techniques owing to the large amount of additional geometry.
{{multiple image
<!-- Essential parameters -->
| align = right
| direction = horizontal
| width = 160
<!-- Extra parameters -->
| header =
| header_align = center
| header_background =
| footer =
| footer_align =
| footer_background =
| background color =
 
|image1=Displacement.jpg
For years, displacement mapping was a peculiarity of high-end rendering systems like [[PhotoRealistic RenderMan]], while realtime [[Application programming interface|APIs]], like [[OpenGL]] and [[DirectX]], lacked this possibility. One of the reasons for this absence is that the original implementation of displacement mapping required an [[adaptive]] [[Tessellation#Tessellations and computer graphics|tessellation]] of the surface in order to obtain [[micropolygon]]s whose size matched the size of a pixel on the screen.
|width1 = 160
[[fr:|caption1=Displacement mapping]] in mesh
|alt1=Cartesian transport
 
|image2=Displace Map.svg
|width2 = 160
|caption2=Displacement mapping with SVG filter effects
|alt2=Polar transport
}}
'''Displacement mapping''' is an alternative computer graphics technique in contrast to [[bump mapping|bump]], [[normal mapping|normal]], and [[Parallax mapping|parallax]] [[Texture mapping|mapping]], using a ([[proceduralImage texture|procedural]]-) [[texture mapping|texture-]] or [[heightmap|height map]] to cause an effect where the actual geometric position of points over the textured surface are ''displaced'', often along the [[Locally|local]] [[surface normal]], according to the value the texture function evaluates to at each point on the surface.<ref>{{Cite web |title=Chapter 8. Per-Pixel Displacement Mapping with Distance Functions |url=https://developer.nvidia.com/gpugems/gpugems2/part-i-geometric-complexity/chapter-8-pixel-displacement-mapping-distance-functions |access-date=2023-05-10 |website=NVIDIA Developer |language=en}}</ref> It gives surfaces a great sense of depth and detail, permitting in particular self-occlusion, [[self-shadowing]] and silhouettes; on the other hand, it is the most costly of this class of techniques owing to the large amount of additional geometry.
 
For years, displacement mapping was a peculiarity of high-end rendering systems like [[PhotoRealistic RenderMan]], while realtime [[Application programming interface|APIs]], like [[OpenGL]] and [[DirectX]], lackedwere only starting to use this possibilityfeature. One of the reasons for this absence is that the original implementation of displacement mapping required an [[adaptive]] [[Tessellation#Tessellations and (computer graphics)|tessellation]] of the surface in order to obtain enough [[micropolygon]]s whose size matched the size of a pixel on the screen.{{citation needed|date=March 2020}}
 
==Meaning of the term in different contexts==
Displacement mapping includes the term mapping which refers to a [[texture mapping|texture map]] being used to [[modulate]] the displacement strength. The displacement direction is usually the local surface normal. Today, many [[Rendering (computer graphics)|renderer]]s allow [[shader|programmable shading]] which can create high quality (multidimensional) [[procedural texture]]s and [[texture synthesis|patterns]] at arbitraryarbitrarily high frequencies. The use of the term mapping becomes arguable then, as no texture map is involved anymore. Therefore, the broader term '''displacement''' is often used today to refer to a super concept that also includes displacement based on a texture map.
 
Renderers using the [[Reyes rendering|REYES]] [[algorithm]], or similar approaches based on [[micropolygon]]s, have allowed displacement mapping at arbitrary high frequencies since they became available almost 20 years ago.
Line 13 ⟶ 38:
Other renderers that require the modeling application to deliver objects pre-tessellated into arbitrary polygons or even triangles have defined the term displacement mapping as moving the vertices of these polygons. Often the displacement direction is also limited to the surface normal at the vertex. While conceptually similar, those polygons are usually a lot larger than micropolygons. The quality achieved from this approach is thus limited by the geometry's tessellation density a long time before the renderer gets access to it.
 
This difference between displacement mapping in micropolygon renderers vs. displacement mapping in a non-tessellating (macro)polygon renderers can often lead to confusion in conversations between people whose exposure to each technology or implementation is limited. Even more so, as in recent years, many non-micropolygon renderers have added the ability to do displacement mapping of a quality similar to whatthat which a micropolygon renderer is able to deliver, naturally. To distinguish between the crude pre-tessellation-based displacement these renderers did before, the term '''sub-pixel displacement''' gotwas introduced to describe this feature.{{Citation needed|date=August 2011}}
 
Sub-pixel displacement commonly refers to finer re-tessellation of geometry that was already tessellated into polygons. This re-tessellation results in micropolygons or often microtriangles. The vertices of these then get moved along their normals to archiveachieve the displacement mapping.
 
True micropolygon renderers have always been able to do what sub-pixel-displacement achieved only recently, but at a higher quality and in arbitrary displacement directions.
 
Recent developments seem to indicate that some of the renderers whichthat use sub-pixel displacement move towards supporting higher level geometry too. As the vendors of these renderers are likely to keep using the term sub-pixel displacement, this will probably lead to more obfuscation of what displacement mapping really stands for, in [[3D computer graphics]].
 
In reference to Microsoft's proprietary [[High Level Shader Language]], displacement mapping can be interpreted as a kind of "vertex-texture mapping" where the values of the [[texture map]] do not alter pixel colors (as is much more common), but instead change the position of vertices. Unlike bump, normal and parallax mapping, all of which can be said to "fake" the behavior of displacement mapping, in this way a genuinely ''rough'' surface can be produced from a texture. It has to be used in conjunction with adaptive [[tessellation]] techniques (that increases the number of rendered polygons according to current viewing settings) to produce highly detailed meshes.{{citation needed|date=March 2020}}
 
==Further reading==
*[http://mediawiki.blender.org/index.php/Manual/Displacement_Maps Blender Displacement Mapping]
*[http://www.inf.ufrgs.br/%7Eoliveira/RTM.html Relief Texture Mapping] website
*[http://www.inf.ufrgs.br/%7Eoliveira/pubs_files/Policarpo_Oliveira_Comba_RTRM_I3D_2005.pdf ''Real-Time Relief Mapping on Arbitrary Polygonal Surfaces''] paper
*[http://www.inf.ufrgs.br/%7Eoliveira/pubs_files/Policarpo_Oliveira_RTM_multilayer_I3D2006.pdf ''Relief Mapping of Non-Height-Field Surface Details''] paper
*[http://graphics.cs.brown.edu/games/SteepParallax/index.html ''Steep Parallax Mapping''] website
*[http://www.iit.bme.hu/~szirmay/egdisfinal3.pdf ''State of the art of displacement mapping on the gpu''] paper
 
==See also==
* [[Texture mapping]]
* [[Bump mapping]]
* [[Normal mapping]]
* [[Parallax mapping]]
* [[Relief mapping (computer graphics)]]
* [[Heightmap]]
* [[Sculpted prim]]
 
==Further reading==
[[Category:Texture mapping]]
*[httphttps://mediawikiarchive.blender.org/wiki/index.php/Manual/Displacement_Maps/ Blender Displacement Mapping]
*[https://garagefarm.net/blog/how-displacement-maps-work-and-how-to-optimize-them-in-v-ray-part-1/ Vray Displacement Mapping]
* [http://www.inf.ufrgs.br/%7Eoliveira/RTM.html Relief Texture Mapping] website
* {{usurped|1=[https://web.archive.org/web/20150419215321/http://sunandblackcat.com/tipFullView.php?l=eng&topicid=28 Parallax Occlusion Mapping in GLSL on sunandblackcat.com]}}
* [http://www.inf.ufrgs.br/%7Eoliveira/pubs_files/Policarpo_Oliveira_Comba_RTRM_I3D_2005.pdf ''Real-Time Relief Mapping on Arbitrary Polygonal Surfaces''] paper
* [http://www.inf.ufrgs.br/%7Eoliveira/pubs_files/Policarpo_Oliveira_RTM_multilayer_I3D2006.pdf ''Relief Mapping of Non-Height-Field Surface Details''] paper
*''[https://web.archive.org/web/20110816214356/http://wwwsirkan.iit.bme.hu/~szirmay/egdisfinal3.pdf ''State of the art of displacement mapping on the gpu]''] paper
 
==References==
[[de:Displacement Mapping]]
{{reflist}}
[[fr:Displacement mapping]]
 
[[th:Displacement mapping]]
{{Texture mapping techniques}}
[[zh:位移贴图]]
 
* [[Category:Texture mapping]]