Some clarification about normals in Google Photorealistic Tiles

Hey all, I’ve been wrestling with this issue for a while now and have found some conflicting information that I’d like to understand better. We are using Google Photorealistic Tiles but want to have shadows, time of day etc. so we’re using them with the Cesium lit shader, however it seems they don’t actually respond to lighting until you check “Generate Smooth Normals”. The problem is turning on Generate Smooth Normals creates grid artifacts at the edge of tiles, which I understand is caused by the “skirts” that are part of the Google Photorealistic Tiles:

My questions are:

  1. We’ve been using Google Photorealistic Tiles for a while now and I don’t remember this always being an issue… was there some update that caused this to be more prevalent?
  2. Am I correct in saying that Unity lighting doesn’t work unless Generate Smooth Normals is checked? Has that also always been the case? I’ve seen some previous posts stating that lighting should still work, but this is what it looks like with smooth normals off:

So I’m wondering is there any way to have lit tiles without the grid artifacts?

Hi @abliss86,

Indeed, Generate Smooth Normals will make the cracks between tiles more pronounced due to the “rounded” edge appearance. Have you tried overriding the Opaque Material property on the tileset with CesiumDefaultTilesetMaterial? That should prompt flat normals to be generated for the tileset. Otherwise, the tileset will default to our unlit material.

Hi, yes, that’s what we’ve been doing. Both images are using the CesiumDefaultTilesetMaterial, the top one is with smooth normals on (which causes the grid lines) and the bottom is with smooth normals off (which causes lighting not to work). I’m just wondering if you all have found a way to reduce/hide the grid line effect while still allowing lighting.

I hit the same issue! CesiumDefaultTileSetMaterial could use some fixing. Or at least Cesium could add a “Simple Lit” basic shader or the likes. Also the normals are not rendered correctly it seems. They are not facing up in unity coordinates system, depending on where you are on the globe. Not sure why? It took me a while but I ended up writing my own shader using Toony Colors Pro addon that removed “Ramp Shading” from the shader. That fixed the issues of tiling. You can see my post from earlier here: Generate Smooth Normals causes tile artifacts - #2 by janine

@5DRealities that’s very interesting, do you have any more information about that “no ramp” effect? I don’t have Toony Colors Pro to test it out.

And @janine I did some more testing and figured it out (sort of): the reason the lighting wasn’t working with Generate Smooth Normals off was because it seems the default normals were flipped… multiplying them by -1 seems to make it work. Can you think of any reason why that would be the case? The project works for now but I’m curious if I messed something up or if this is a known issue.

EDIT: Actually that’s not it exactly. It seems that without Generate Smooth Normals it just picks a random direction for the normals? Can you explain how it works without Generate Smooth Normals?