I wanted to know if I was missing a step to get the normals to be computed correctly when using a height map to displace the vertices in a material.

I know that when you displace vertices in a vertex shader, an extra step is required to re-compute the normals. I know how to implement such a solution, but I find it a bit weird that the built-in vertices displacement does not provide this features.

I was wondering, how to go about cases when heightmap displaces vertices of a non-flat geometry, for example a sphere? What is a way to calculate new normals that takes into account the original normals of the sphere SOP and the normals of the displacement map?

I am attaching an example where lighting is wrongly computed. It is similar to the case of displacement with Noise SOP I posted here, where the solution was to compute new normals with Attribute Create SOP. Is there a built in solution for displacement with height map?

What I am wondering is if there’s a way to calculate normals for the height map in a way that this look: