HeightToNormal node problem

Hey everybody. I’m trying to create material with animated clouds procedural texture. So after I created a node setup that got me the look I was after I used HeightToNormal node to plug the effect to normal map slot on pbr node and there my problem starts.

Out of the box this is the result I get

After turning on “Generate in world space instead of tangent space” setting in HeightToNormal node shading starts to look as I expected it to be

But after close inspection I realized that now I only have normals created from the noise texture and the ones from the mesh are not present.

I tried plugging it in perturb normal node before pbr shader but that also doesn’t give me correct result :frowning:

So question is what am I doing wrong in my setup :slight_smile:

Welcome aboard!

I think you get the expected result, normals are generated according to the texture height and the input normal.

I’m not sure what you try to show in the circled areas? Could your problem be that the sphere is not tessellated enough?

Having a repro may help understand what the problem is.

1 Like

Hey Evgeni, thanks for your welcome and reply! The circled areas show visible quad polygons of the sphere mesh. When I disconnect normal map the sphere is shaded smooth so my guess is that when I plug the normal map it discards mesh normals?

So here is the nodegraph.


Thanks once again.

I think it’s because of the tessellation / input signal of the HeightToNormal block.

When the input comes from a texture, there’s a bilinear filtering which is applied when reading the value, which smoothes out the signal. Maybe you would have to calculate several values and average them before connecting to HeightToNormal? One way to know would be to generate a texture and use it instead of the current calculation.

Also, the tessellation does have an impact:

Tessellation: 16

Tessellation: 64

PG:

Hey @Evgeni_Popov! Thanks for the help. I tried with the image texture and still got “faceted” look in the areas of the mesh affected by the height map image texture so I’ll probably go with more tessellated sphere to get smoother results.

Cheers!