Dynamic Surroundings: Fabric Edition

Dynamic Surroundings: Fabric Edition

744k Downloads

[1.21.1][NeoForge] Dynamic Surroundings 0.4.1 breaks fog rendering of other mods even if every fog tweak is disabled.

VOLKOUL opened this issue ยท 26 comments

commented

In my case Dynamic Surroundings breaks the custom fog rendering of Nostalgic Tweaks. (I use a forked version of NT as it has multiple fixes: https://github.com/Xenthio/Nostalgic-Tweaks-X/tree/1.21 For 1.21.1 you must change the dependency manually. NOTE: The forked version doesn't change anything about the fog, the original version would still have the same problem, as would other mods that add custom fog)

My settings for NT fog:
Eye Candy -> World Candy -> Fog Candy -> Custom Fog (Use custom overworld fog density: Yes) -> Density -> Custom Overworld Fog Start (Percentage: 100%)

Expected Result:
2024-12-31_15 47 20

What happens when Dynamic Surroundings 0.4.1 is installed:
2024-12-31_15 53 23

This issue doesn't happen with Dynamic Surroundings 0.4.0 (obviously)

commented

Took a look at the source and nothing specifically stood out. It may be a weird dynamic. I will see if I can find it.

commented

OK - finally found where NT hooks the fog setup. Both NT and DS hook the same spot (at the return of setupFog). DS runs after NT because of priority setting. DS uses local captured variables as parameters to work with, and NT uses what was configured in the shader. I can tweak how DS sources the fog range info, which would, in theory, allow both NT and DS to influence fog range. Not sure how well it will look practice - would need evaluation.

As for the master setting for disabling fog - I did a bonehead. For some reason my subconscious thought it was a good idea to hardwire the disabled check so that it is always on.

commented

I have similar problems, even if I have completely deactivated the fog, it is still present at the edge of the chunks. I use Distant Horizons and you can really see it there.

"fogOptions": { "enableFogEffects": false, "enableMorningFog": false, "enableBiomeFog": false, "enableWeatherFog": false },

0

commented

Looking at distance horizons, they manipulate the fog parameters in the shader by setting very large values in an attempt to disable fog. Basically, it's the same general compat issue with Nostalgic Tweaks. Outside of making the global enable/disable work correctly, the fog calculations that DS performs should work with DH, though the fog effects probably will not be seen.

commented

@VOLKOUL @a7jon Find a pre-release version for NeoForge that should address this issues: https://github.com/OreCruncher/DynamicSurroundingsFabric/releases/tag/prerelease Could you give it a try and let me know how it goes?

commented

In the pre-release the error is no longer there with fog activated or deactivated. Thank you very much for the quick fix and this mod in general, the mod enriches the game experience a lot.

1

commented

@OreCruncher The good news is that the fix works (yay!), but the rest of the fog settings seem to be ignored. I have them all disabled but I still get biome fog (not sure if this applies to morning and weather fog too). It does look nice tho haha! And yes, just as @a7jon said, this mod is amazing and I was so excited to finally see it updated. Thank you for you effort! :D

Screenshot (1165)
Screenshot (1166)

commented

The master fog setting should be telling DS to ignore fog - basically skip processing. Can you map a keybind to "Diagnostic Overlay" and activate while in the biome? There will be a green text section on the left titled Systems, and Fog should be the second to last entry. It should be listed as "Fog: DISABLED" if the master fog setting indicates.

commented

As you can see the fog is disabled, but actually it isn't. Biome fog still present. Again, not sure if morning and weather fog are processed too. (I didn't notice anything when testing but who knows)

Screenshot (1167)

commented

The master fog setting if disabled will prevent the other fog types from processing. I believe it is turned off and the source of fog is coming from elsewhere for some reason. In the upper right the yellow section is a list of profile timings of various handlers in my mod. The fog handler is at 0.001ms, which is what it would look like when disabled, at least based on my system. If fog is enabled, it would be about 0.050 when standing still. When moving the timing will go up because of area resampling, but if disabled it should remain 0.001ms. Can you provide a mod list?

commented

I just made a fresh installation with ONLY Dynamic Surroundings 0.4.2 and Architectury and the issue is still present (every fog setting is disabled), so it's unlikely to be caused by another mod. Weirdly enough I only observed biome fog in the swamp biome (again, with every fog setting disabled).

commented

Unfortunately, I don't know much about it anymore, but I think that something is still dragging out the gradient/course of the fog. I just created a vanilla 1.21.1 instance myself and searched for a swamp biom and set the render distance to 8, of course it's also a matter of angle but it looks like the absolute edge of the fog is at about the same place but the effect itself is pulled softer towards the front.

2

I then installed neoforge > architectury > dynamicsurroundings step by step to see if anything else was changing it, but there was only a change with dynamicsurroundings. However, if I set the fog to flase via dsurround.json, it is correct for me.

4

commented

Ah! Explains it. Render distance affects the fog start and end values in Vanilla. For render distance 12, start/end is 172.8/192.0. For render distance 8 its 115.2/128.0. Shorter render distances make the edge fog closer to the player. What was bothering me is the screen grab you provided for Vanilla + DS. It did not match what I see. I run with render distance of 12.

commented

Hm. I know that fog tinting is an independent thing. It's a property on biomes. DS will set swamps to a greenish tint. What is your render distance configured to?

commented

Render distance is set to 8. (not sure what render distance has to do with this)

I think that technically this can be considered a separate issue, as compatibility has been fixed (I hope lol)

commented

What we're trying to say is that we still get green fog in a swamp biome when Dynamic Surroundings fog settings are disabled (all set to false). Like I said previously, this happens even when there's ONLY Dynamic Surroundings and Architectury installed. No other mods present, not even Sodium, nothing. I felt I had to clarify this because a7jon's previous comment was a bit confusing lol. I do have the fog set to false in dsurround.json but I still get the green fog.

commented

Sorry @VOLKOUL, I misunderstood, but I was just confused because the fog looks different for me in the same settings, apart from the colouration. I was completely wrong in assuming that the screenshots you showed above were already from the minimal installation.

commented

Yeah the screenshots are from my modpack and not the minimal installation. Nostalgic Tweaks changes how fog looks (also the cloud blending) so that's why in your case the fog looked different.

commented

@VOLKOUL I am not able to duplicate what you are seeing in my "retail" instance. Which NeoForge version are you using? I am using 21.1.90.

commented

That's weird. Did you use the 0.4.2 version? (dumb question I know) I tested this on NeoForge 21.1.84 and 21.1.93 with only Architectury and Dynamic Surroundings installed and every fog setting set to false. Did you see if this affects the swamp biome specifically?

This is how stuff looks: (same for a7jon, judging by their previous post)
Screenshot (1169)

commented

All fog options off; render range 8.

2025-01-03_10 03 08

This is the fog info that has been configured for the shader by the Minecraft fog logic (I added extra diagnostics):

image

The values are the calculated begin/end ranges for range of 8.

Keep in mind fog color is an entirely separate thing. Biomes can be tinted, which changes the fog color. Normally its tinted white, but DS sets it to green for swamps. For me, perspective wise, the green tint gives it a "closer" feel than if tinted white. I seem to perceive white less. Not sure if that is common though.

Not sure if this makes a difference, but here are my specs:

image

commented

...
Ok, listen, I think there's been some kind of misunderstanding on your part. We have established that the mod compatibility issue has been fixed in 0.4.2 and we are no longer discussing that issue. We are not talking about fog range calculations, nor it's begin/end range.

We are talking about the fact that green fog is present in the swamp biome EVEN WHEN biome fog is off.
Fog color is exactly what we're talking about right now

It's literally in your screenshot and as you wrote, every fog option is set to false, yet there's STILL colored green fog in the swamp biome. Now a question arises: WHY is the fog of the swamp biome tinted when biome fog is clearly set to false?

Based on your comment, I assume that it's deliberate and based on your personal opinion. I think it should be up to the player to decide, as that's literally the reason for the existence of a toggle for biome fog color.

Now, just to make it as clear as possible, we don't want there to be green colored fog in the swamp biome when biome fog is set to false. That's it. I hope you understand.

commented

That's a relief. :) There isn't a direct configuration setting to undo fog tinting. However, you can drop in a config file that basically sets it back to the default color (#C0D8FF). Drop the following file into the minecraftinstance/config/dsurround/configs/dsurround folder and do a /dsreload if in game or just restart your client. This Json will be consumed when DS loads its various json configurations and create a new biome rule for setting the fog.

biomes.json

For information on the json schema can be found here if you are interested: https://dynamic-surroundings.readthedocs.io/en/latest/schemas/biomes.html

commented

I am making a change for the next drop. Going to use the biome fog config setting to enable/disable fog tinting so that an external config file would not have to be used to manage the fog tint.

commented

Perfect! Many thanks.

commented

Pushed 0.4.2 to CurseForge and Modrinth.