material-maker
material-maker copied to clipboard
Add Depth output to Normal Map node
Adds a "Depth" output whose scale is linked to the strength of the normal map, to streamline height-only workflows.
Intended usage:

The Normal Map node being proposed by this pull request:

It's a neat trick, but multiplying depth might be a bad idea for high values of Strength. If anything, I'd remove the multiplier node. Correlation between normal map and height map depends on the model anyway.
Thanks for the feedback! The idea is that the exact ratio between normal and depth can be adjusted with the material's depth_scale parameter, which can be set once based on the model's uv scale. Afterwards, the Strength parameter would be used to tweak heightmap scale with correct normals automatically applied, which I find especially useful for quick experimenting.
Workflows where normal and depth are less correlated would of course calculate depth from height themselves, and would not use this new Depth output.