Hey there!
I am experimenting with POM in NME and noticed that the “parallaxHeight” input of “Perturb normal” seems to be ignored. Instead, it seems the height comes from the alpha channel of the normal map, which is not obvious given we only pass the RGB channels to the block.
Is this a bug? I wanted to use a separate texture for the height map but it does not seem to work:
While this one works (I believe height data is stored in the alpha channel)
Edit: here are the texture I used
cc @PatrickRyan (please be patient as our pixel master is on vacation)
@CrashMaster, for parallax occlusion in our shaders, we always expect the height map for parallax occlusion to be in the alpha channel of the normal texture as listed in Parallax Mapping | Babylon.js Documentation. When it comes to node material, we expect the same dynamic where the height texture for parallax occlusion is in the alpha channel of the normal texture. The two inputs on the perturb normal block - parallax scale and parallax height - are for parallax mapping (listed first on that documentation page) but are not used for Parallax Occlusion Mapping as that is a different technique. Once you check the box for Parallax Occlusion Mapping, the two parallax inputs are ignored on the block as they are unneeded.
I will update the documentation to denote how these techniques work with the perturb normal block on node materials, and we are looking at how we can denote inputs that are unused based on the settings of a particular block to help give feedback that once you enable Parallax Occlusion Mapping that the parallax scale and parallax height blocks are no longer contributing to the render.
Oh that makes sense! I assumed that POM was an extension of Parallax mapping and would use the same inputs. Thanks for taking the time to explain ^^
1 Like