Hi,
I have tiled kml/collada of subterranean cross-sections.
When the camera is above ground and the globe is transparent they look as expected.
However, when the camera is below ground the further they are away from the camera, the darker they appear.
I’m sure there’s probably a setting I need to change but I can’t find one. I have tried adjusting the undergroundColorAlphaByDistance values, but no luck there. I’m thinking it’s because the scene’s light can’t make it underground.
I was wondering if anyone had any ideas?
Thanks in advance,
Will
Hi @will_riddy,
Any chance you can provide a demo sandcastle demonstrating your issue? I think I understand the problem, but it would be helpful to play around with some settings rather than just speculate.
For what it’s worth undergroundColorAlphaByDistance only seems to control Globe.undergroundColor, which is "the color to render the back side of the globe when the camera is underground or the globe is translucent, blended with the globe color based on the camera’s distance. " (docs). So I don’t think that would affect your 3D tiles here.
Hi @mzschwartz5 ,
Thanks for getting back to me. Here’s the link to the sandcastle.
Thanks for clarifying the undergroundColor.
Will
Thanks for the demo. Very interesting… to me this seems to have less to do with the distance from the tileset underground, and more about the viewing angle. I’m not quite sure what’s going on just yet (continuing to investigate).
Looks like the culprit is fog, try turning this off:
viewer.scene.fog.enabled = false;
Not sure exactly why, but I can certainly understand generally how being underground might cause issues with fog calculations. As a workaround, you could set up a camera callback that disables the fog whenever the camera height goes subterranean.
Hope that helps!
Best,
Matt
Thanks @mzschwartz5 works a treat.
1 Like