Sie sind auf Seite 1von 7

Parallax Occlusion Mapping Guy Gildersleve g003872a Parallax Occlusion mapping (POM for short) is an enhancement of parallax mapping

which like normal mapping creates additional apparent Depth and thus greater realism with a less hit on performance1 Parallax Occlusion mapping goes one step further with the parallax mapping technique that is used to fake detail and depth within texture through the use of a displacement maps, instead of generating more geometry it fakes the detail making the object look more detailed than it actually is. The main advantage over normal mapping is to correctly change perspective and with the use of self-occlusion and shadowing in real time, without sacrificing processor cycles the same effect would achieve with actual 3d geometry.2 POM was first documented in 2004 by Zoe Brawley and Natalya Tatalya Tatarchuk in ShaderX33.

The advantage of using POM over Normal Mapping

1 2 3 4

ShaderX3: Advanced Rendering with DirectX and OpenGL Page 127 Dynamic Parallax Occlusion Mapping with Approximate Soft Shadows Page 8

ShaderX3:Advanced Rendering with DirectX and OpenGL Page 135


Dynamic Parallax Occlusion Mapping with Approximate Soft Shadows Page 9

Though using Parallax Occlusion mapping doesnt mean that normal maps arent required anymore as they are still used to help with the calculation of POM. The basic idea behind Parallax occlusion mapping is for each polygon mesh we would like to simulate a more complex shape, a higher polygon version, for example if you wanted bricks to pop out, you could get a simple polygon plain surface consisting of 2 triangles as a low poly mesh and then a higher polygon surface showing 3d representation of those bricks to generate normal maps and height maps to project onto that 2 triangle surface and give the illusion of it being a lot higher than it actually is, the height map values range from 0 to 1 with 0 being the deepest and 1 being the highest. This is used in conjunction with the players/cameras viewing direction to calculate how the effect should look like.

A diagram showing how POM mapping works5 If implemented correctly the shader and texture of the model should look 3D and highly detailed that will actively change depending on the viewers direction and look almost like the higher polygon model its designed to look like without the higher performance hit on the system. Parallax Occlusion mapping is now it is supported by most modern engines such as The Unreal Engine6 Unigine7 CryEngine38 Source engine9 and Ubisofts Anvil Next Engine10 just to name a few, along with many various game mods like for Doom 3 11 and Elder Scrolls IV: Oblivion12.
5

http://images.gamedev.net/columns/hardcore/pom/V_volume_intersection.jpg http://udn.epicgames.com/Three/DevelopmentKitGemsParallaxOccludedMapping.html 7 http://unigine.com/products/unigine/features/


6 8 9

http://mycryengine.com/index.php?conid=8 Click on Visuals.

https://developer.valvesoftware.com/wiki/Parallax_mapping NVidia Conference 16th October 11 http://www.moddb.com/mods/wulfen-texture-pack 12 http://obge.paradice-insight.us/wiki/POM_(Module)


10

13

The Low poly version of the model next to the higher poly version

Though isnt without its flaws, while it comes very close to achieving its higher polygon counterpart there are still various limitations that hold it back, for example its advisable to use it on flat surfaces as more curved surfaces squash and limit the illusion somewhat. This is due to the nature of how parallax occlusion mapping is generated through the depth layers of the material. These depth layers represent the different height coordinates from the height and normal maps.

14

The difference between POM being used on a flat surface and a curved surface notice the layers visible on the sphere along with the distortion of the created on the material.

13 14

Created within 3ds Max POM represented in UDK

POM also requires the various maps in question to use the full UV space of the model, failing to do so breaks up the materials with nothingness before tiling again. However this is also a strength as if all the UV space of the model is taken up with the texture the Parallax effect will effectively tile it for you, making it seem like it continues to go on constantly, it also lines up to the save duplicate of the same model perfectly.

15

POM close up showing the layers issue and showing the tile parallax affect where if there is empty space within the UV it shows that as well. The main issue with POM is the layering effect, when the player or camera gets close to it at a certain angle you can see how the effect is being generated with these layers from the height map, Epic Games calls this the Stepping Pancake16.

17

Epic Games showing the same issue

15 16

POM issues in UDK http://udn.epicgames.com/Three/DevelopmentKitGemsParallaxOccludedMapping.html 17 http://udn.epicgames.com/Three/DevelopmentKitGemsParallaxOccludedMapping.html

Parallax Occlusion Mapping isnt easy on the system either, while it is less than actual geometry it does require a lot of material instructions to go through and read to achieve the effect while normal mapping on its own is considerably less than POM.

18

The amount of Material Instructions POM has to go through to achieve the effect. Note this is without Self Shadowing capabilities.

Though there is other alternatively to Parallax Occlusion Mapping, one being plain normal maps, the other is through the use of Tessellation which actually builds the geometry within the engine from the normal and height maps onto the low poly. This has the advantage of still being considerably less than the real high poly model that the normal maps and height maps where generated from (which can be in the millions of Polygons) while keeping the details that came on the normal and height maps.

19

Tessellation, POM and Normal Mapping next to each other with UDK
Self-Created POM in UDK

18

19

Self-Created in UDK comparing the differences between Tessellation, POM and Normal Mapping

Tessellation can be adaptive between distances between the player and the mesh reducing when the player isnt close and increasing it the closer the player gets so no detail is missing. Though the problem with this is that its creating a lot more physical geometry compared to the other two which can stress the system out more.

20

Tessellation, POM and Normal Mapping next to each other with UDK in wireframe view.

21

Normal Mapping in UDK Material instructions.

20 21

Self-Created in UDK comparing the differences between Tessellation, POM and Normal Mapping Normal Mapping in made in UDK

22

Tessellation in UDK Material instructions

Normal Mapping is the less resource intensive than both of them however it lacks any real depth between the three appearing flat and fake at times. While Tessellation has the physical detail it can take up quite a bit more resource. Then Parallax Occlusion Mapping which brings the best of both worlds, being not as stressful on the system and giving the sense of 3D geometry there where there is none, however with the downsides of the pancake layering issue and the use of it being on flat surfaces. Where tessellation and normal mapping can be used on more different types of surfaces. Parallax Occulsion mapping is a powerful technique when used properly can be a powerful tool to use espically when there is a flat mesh that requires the detail that normal mapping simply cant supply and that tessellation would be too much to use on the system. POM seems like a nice middle ground to choose to get that detail in there despite its flaws. Parallax Occulsion mapping is something that may pop up a lot more in this next coming up generation of consoles and games, its certainly a good skill to possess for the future espically when more and more game engines adding support.

22

Tessellation made within UDK

Das könnte Ihnen auch gefallen