Emptying out SUNTAIL house interiors, and making houses that block the camera transparent
Removed the furniture and lights meant for a first-person demo from the house interiors, leaving just exterior shells and cutting renderer and light counts a lot. When the camera goes inside a house or a house blocks the character, that house now dithers away.
The SUNTAIL house prefabs were originally made for a first-person demo, so every floor came with interior props like furniture, candles and fireplaces, plus 12 interior lights and interior sound zones. Up to 135, only the filler houses had their lights and sound turned off, and the 5 role houses still had their interior lights on.
I'm planning to build each house interior as its own scene anyway, so I decided to keep only the outer shell of the village houses and cut the wasted memory. There was one more problem: with the character close to a house, turning the camera let you see right into it.
What I built
When the camera enters a house's bounds (with a 0.3 m margin), that house empties out completely right away. A house blocking the view between the character and the camera dithers out over 0.15 s. Once it's out of the way, it fills back in over 0.35 s, and when it's fully back it returns to the original shared material, so normal batching and performance stay the same. It's turned off during the opening sequence so houses don't vanish mid-tour, and house shadows stay even while the house is hidden.
I removed the interior props, interior lights and interior sound zones from 19 houses. Unity 6.6 saves this as removal records, so the prefab links stay alive, which means the roof colors and annexes don't break either.
In numbers: GameObjects 14,665 → 11,142, Renderers 12,155 → 8,869, Colliders 3,012 → 1,694, Lights 161 → 2. The scene file went from 14.52 MB → 14.54 MB, basically unchanged, because the prefab contents were never in the scene file to begin with and only the removal records were added. What goes down is runtime memory.
Chimney smoke, vines and planters on the outer walls, and the outdoor stairs and balcony on one house aren't interior, so they stayed.
At first I tried a semi-transparent 0.3 so you could see through a little, but the dither grid pattern showed plainly. On top of that, the houses (9–15 m deep) are deeper than the actual camera distance (8.06 m behind), so by the time a house blocks the view, the camera is usually already inside it. So I went with emptying them fully in every case.
Spinning 360° for 6 s in front of the inn wall, the house stayed invisible for all 389 ticks the camera was inside it, and when the spin ended every house was back on its original material.
Things I thought about
- Empty the house instead of pulling the camera in. I didn't want to touch the camera distance and angle I'd set in 133.
- Screen dither instead of alpha blending. Blending semi-transparently makes the house mesh overlap itself, which breaks front-to-back sorting and throws off depth and SSAO.
- Leave the pack shaders alone and use 2 copies. I copied the surface and foliage shaders and added the fade value and a 4×4 dither cut. It has to match the depth prepass or holes show up, so I added it to the depth-related passes too, and left the shadow pass as is.
Next up
- NPC name tags show through walls (no occlusion check)
- Cases where the camera goes inside props like stall and well roofs, retaining walls or forest trees aren't handled yet
- I didn't rebake the NavMesh. The leftover interior floor pieces can't be reached because the doors are closed, and they'll get cleaned up the next time I rerun the generator


