Members Login
Username 
 
Password 
    Remember Me  
Post Info TOPIC: Parallax Occlusion Mapping (POM)


calculating Pi by hand

Status: Offline
Posts: 768
Date:
Parallax Occlusion Mapping (POM)
Permalink  
 


Bump mapping(parallax mapping) is a common technic to give materials a more realistic look. Even though it is cheap performance wise it just creates a pseudo 3D look. Looking from a small angle reveals that the surface is still flat.

Besides it is possible to create parallax occlusion materials with UDK. A sample material can be downloaded here: http://udn.epicgames.com/Three/DevelopmentKitGemsParallaxOccludedMapping.html

The basic idea of POM is to split a texture vertically into several layers and calculating height (and shadow) data for each layer, which results in a real 3D look. In contrast to bump mapping lower parts of a texture(f.e. ground) are occluded by higher parts(f.e. a stone). In addition high parts are casting real shadows.

The downside is that artefacts appear at an small viewing angle because the layers become visible. Another disadvantage is the performance. That's why one should use POM quite attentive.

 

I used the UDK sample material to show you some differences between different levels of Bump and Parallax Occlusion Mapping.

 

Diffuse + Normal

 

Bump map - slight bump

 

Bump map - usual bump

 

Bump map - heavy bump (artefacts appering / stretching)

 

Parallax Occlusion mapping - slight bump

 

Parallax Occlusion mapping - usual bump

 

Parallax Occlusion mapping - heavy bump (layering artifacts already appearing close to the viewing point)

 

Parallax Occlusion mapping - heavy bump + self shadowing (~ambient occlusion)

 

Because of the artifacts I made some changes to the sample material by raising the number of layers from 10 to 16 and also changing the shadowing parameters. Again take a look at the distance at which artifacts start to become visable

 

 

Last but not least the extended material:

As you might guess due to the instruction count POM can be really a performance issue if used to much.

It should be also possible to rebuild this material for UT3 - I've also began doing so and will share the material if it's done.

 

 

 



-- Edited by mAlkAv on Wednesday 24th of August 2011 11:15:16 PM

__________________

Blog

Nichts wäret ewiglich, nur die Natur bleibt bestehen.



Unreal Old Friend

Status: Offline
Posts: 60
Date:
Permalink  
 

Sweeeeeeeeeeeeeet!
I jump in when I can! I ever wanted to make a nice bump effect, but I always got that "fisheye" effect.
Thanks a lot for this great demonstration. I have a new hope for the bump mapping in UT3 now.



-- Edited by Foufoune_Rose on Wednesday 24th of August 2011 10:12:08 PM

__________________
[Knowlage is power] Sinéad, for the first time, life is gonna turn around...


...ǝp¡s ɹǝɥʇo ǝɥʇ uo

Status: Offline
Posts: 4264
Date:
Permalink  
 

awesome!same kind of difference between 3.14 and 3.1415926535 !u re so accurate malk...congratz!

__________________


AMD RYZEN 7 1800x@ 4.0ghz-MSI X370 PRO CARBON-2xMSI GTX780Lightning-Corsair Vengeance DDR4 16GB-SAMSUNG 850Evo-LOGITECH G19-CORSAIR VengeanceM65 & HX1200i-COOLERMASTER HAF Stacker915R/935/915F-Custom Loop



calculating Pi by hand

Status: Offline
Posts: 768
Date:
Permalink  
 

Just to tease a bit. I recently made some changes to Epics example POM material for reducing it's complexity but obtaining the visual quality at the same time. It's far from a professional solution but I was able to lower the instruction count from 213 to 149 (including normal mapping and specular).

Right now I am rebuilding the material for UT3 since it is not possible to use .upks of newer engine versions.

__________________

Blog

Nichts wäret ewiglich, nur die Natur bleibt bestehen.



calculating Pi by hand

Status: Offline
Posts: 768
Date:
Permalink  
 

Ok, got it working. Now it's time for some adjustments to get more parameters for instancing :)



 

Edit: 14 paramters for now. Self shadowing is also not yet included.



-- Edited by mAlkAv!An on Friday 28th of October 2011 12:05:55 PM

__________________

Blog

Nichts wäret ewiglich, nur die Natur bleibt bestehen.



Feedback-Master ..

Status: Offline
Posts: 1767
Date:
Permalink  
 

mAlkAv!An wrote:
Last but not least the extended material:

As you might guess due to the instruction count POM can be really a performance issue if used to much.

It should be also possible to rebuild this material for UT3 - I've also began doing so and will share the material if it's done.


 My head hurts from just looking at that, much less trying to understand it.

I looked at the examples and that does look very nice.  Hard to beleive that's from a flat mesh/BSP?

On the subject of ambient oclusion and Blender (slightly off topic), I know you can bake an Ambient Occlusion map, but how do you go about adding it and do you have to sort of "guess" at the lighting angle and such to get it to look right?



__________________


calculating Pi by hand

Status: Offline
Posts: 768
Date:
Permalink  
 

Yes it's looking weird indeed. I started with Epics example material (which is not well made performance wise, btw) and just increased the number of samples from 10 to 16. The reason for the material complexity is the iterative functionality of parallax occlusion mapping.
You might take a look at the UDN page for better understanding: http://udn.epicgames.com/Three/DevelopmentKitGemsParallaxOccludedMapping.html

Since I made these shots straigt from the material editor there is no way of hiding addtitional geometry ^^
If done right POM can be an adequate substitution to DX11 tesselation. If you have a copy of Crysis / Warhead you can see some spots where it's beeing used at very high details :)

The easy way of adding ao maps is a static approach by multiplying it with the diffuse . This solution is actually not correct, since it does not take into account the light vector like you mentioned. But it's mostly looking good enough and helps to identify the structure.



-- Edited by mAlkAv!An on Saturday 29th of October 2011 11:15:48 AM

__________________

Blog

Nichts wäret ewiglich, nur die Natur bleibt bestehen.



calculating Pi by hand

Status: Offline
Posts: 768
Date:
Permalink  
 

If you want to give it a try, here's a dl link:

http://www.mediafire.com/?ndba42dln5gb45l

UT3 Parallax Occlusion Mapping Material

 

I will still do some testing and see if I can optimize the performance or reduce hte pcan cake artifacts.

 



-- Edited by mAlkAv!An on Monday 31st of October 2011 01:18:11 PM

__________________

Blog

Nichts wäret ewiglich, nur die Natur bleibt bestehen.



calculating Pi by hand

Status: Offline
Posts: 768
Date:
Permalink  
 

I updated the UT3 material.

Download: http://www.mediafire.com/?xq1s9dbe55s2xf2

 

Blitz already gave it a try and I'm interested in how long it takes to load the package on different rigs. Perhaps some of you guys can check it out :)



__________________

Blog

Nichts wäret ewiglich, nur die Natur bleibt bestehen.



calculating Pi by hand

Status: Offline
Posts: 768
Date:
Permalink  
 

Here's a screeny of my UDK POM material. It has 26 samples/layer and is very complex (built with nodes only, no hlsl), but the pan cake artifacts disappeared nearly completely.




And for comparison, the same scene with a usual material that uses normal and parallax/bumoffset mapping:




I also made a gif animation with a rotating directional light (full 360°) to show the self shadowing implementation:



-- Edited by mAlkAv!An on Thursday 15th of March 2012 06:00:43 PM

__________________

Blog

Nichts wäret ewiglich, nur die Natur bleibt bestehen.



...ǝp¡s ɹǝɥʇo ǝɥʇ uo

Status: Offline
Posts: 4264
Date:
Permalink  
 

lol i m sure thoses who tryed to load yer package thought they ve frozen their PC haha^^ (mine took more than 12 full minutes)


...for the three last picts: WOW...3 pictures tell more than 1000 words! impressive again (especially that rotation thing!   )



__________________


AMD RYZEN 7 1800x@ 4.0ghz-MSI X370 PRO CARBON-2xMSI GTX780Lightning-Corsair Vengeance DDR4 16GB-SAMSUNG 850Evo-LOGITECH G19-CORSAIR VengeanceM65 & HX1200i-COOLERMASTER HAF Stacker915R/935/915F-Custom Loop



calculating Pi by hand

Status: Offline
Posts: 768
Date:
Permalink  
 

Bl!tz wrote:

lol i m sure thoses who tryed to load yer package thought they ve frozen their PC haha^^ (mine took more than 12 full minutes)


 Yeah, probably biggrin

The interesting part is that it took me just three minutes with the UDK to load a package that has 4 POM materials, each 3 times more complex than the UT3 material, and that was with my office rig (celeron G530 dual core). That's the best evidence of how much the engine has been improved since UT3 came out 4.5 years ago smile



__________________

Blog

Nichts wäret ewiglich, nur die Natur bleibt bestehen.



Feedback-Master ..

Status: Offline
Posts: 1767
Date:
Permalink  
 

"With the blast shield down, how am I suppose to see it"... "Your eyes can deceive you, don't trust them"...

The static pictures show more of a difference to me. The GIF is cool, but maybe the light is moving a bit too fast.

How much strain does this technique put on a modern computer vs UT 3?

__________________


Connoisseur of Bourbon!

Status: Offline
Posts: 2895
Date:
Permalink  
 

THe examples look superb Malk!!

__________________

I like playing with stuff!



calculating Pi by hand

Status: Offline
Posts: 768
Date:
Permalink  
 

I can make another gif with slower animation if you want, but it would be more of a slide show then.

The most strain will be for the editor when loading and editing the package. In game it will run fine but usually you should use it only on certain spots.

 

Here's a quick fps comparison with my office rig / low end gfx GT520. I replaced the whole floor material, so that's quite a worst case scenario.



__________________

Blog

Nichts wäret ewiglich, nur die Natur bleibt bestehen.



Feedback-Master ..

Status: Offline
Posts: 1767
Date:
Permalink  
 

A slower animation isn't needed. Maybe it's because it's a GIF vs video, that's the "issue".

The pic you just posted clearly shows the visual difference.

__________________
Page 1 of 1  sorted by
 
Quick Reply

Please log in to post quick replies.



Create your own FREE Forum
Report Abuse
Powered by ActiveBoard