Hello everbody!
I encountered a strange phenomenon. When I mirror a prefab it does not render the normal map correctly anymore, but just in game mode. Please have a look at the attached image to see what I mean. I set the normal map intensity to a high level to make it easier to see what I mean.
I double checked the mesh normals and UV coordinates - they seem to be all right. Am I missing something or is this a bug?
Unity 2021.1.22f1, HDRP version 11.0.0
Many tools tend to compensate negative scale.
As a whole when a normal flips it can negate, which you don’t really want to happen.
I’d double check that the normal is in fact only flipped on the Y (green) axis and imported as a normal map ( not default)
I found the problem. You just cannot give a prefab a negative scale value.
See more here , there is someone having the same problem and I added a couple more details.
Yeah that make sense.
This kind of thing really plagues a lot of softwares.
It’s a silly bug really, but basically due to scaling being more nuanced (cause of supporting negative scale for flipped instances, and all the arrays)
I feel the normals should just always be clamped not allowing them to invert when in negative scale.
It’s not like you’d ever want this to happen.
All right, I ran some more tests:
Same problem in Unity 2021.1.22f1, HDRP version 11.0.0, 2019.4 LTS URP and Unity 2018.4.28f1 standard renderer.
Scene view - fine
game view (before I hit play) - fine
Game view (as soon as I hit play) - broken
a model with a negative scale value - fine
a model as a child of an object with a negative scale value - fine
a prefab with a negative scale value - broken
a prefab with a positive scale value, but the model within the prefab has a negative scale value - fine
a prefab with a positive scale value as a child of an object with a negative scale value - broken
It seems to work in 2022.1 alpha HDRP in some cases, but not always. I am not going to continue testing.
