User:MaxDZ8/parallax mapping proto

From Wikipedia, the free encyclopedia

Parallax Mapping is an evolution of bump mapping often used in real-time rendering applications such as video games. To the end user, parallax mapping improves surface appearance giving the impression of more apparent depth and realism without adding extra geometry.

All parallax mapping methods extend bump mapping by using a height map which is used to offset texture so perspective (parallax) distortions can be applied not only to the texture itself but to the simulated complex surface. Because parallax effects are view-dependant, all parallax mapping methods do consider observer's position and according to this information and the heightmap given, compute an approximation of what pixel on the surface could have been viewed if the real surfaces would have been rendered. The method used to compute this effect can range from a very simple displacement to primordial raytracing.

Algorithm variations[edit]

Since rendering hardware shows a great scale on both features and processing power, different parallax mapping methods have been demostrated to address different problems, in the search of a better approximation of a real geometry rendering. In this section, some quick insights will be given about each one.

Bump mapping[edit]

Figure 1: simple bumpmapping provides a major increase in apparent complexity.
Figure 2: Bumpmapping assumes parallax effects to be minimal, which does not hold true at steep glazing angles.
Figure 3: TODO: some vectors involved in bumpmapping TODO TODO TODO.

Although not usually considered a parallax mapping method, plain bumpmapping is the reference point on which parallax mapping methods improve. Dot3 bumpmapping has been employed in many commercial products with success. It's fast, well-supported and requires less attention than other techniques while still providing a major quality improvement on vertex lighting.

Bump mapping provides a great detail to the single polygon shaded on the left however, the simulated geometry appears to flatten at the end of the quad because the lack of parallax effects.

Accounting for self-occlusion and self-shadowing has been demostrated to be non-trivial when using this method. Horizon bump mapping provides self-shadowing by generating a per-light horizon map and using additional lookups but the method has never known widespread use.

This method silently assumes parallax effects to be minimal. At nearly perpendicular angles (parallel to surface normal) this holds true but at steep viewing angles the illusion breaks down since the only surface not having parallax effects is a flat surface. As shown in figure 2, the simulated geometry looks "splatted" on the surface.

TODO: speak about normalscale factors???

Parallax mapping and its offset-limited variation[edit]

Figure 3: Parallax mapping improves on bumpmapping by "blindly" displacing texture coordinates. The effect looks convincing in this case.
Figure 4: plain parallax mapping do not cope well with steep angles and fast height map variation. This method is sometime dubbed as "shimmering mess o' pixels".
Figure 5: TODO: What parallax mapping adds over dot3.

Parallax mapping, introduced by TODO TODO TODO and successive improvements do employ an additional heightmap to evaluate for parallax effects. The basic idea is to move the viewed point on surface towards the observer (or away from it).

Since parallax is view dependant, this takes an extra vector (here named E) which is transformed in the surface-local space by the same orthonormal basis used for simple bumpmapping. This extra transform do require only a few multiplications and can be shared with specular computations, so this often comes for free in real world scenarios.

Figure 7: offset limiting technique.
Figure 8: the removal of a problematic division avoids the stability issues associated with parallax mapping. The result is (theorically) faster rendering and greatly decreased amount of artifacts.
Figure 9: New method. TODO TODO TODO

Although offset limiting (TODO TODO TODO NOte: Welsh, 2003, link to paper) has been described as a cheap heuristic, the results are very pleasing. Products shipped with "parallax mapping effects" do likely implement this technique.

The major advantage here is the improved stability which avoid pixel shimmering (an effect similar to heat haze). Since the human vision system is highly trained to detect unpredicted movement and color changes, this artifact catches the eye. Although offset limiting does not really remove all the issues, it makes the remaining artifacts less visible.

It has been stated this is the first parallax mapping effects really usable (TODO TODO TODO : where did i read this? ati whitepapaer?), although the fast height variation are still a problem (consider the heightmap being used has been designed to show this issue).

Closer inspection of the rendered image will show differences between the two algorithms, with the offset-limited variant to look flatter than the original method. This is another issue involved with parallax mapping methods. Just as there is a arbitrary scale factor to be applied on bump map computation, there's an arbitrary constant espressing the amount of "pixel shift" for parallax mapping effects. The only way to choose this constant is visual inspection and it is not common to both algorithms. As may be intuitive, the more "pixel shift" is specified, the more likely rendering artifacts will occur.


Steep parallax mapping and its interpolated variation[edit]

Figure 9: Steep parallax mapping uses much more advanced hardware finally solving some flattening issues at the far end of the quad.
Figure 10: because of the different method, artifacts are not an issue even at glazing angles, although a jagged pattern can be seen in the near end of the quad because of the missing intersections.
Figure 5: TODO: and now... something totally different!!!

Steep parallax mapping (NOTE NOTE NOTE: Mcguire, link to home page 2005) takes some extra hardware power to run a primitive ray tracing operation local to the shaded surface. Because the amount of displacement is now found by this operation instead of looking up the heightmap, fast height changes are not really a problem anymore although they obviously need additional precision. The effects of this needed precision is the jagged pattern shown in Figure 4 TOTO DOTO TODO explain why... TODO TODO TODO: remember self shadowing can be accounted for

Figure 12: offset limiting technique.
Figure 13: the removal of a problematic division avoids the stability issues associated with parallax mapping. The result is (theorically) faster rendering and greatly decreased amount of artifacts.
Figure 9: New method. TODO TODO TODO

Parallax occlusion mapping. Tatarchuk 2006 ati, siggraph bla bla bla