OreCruncher / BetterRain

Based on the BetterRain mod from Wirsbo
20 stars 12 forks source link

[Request] Configurable Biome Fog Fade-in/out duration #82

Closed Ariannae closed 8 years ago

Ariannae commented 8 years ago

Similar to the issue I had with Desert storms a while back, where they would transition extremely quickly, where it made for a somewhat jarring transition. I'd love to see a configuration added to change up how long the biome fog takes to settle in. Ie, instead of going from a Swamp -> River -> Swamp and having the fog quickly change upon each transition, I'd like to see the fog take a longer time to dissipate, as well as a longer time to come back to full strength. Hopefully that makes sense.

OreCruncher commented 8 years ago

It does. I have noticed the same thing. I haven't thought up a good way to handle. It's like there needs to be a delay going up or down in fog intensity in the case of crossing several biomes quickly.

EDIT: I could change the fog delta factor to be less, which would require more time to fade in/out. But then when a player leaves a foggy situation they may want to clear quickly.

EDIT2: Also, not sure if you noticed but the fog color transition time works out to be different from the fog density transition time. I need to work out the math to make it that any color transition is scaled to the fog density transition so it blends better.

Ariannae commented 8 years ago

Now, I'm not entirely sure here, and it could also be due to other mods I'm using (Realistic Terrain Generation), but BoP's Ominous Woods biome seemed to have its biome fog get stronger the further into the biome you were. So if you were on the outskirts of the biome, the fog would barely be noticeable. Walk a few blocks into the biome, and the fog really started to pick up. Perhaps using that sort of method would work better than using a timer-based system? Kind of like how you have Elevation haze set up, but on an X/Z axis instead, dependent on biome, maybe?

OreCruncher commented 8 years ago

I looked at how BoP does the fog and it does take an interesting approach. Problem is that it can be intensive - it surveys the area around the player and makes several calculations as to what it wants to do for fog. I am still studying how they did it to get ideas on how I can improve the fog I have.

The other challenge with mods that try to control fog is that they are doing it independent of each other and could wind up in a fog tug of war. I have to ask the BoP guys if they are willing to make further changes to the 1.7.10 code base for fog so we can get a better experience.

Ariannae commented 8 years ago

Actually, and this is a tad bit off topic for this request, but would it be possible to have the sounds based off of a similar system, assuming you find a way to implement it in a less intensive manner? This would alleviate the other issue I had where biome transitions could result in abrupt changes in sound. If you manage to implement a system similar to BoP's fog setup, and have the sound's volume use the similar/same system, it should also result in extremely smooth transitions. Ie, on the outskirts of a Jungle, you would hear the wildlife sounds at a low volume/barely audible, and as you get further inside the sound gets louder up to its current volume. It might help with Issue #86 as well.

OreCruncher commented 8 years ago

It would be possible to do it with sounds. Simplistically the way it would work:

I would have to think on this. It would be more expensive computationally not to mention would increase the load on the sound system. For players with more current sound cards it shouldn't be too much a problem, but for those playing on a "potato" it would be a challenge.

EDIT: I am going to break the sound one out into a separate item. I want to do some tinkering on it.

OreCruncher commented 8 years ago

I have the fog working in a similar fashion to the sound mentioned above. Details:

The net effect is that fog transition actually starts outside of the applicable biomes, and don't reach full intensity until the players is fully within. This causes a blending of fog effects at biome borders. The algorithm also takes into account fog due to desert sandstorms.

OreCruncher commented 8 years ago

Posted *.0.5.0BETA to CurseForge with this fog transition change. Let me know what you think.

Ariannae commented 8 years ago

Way, way better transitions than before, awesome work. It flows far better from biome to biome.