Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modder control over fog. #13421

Closed
mecha-moonboy opened this issue Apr 12, 2023 · 6 comments · Fixed by #14296
Closed

Modder control over fog. #13421

mecha-moonboy opened this issue Apr 12, 2023 · 6 comments · Fixed by #14296
Labels
@ Client / Audiovisuals Feature request Issues that request the addition or enhancement of a feature @ Script API

Comments

@mecha-moonboy
Copy link

I have been trying to take beautiful screenshots of some cave mods, and I need to be in fly mode with noclip in order to get fog so that I can see the size and shape of caves. Otherwise, the illumination from generated blocks is flat and not very appealing. I cannot achieve the effect of fog in survival.

It would be excellent if there were methods/properties that allowed modders control over fog color and strength. This would also allow more creativity for biome colors and themes, themes at different y levels, and overall, more control over the feel of the game.

With fog in noclip fly mode (not ideal color or strength, but I take what I can get):

screenshot_20230411_185811

Without fog, what it would look like in survival:

screenshot_20230411_190123

@mecha-moonboy mecha-moonboy added the Feature request Issues that request the addition or enhancement of a feature label Apr 12, 2023
@FossFanatic
Copy link

FossFanatic commented Apr 12, 2023

This issue has also been bugging me when trying to work on the fog in the Nether. The Nether fog is always black, instead of being dependant on the biome.

@Desour
Copy link
Member

Desour commented Apr 12, 2023

Related (duplicate?): #8142

@FossFanatic
Copy link

No, not at all.

This issue is about fog always being black underground when in survival mode, while the other is about there being no way for a server to override a client's view range and full range view.

@lhofhansl
Copy link
Contributor

I think we should fix this via the sky api. It already has fog-tint and sky color settings.
We can add both fog color and fog distance (and fog start while we're at it) to it.

@lhofhansl
Copy link
Contributor

@sfan5 Following up on the discussion on IRC:

  • fine to use the sky api
  • we'll allow setting the fog distance, fog color, and fog start ( range [0-1) )
  • if the server sets a fog distance the following needs to happen:
    The client needs to disable range_all (and disabling fog?)
    The client can still set a smaller viewing_range than what the server request (since that is a performance thing).
    The client also needs to send this the server-set distance as its wanted range to avoid sending unnecessary blocks.

@lhofhansl
Copy link
Contributor

I'll do a PR as soon as I find some time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@ Client / Audiovisuals Feature request Issues that request the addition or enhancement of a feature @ Script API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants