Page MenuHome

Parallax Occlusion Mapping
Confirmed, LowPublicTO DO

Assigned To
None
Authored By
Clément Foucault (fclem)
Aug 9 2019, 5:20 PM
Tokens
"Love" token, awarded by alesis."Burninate" token, awarded by AnityEx."Love" token, awarded by EmiMartinez."100" token, awarded by helloidonthaveanyideaformyusername."Love" token, awarded by beyond."Burninate" token, awarded by sanath."Love" token, awarded by Schamph."Love" token, awarded by SeanLewis."Love" token, awarded by PathOut."Love" token, awarded by Mylo."Love" token, awarded by LapisSea."Like" token, awarded by klutz."Love" token, awarded by jc4d."Love" token, awarded by blueprintrandom."Love" token, awarded by lcs_cavalheiro."Love" token, awarded by dpdp."Love" token, awarded by Arkhangels."Love" token, awarded by hitrpr."Love" token, awarded by mindinsomnia."Love" token, awarded by Steve_White."Burninate" token, awarded by imad_mss."Love" token, awarded by brilliant_ape."Orange Medal" token, awarded by lopoIsaac."Love" token, awarded by Yegor."Love" token, awarded by Kdaf."Love" token, awarded by ttrevan."Love" token, awarded by ZackMercury."Love" token, awarded by temeddix."Burninate" token, awarded by VirtusH."Love" token, awarded by mastajappa."Love" token, awarded by SHEIKH."Love" token, awarded by RodDavis."Love" token, awarded by CobraA."Love" token, awarded by awils27."Love" token, awarded by corpse."Love" token, awarded by MARodionov."Love" token, awarded by andruxa696."Love" token, awarded by cgvirus."Love" token, awarded by mistajuliax."Love" token, awarded by Draise."100" token, awarded by januz."Love" token, awarded by Shimoon."Like" token, awarded by belich."Like" token, awarded by iWaraxe."Like" token, awarded by bonalex01."Like" token, awarded by 1seby."Love" token, awarded by Fracture128."Love" token, awarded by amonpaike."Love" token, awarded by Leroy."Love" token, awarded by ogierm."Love" token, awarded by szap."Love" token, awarded by Blendork."Love" token, awarded by jonathanl."Love" token, awarded by ofuscado.

Description

Using the same thechnique as High Quality Bump, we should be able to implement Parallax Occlusion Mapping.
This could be done auto-magically when plugging nodes to the displacement socket or by using a new node.

Details to be decided.

Estimate : 2 weeks

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

I'm curious as to how this feature would work with arbitrary geometry. Parallax occlusion is a trick that relies heavily on proper tangents and faking depth with UV distortion, a system that does it automatically would need to know the context behind how a texture is mapped and how geometry is set up to clip for silhouette, plus offsetting fragment depth to fix flat intersections.

Maybe an automatic system to do this could work, but I'm not sure how wise it would be given the complex nature of this (hacky) effect.

It seems to me like a better solution might be to:

  1. Expose fragment depth offset as a socket output for EEVEE (could serve allow the user to also do things like stochastic edge blending and imposter geometry depth)
  2. Provide a Parallax Occlusion node that exposes inputs for: tangents, normals, UVs, height, silhouette clipping parameters, etc. and outputs a vector for the resulting texture coordinate, silhouette mask, and fragment depth offset.

This approach would also allow the user to combine parallax mapping to create deep layered materials (ice frozen over rock, crystals with internal structure, etc.) and reduce the software engineering burden of creating another "smart" black-boxed feature that fails to satisfy additional needs.

@astrand130 I don't see how the simplified workflow version is orthogonal to the implementation you suggest.

The "magic" implementation I suggest is just adding some invisible node and replace all UV links by the deformed UV. This is what we do for the displacement socket.

Of course we would still have a dedicated parallax node to only modify certain texture coordinates.

Provide a Parallax Occlusion node that exposes inputs for: tangents, normals, UVs[...]

That's something I'm still thinking about. Since we can use any mapping we don't need tangents and normals unless we are using UVs but in this case the dFdx ones should suffice. But the arbitrary mapping is a hard one to figure out.

Silhouette clipping

To my knowledge silhouette clipping is just a depth offset of 1 making the fragment always fail the depth test.
I think the silhouette clipping and depth offset are a secondary target that should be considered after the initial POM implementation.

Just to be clear it is the displacement technique used in Marmoset Toolbag.

This feature would also be pretty useful to have in Cycles too. Even though one could in theory render for example a brick path with displacement maps and a heavily subdivided piece of geometry, being able to use a lower polygon flat piece of geometry with just an illusion of depth would be much more efficient. And if Eevee is going to get this feature at some point, having it in Cycles too would allow for more consistency between the two render engines for switching back and forth between them.

Kdaf (Kdaf) added a subscriber: Kdaf (Kdaf).
This comment was removed by Juan Gea (juang3d).