Qendolin / better-clouds

Beautiful clouds in touch with the vanilla style
https://modrinth.com/mod/better-clouds
Mozilla Public License 2.0
39 stars 15 forks source link

Moon halo / light scattering does not track actual position of moon #62

Open BioTechproject27 opened 8 months ago

BioTechproject27 commented 8 months ago

Describe the bug

The clouds have this effect of appearing to scatter the moon and sun light, which is very beautiful, however that occurs even when they aren't/shouldn't be visible. When blocked by vanilla weather fog (rain & thunder): 2024-01-10_01 35 48

or by a giant wall of solid rock: 2024-01-10_01 44 40

Also causes issues with mod(s), such as: Caelum Refabricated, which adds a seperate moon cycle, thus causing a desync, where the actual moon has no light scattering cloud halo and instead a mystical glow appears [where the moon once was]. 2024-01-10_02 09 57

Also, sth which is more of a feature request ig: When used with Distant Horizons, clouds render infront of LOD chunks, which makes looking into the distance, especially with zoom mods or a spyglass, very weird.

Qendolin commented 8 months ago

The incompatibility with Distant Horizons is already known and being tracked on their GitLab as it's an issue on their end. As for Caelum, I could add an option to disable to effect all together, because right now I don't have the time to add proper mod compatibility. As for the effect being visible when it shouldn't: For rain & thunder it's an easy fix, but with blocks I don't know yet.

BioTechproject27 commented 8 months ago

The incompatibility with Distant Horizons is already known and being tracked on their GitLab as it's an issue on their end.

Ah, nice

I could add an option to disable to effect all together

I guess that could be a temporary option, especially for mods or resourcepacks that change the size/number of celestial objects.

As for adding support to such resourcepacks and perhaps also fixing the visibility through walls: Perhaps one could calculate (and save the calcs) the "size" of objects in the skybox texture, and above a certain threshhold (of size and brightness [e.g. 16x16 pixels or so, which could represent a small moon]) have a raycast once a second or so from the skybox to the player to see if said objects edges are visible and add a glow accordingly. Could maybe even do that for the seperately moving moon texture that Caelum does (or maybe not, idk how they do it). Ik raycasts are computationally expensive, but this is just a first idea. It would maybe make sense to have a low computation option (what is now) and a high comp option.

No worries though, take your time. These are just minor inconveniences at best, not world breaking

BioTechproject27 commented 8 months ago

Completely seperate question: I noticed these dark 'dots'/grid thingy happening: 2024-01-10_03 49 36-crop

It just looks a bit odd, since clouds don't do that usually.. May be called a bug, but it's only really visible if one looks too closely Why is that happening though? Is it not using basically transparent png's? Just curious

Qendolin commented 8 months ago

That's called dithering, and due to the way that I render the clouds, all of then must have the same opacity. So to fade them in and out I don't have a different option.

Qendolin commented 6 months ago

I've added an option to disable the "halo": https://modrinth.com/mod/better-clouds/version/1.3.15+1.20.1-R I'm also keeping the issue open, as I might add more options for this later. The current implementation is quite ugly.