Hello!
Is it possible to get a slope value from a heightmap in the materials?
I’ve tried the NormalFromHeightmap node and comparing (using dot product) the result to (0,0,1) vector - that works, but it ignores one side of every hill, etc:
Then, I’ve found this:
https://gamedev.stackexchange.com/qu…ight-map-cells
… So now I’m trying to implement it in UE in materials, but in the comments, they say that it should sample from x-1 and y-1 as well - maybe that’s the issue and why one side is ignored here?
I’m trying to implement that now, but maybe some of you will know if that’s possible at all? Or maybe there are some engine functions that do this already in UE?
Thanks in advance, I’d be grateful for any tips.
Update 1: I’ve found this: https://www.parallelcube.com/2017/12…-introduction/
… It looks like it might work - I just need to check if we can control the slope detection ‘sharpness’/angle with that…
Update 2: No luck, it doesn’t seem to work with e.g. simple gaussian gradient.