Open Naxela opened 2 years ago
Hi! I tried doing this, but Im not able to finish it all the way. I'll share the status here: Not implemented are Self-Occlusion and Shadowing.
I first made a custom shader for parallax, then then exposed this Mapping using a new Material node:
The Shader works almost perfectly, but it shows some glitches when viewed at from steep angles. I dont know why. To get it to work I had to force Armory to export tangents for all Meshes. It does not let you turn this on for Custom Materials (change in exporter.py
)
https://youtu.be/zv1MGA2F9Hk
The Node works as stated the exact same way. But it is really broken. I can't figure out why, the closest I am is that globalPixelDir
seems to bounce to another value when moving the camera in the Node version, but not in the shader.
Also, using a normal map as shown in the first picture makes Armory crash very frequently. I have no idea weather this is because of my Node.
The parallax-occlusion-mapping logic is adapted from https://learnopengl.com/Advanced-Lighting/Parallax-Mapping , an amazing site!
My fork of armory, with the exporter-"fix" and the new Node: https://github.com/Simonrazer/armory A testing .blend, including my Shader: ParallaxTestin.zip
If this is usefull for anyone to finish this bounty, please use it! A small cut would be very appreciated ^^
A working implementation of Parallax Occlusion Mapping (POM) with self-occlusion/self-shadowing will release the bounty of $100 on Bountysource.
Suggested implementation (Optional):
Implementation material (Inspiration):
Bountysource Link: https://app.bountysource.com/issues/111898135-100-bounty-parallax-occlusion-mapping