-
Notifications
You must be signed in to change notification settings - Fork 20
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
Gh 47 More Leaves when Raining #49
base: main
Are you sure you want to change the base?
Conversation
Adding ability for wind strength to affect the spawn rate of leaves. Weather events in Wind can now also affect spawn rate in a compounded fashion.
Need to make sure no funny business happens with bad user input.
eclipse support
Adding ability for wind strength to affect the spawn rate of leaves. Weather events in Wind can now also affect spawn rate in a compounded fashion. Signed-off-by: Cameron Hetzler <[email protected]>
Need to make sure no funny business happens with bad user input. Signed-off-by: Cameron Hetzler <[email protected]>
eclipse support Signed-off-by: Cameron Hetzler <[email protected]>
…ngleaves into gh-47_more-leaves
Hm... I'm not yet sure if this is a good idea, at least the implementation leaves a lot to be desired. First of all, it seems very confusing to have both Since the two wind states Then there's another big issue: From a quick look at the numbers, this PR would immediately bump leaf spawn rates by 10-40% in calm conditions and up to 480-880%(!) under extreme conditions, which is... just a tiny little bit too much. Then finally: All in all, I'm still pondering if the idea of "More leaves when wind" is actually good - it probably is! I'm afraid I can't accept this PR as-is and I'd rather implement the suggested changes myself (since it requires a lot of finetuning and probably some new formulas). Though I shouldn't have the final word on this, so @BrekiTomasson @RandomMcSomethin please, if you got some comments as well! |
Yeah, I can agree that my naming is messy and I didn't really put much thought behind the actual rates that were created. The amplitude of the foliage was really not "tuned" in any real sense of the term, but instead just based off what I thought looked right at the time, nothing correctly done, but it got the point across I think in a first attempt.
So as of now, there is a coefficient affected by the level of wind and will rise as the "WIND" increases. (CALM, WINDY, STORMY) So that's one. The other is almost based on the state of rain, but I see what you mean. The second is currently based on this mod's interpretation of "weather" and not the worlds actual state of "isRaining". This could be changed and have the coefficient now read as You said that you may want to do this yourself, but I may go ahead out of boredom and redo this pull request with what you suggested and try to clean it up more. I'd be looking to:
|
…ounding. Wind is now heavily weighted around a multiplier of 1. To turn off with effect, set to 0. To turn off rain effect, set to 1.
@Fourmisain in this update, I've changed the "weather" variable to a more specific "rain" float multiplier with 2.0f being the default. For the wind coefficient, I tried to make it less impactful by squeezing any possible range from 0.87->1.67. These numbers are obtained from using the default "1.0f" weight for the wind. Typical wind speeds are around .3, but go as low as 0.05 and as high as 1.1. Take X as wind speed and Y being the coefficient: Please, let me know what you think of this :) |
I like the idea of this PR as well, wind should definitely affect the rate of leaves falling. Rain, however; not so much. However, as @Fourmisain already said, multipliers scale hard, so it's going to be a lot of trial and error to get the numbers just right. |
I quickly scanned over the changes and it looks a lot better already.
This also reminds me of the "double autumn" issue: We might need to rethink the way spawn rates are combined (e.g. by adding instead of multiplying) or add some sort of soft bound to the spawn rates or number of leaves - it's really not clear how exactly everything should look. I don't expect this to get into a release version soon... 😅 |
If that PR was merged it would be cool as hell. |
Added options for Wind and Weather to affect leaf spawn rate.