0
En revisión

Having UVs on mesh screws normals...

BecomingAt. hace 10 años actualizado por Freya Holmér (Developer) hace 10 años 5
Having UVs on a mesh screws normals, even if the uvs are not used. I use world space top down projection as uv coordinates, i want to use UVs for parts that are steeper (instead of triplanar projection) but when the mesh has meshUVs the normals of the topdown projected part get screwed(looking flipped somehow).

Image 259
The image shows the mesh with MeshUVs and without MeshUVS, the Normals on the steep part look ok but the normals on the topdown projected part get screwed.

The steep part is lerped using the mesh normal (not perturbed ! )... the lerp does not reach the flat part, so its not the normal map reaching the lower part.

here is the node tree..
Image 260

I also tried to remove the 2 nodes that i want to use with mesh uvs to see if it also happpens when the mesh uvs are not used, and yes it also screws the uvs of the top down part. The problem goes away when the mesh has no UVs, but unfortunately i need UVs as triplanar is too expensive. 

pleeease help! :)
En revisión
Not sure what it could be, but I don't have the time to look into it at the moment. Try to isolate the issue as much as possible.

I would guess though that you're putting in world-space UVs for something that's made to be in tangent space, but I'm not sure.
yeah that is a good tip! although i wonder why adding uvs to the mesh changes the way normals are handled, i will try to dig deeper and let you know what i find, thanks for the help!
Did there ever end up being any resolution to this issue? I've got some SF triplanar shaders that behave fine when applied to meshes with no UV's, but leave seams all over the place when a mesh has existing UV sets. I've similarly isolated it down to just the way the normal maps are interacting (the diffuse texture is seamlessly projected), and i wonder if it's due to rotated UV shells or something
The problem is that I don't know what is actually causing this. However, UVs do affect the way tangents are calculated, so anything tangent space related will affect this. As of later versions of SF though, you can define the normal in local space or world space too :)