godot-volumetric-clouds icon indicating copy to clipboard operation
godot-volumetric-clouds copied to clipboard

Clouds disappear when the camera is very far away

Open kb173 opened this issue 4 years ago • 6 comments

There is a certain threshold distance at which the clouds suddenly disappear. This can be observed when zooming far out in the editor. In-game, this is likely to never happen unless the world is viewed at huge scales. However, it is irritating in the editor due to the scale of the clouds.

Probably related to the atmosphere intersection and raymarching step_length. Could it be floating point inaccuracies?

kb173 avatar Feb 11 '20 19:02 kb173

Ah, this is due to the bounding box being exited. The "Extra Cull Margin" is set to 16384 to mitigate this, but it is noticeable in the editor and feels hacky... Is there a way to completely disable the bounding box check?

kb173 avatar Feb 12 '20 14:02 kb173

No there is not. All visual instances have to go through that check unfortunately. I should know. Using the insanely large cull margin is the closest to disabling it. However, maybe you could set it up so that the object follows the active camera in the scene. That way it will be visible no matter how far from the origin the viewer is. 🙂

SIsilicon avatar Apr 09 '20 14:04 SIsilicon

Also, I'd like to say you are doing an excellent job with this plugin in progress! 😁👏👏👏 I made volumetric clouds before, and it was tricky. If you'd like, I wouldn't mind sharing some of my code with you. I even have a realtime weather map generator for this enhancement. https://github.com/kb173/godot-volumetric-clouds/issues/3

SIsilicon avatar Apr 09 '20 14:04 SIsilicon

Oh thank you! Unfortunately I haven't had much time for it lately... but I'd love to expand it. Some help / inspiration on the weather map generator would be fantastic!

Sucks that the cull margin check can't be disabled. However, with the setup in the demo project where the cloud renderer is a child of the camera, it should never happen, so that's good! It's just a bit irritating in the editor.

kb173 avatar Apr 09 '20 16:04 kb173

Oh thank you! Unfortunately I haven't had much time for it lately... but I'd love to expand it. Some help / inspiration on the weather map generator would be fantastic!

Splendid! I'll just make a pull request later with the weather map backend. It should be as easy as hooking up its viewport to your shader.

SIsilicon avatar Apr 09 '20 17:04 SIsilicon

Awesome, looking forward to trying that out!

kb173 avatar Apr 09 '20 17:04 kb173