Hi there!
This is a bit of a hard problem to articulate, but bear with me.
At startup I generate a bunch of cloud meshes, all basically square slices from a heightmap (I chopped them up for efficiency reasons so I can load in/out segments as they enter/leave the players viewable area).
Anyway, I wanted these clouds to be transparent, so I set the .alpha on the shared standard material to ~0.95. All well and good, translucent enough but still pretty solid. The thing is, I can see through cloud faces into other cloud faces, which makes it look like there’s a rendering order problem and clouds are overlapping (they’re not). The problem is twofold.
-
For a given cloud mesh, I don’t want to be able to see any other faces contained within this mesh through the transparency of another face within the mesh.
-
Also… from a given cloud mesh, I don’t want to see through to the faces of other clouds meshes through transparency.
Is this sort of thing possible? Basically, to render the clouds so that the transparent areas see through to what it would be like if no clouds were present?
Clouds from the ground, problem not too noticeable
Clouds up close, we can see a cloud face behind another, looks dodgy. Without transparency, this issue doesn’t occur