Babylon.js icon indicating copy to clipboard operation
Babylon.js copied to clipboard

[NME] New node for height to normal

Open PatrickRyanMS opened this issue 4 years ago • 3 comments

With our expanded noise node offerings, we are in need of a node to generate tangent space normals from a height map for procedural textures. The node would have a float input for the height map and potentially an input for the strength of the normal like we have on the perturbNormal node. The output would be a Vector3.

image

PatrickRyanMS avatar Oct 20 '21 22:10 PatrickRyanMS

@PatrickRyanMS: to be able to do it I cannot take a float as I need to sample surrounding pixels to get the slope. So the entry point would be a texture

Will that still be ok?

deltakosh avatar Aug 09 '22 20:08 deltakosh

@deltakosh, yes... sorry... I didn't mean a float value, I meant a single channel texture and mistyped. I expected the input would be a texture to compute the slope, but I also expected that input to be a single channel and not an RGB image.

PatrickRyanMS avatar Aug 09 '22 21:08 PatrickRyanMS

Well..I may had a good (or bad?) idea... PR to come

deltakosh avatar Aug 09 '22 21:08 deltakosh