Parallax Occlusion Mapping

I have uploaded a new diff with some improvements. The new code diff and a sample blend file can be found here: https://developer.blender.org/D9792. An experimental build can be found here: https://blender.community/c/graphicall/frbbbc/

Changes in this new version:

  • There is a new optimized GLSL shader for rendering shadow maps. The material has now two parameters for the number of samples: One for the number of ray marching steps when shading the surface fragment and an additional one for the number when rendering shadow maps. Often the rendering of shadow maps requires less samples for acceptable visual quality, so this additional parameter helps improve overall performance.

  • I have ported the automatic image texture LOD selection used in the original POM node based approach (see first post in this thread and diff linked there) to this displacement node tree based approach. For image textures with linear interpolation used in the displacement node tree it will use a LOD (mipmap level) based on gradients calculated at the first step of the POM iteration. It will then keep this LOD fixed for any further POM iterations in order to avoid any issues with divergent code branches (in the 2x2 blocks used for differential approximation). Good LOD selection is important in order not to be bottle-necked by memory access/bandwith when sampling the image textures. This improvement should remove the main performance drawback of the displacement node tree based approach compared to the original node based approach. For image textures with cubic interpolation I have kept Blender default of using LOD 0. This is not so great for performance, but still gives generally the best quality (except for potential aliasing issues).

  • The new version also fixes a small memory leak issue present in previous versions.

25 Likes

Is it going to be part of blander soon ?

I just wanted to chime in and thank you for your effort in implementing POM into Blender.
I did test the feature with some custom textures and it looked nice.
Thank you again, i hope to see this at some point in trunk, it really helps for the game art side of things.

4 Likes

I made a few test images for the POM.


I used a mist pass for the depth, and I found that using a normal map gives really good results.
Even at 4 samples, and a texture resolution limitation of 128x128, the understanding of the image holds up.

I find best results when the POM and displacement node drivers match each other, drivers work well for this.

1 Like

Here’s a small test.

https://youtu.be/o1IeDvwCJ-Q

37 Likes

So cool, the usage is really nice. When I see that, I think I will not face problem for my uses !! Integrating just perfect !!

This is awesome! I’m so hooked by POM for Eevee, we need this!
Tried a lot of stuff with it, it’s even usefull for massiv scale Environments:

11 Likes

Why do you have the preview textures in the nodes? Is this an addon?

6 Likes

Hell yess, this is awesome!

1 Like

Is it possible to cut plane edges (pixel offset)?
like this: https://blenderartists.org/t/parallax-displacement-in-cycles/1126874
At least for cycles.

searched and found:

5 Likes

Hi,

will this land on 2.92? or 2.93?
if not, is it not being worked on anymore?

5 Likes

Hope we can have a branch with the new DOF included in 2.93. Will be awesome to implement both effects in eevee. I not a programmer so i´m not having luck with git.

(apologies I misunderstood)

1 Like

Hadriscus, what i mean is that i wish we have this POM feature included in blender 2.93 the one that has implemented the new Unreal engine like Depth of Field. Regards!

7 Likes

i agree, i would also love a 2.93 build, i really need those updated eevee light/volumetric updates…! This POM build is awesome really.

4 Likes

+1, even this build with it’s stated limitations has already proven invaluable to me

3 Likes

I just forgot about other versions of blender, i only this 2.92 blender POM branch, i dont know why nobody is paying attention to this awesome feature. It has even been featured in substance designer official channel tutorials.

28 Likes

+1 for getting POM into Blender master!

8 Likes

Yeah such a feature is long overdue.

1 Like