Wilderness Overhaul
- King of Worms
- Posts: 4753
- Joined: Mon Oct 17, 2016 11:18 pm
- Location: Scourg Barrow (CZ)
- Contact:
Re: Wilderness Overhaul
If that option is not hard to implement, Im all in. Otherwise, just set something you find good
There are fireflies (or flying insects specifically) in the "Real Grass" mod by The Lacus. I suggest in case you struggle with it, you can ask him on how he implemented it? Maybe it might help..
There are fireflies (or flying insects specifically) in the "Real Grass" mod by The Lacus. I suggest in case you struggle with it, you can ask him on how he implemented it? Maybe it might help..
DREAM Nexus https://www.nexusmods.com/users/73250038?tab=user+files
DREAM Forums viewtopic.php?f=27&t=1168
DISCORD: king_of_worms_cz
DREAM Forums viewtopic.php?f=27&t=1168
DISCORD: king_of_worms_cz
- Daniel87
- Posts: 391
- Joined: Thu Nov 28, 2019 6:25 pm
Re: Wilderness Overhaul
I just arrived back in the tea farm home stay from the mountains in Taiwan (Alishan) to check out how real fireflies in huge gatherings behave and look. Will definitely change the glowing pattern in my mod to reflect reality better. Their signaling is less like a sinus wave / pingpong and rather abrupt and has a higher frequency.
Spoiler!
In Julianos we Trust.
- Daniel87
- Posts: 391
- Joined: Thu Nov 28, 2019 6:25 pm
Re: Wilderness Overhaul
@ Real Grass mod: I would bet my left pinky thst he used a particle system at the player location and that is actually a good aproach for my fireflies as well and for other bugs. If I generate them in world space with a long lifetime, this could work pretty performant but their movement pattern would have to be less complex. Currently I am pushing them around via rigidbody addforce which creates a quite realistic looking flight pattern
In Julianos we Trust.
- King of Worms
- Posts: 4753
- Joined: Mon Oct 17, 2016 11:18 pm
- Location: Scourg Barrow (CZ)
- Contact:
Re: Wilderness Overhaul
I havent seen fireflyes for ages :X
The bugs in realgrass seem to be located in small swarms and in a sigle spot. Its not looking really realistic, thats for sure. Guess its a tradeoff for performance and ease of implementation
The bugs in realgrass seem to be located in small swarms and in a sigle spot. Its not looking really realistic, thats for sure. Guess its a tradeoff for performance and ease of implementation
DREAM Nexus https://www.nexusmods.com/users/73250038?tab=user+files
DREAM Forums viewtopic.php?f=27&t=1168
DISCORD: king_of_worms_cz
DREAM Forums viewtopic.php?f=27&t=1168
DISCORD: king_of_worms_cz
- Daniel87
- Posts: 391
- Joined: Thu Nov 28, 2019 6:25 pm
Re: Wilderness Overhaul
I have an idea how I could tackle the firefly performance issue.
To anybody reading this: Is there a universal time ticker running in DFU which I could access?
My idea is to spawn all firefly gameObjects into all MapPixel that are currently loaded, having their attached behaviour script passively active (not performing any intense calculations in update and not adding any force to their rigidbody for movement and having their sprite renderer disabled).
The only thing their update function then will do, is to check this universal timer and do every few seconds a calculation of their distance to the player.
Once the player is within reach, their whole update function is running with the before mentioned behaviour like AddForce, Mathf.PingPong for their material.textures alpha etc. Until the player is out of reach again, then a flag for their passive distance calculation is set so they go back to hibernation with an occasional "distance to player" check.
I would rather not run a vector3.distance calculation for thousands of fireflies every frame, so having a quick timer check before eventually doing the next distance calculation would be crucial to reduce impact on the CPU. Also I need to build in a random seed for this timer check so not all fireflies in all loaded MapPixel run the distance check at the same frame.
Any ideas or suggestions for already implemented functions I don't know about?
To anybody reading this: Is there a universal time ticker running in DFU which I could access?
My idea is to spawn all firefly gameObjects into all MapPixel that are currently loaded, having their attached behaviour script passively active (not performing any intense calculations in update and not adding any force to their rigidbody for movement and having their sprite renderer disabled).
The only thing their update function then will do, is to check this universal timer and do every few seconds a calculation of their distance to the player.
Once the player is within reach, their whole update function is running with the before mentioned behaviour like AddForce, Mathf.PingPong for their material.textures alpha etc. Until the player is out of reach again, then a flag for their passive distance calculation is set so they go back to hibernation with an occasional "distance to player" check.
I would rather not run a vector3.distance calculation for thousands of fireflies every frame, so having a quick timer check before eventually doing the next distance calculation would be crucial to reduce impact on the CPU. Also I need to build in a random seed for this timer check so not all fireflies in all loaded MapPixel run the distance check at the same frame.
Any ideas or suggestions for already implemented functions I don't know about?
In Julianos we Trust.
-
- Posts: 1403
- Joined: Mon Aug 12, 2019 4:32 pm
- Contact:
Re: Wilderness Overhaul
I had to find a timer that was decoupled from the engine and framerate to get smoothing to work properly and maintain original attack times.
Couldn't you use one of the built in unity timers as a universal time ticker. In my mod I used the fixed deltatimer, which always updates at the same time intervals no matter what. This timer is used for the engine physics, and decouples the timer output from the framerate to maintain proper physics calculations despite players framerate.
You could also used the fixedTime objects. You could subtract this from a fixedupdate to get amount of time passed since last check. This will record the amount of seconds since the game started using the fixedupdated to ensure it reads out proper elapsed time no matter framerate or game time changes.
Either way, you will want to used a fixed update method, so the time readout is universal no matter framerate or game time settings.
https://docs.unity3d.com/ScriptReference/Time.html
I also was able to at one point use the windows system timer using a c# library for my combat animations smoothing as a way to get a universal timer separate from the game and engine. I removed it, as this was another library layer, and I was able to move to the built in fixedtimer methods that is in the engine.
Couldn't you use one of the built in unity timers as a universal time ticker. In my mod I used the fixed deltatimer, which always updates at the same time intervals no matter what. This timer is used for the engine physics, and decouples the timer output from the framerate to maintain proper physics calculations despite players framerate.
You could also used the fixedTime objects. You could subtract this from a fixedupdate to get amount of time passed since last check. This will record the amount of seconds since the game started using the fixedupdated to ensure it reads out proper elapsed time no matter framerate or game time changes.
Either way, you will want to used a fixed update method, so the time readout is universal no matter framerate or game time settings.
https://docs.unity3d.com/ScriptReference/Time.html
I also was able to at one point use the windows system timer using a c# library for my combat animations smoothing as a way to get a universal timer separate from the game and engine. I removed it, as this was another library layer, and I was able to move to the built in fixedtimer methods that is in the engine.
My Daggerfall Mod Github: l3lessed DFU Mod Github
My Beth Mods: l3lessed Nexus Page
Daggerfall Unity mods: Combat Overhaul Mod
Enjoy the free work I'm doing? Consider lending your support.
My Beth Mods: l3lessed Nexus Page
Daggerfall Unity mods: Combat Overhaul Mod
Enjoy the free work I'm doing? Consider lending your support.
- Daniel87
- Posts: 391
- Joined: Thu Nov 28, 2019 6:25 pm
Re: Wilderness Overhaul
Smoll Update:
Project is still alive and kicking.
I had huge performance drops due to the way how I create and control the fireflies but thankfully I made big progress in reducing it by disabling all fireflies that are not in vicinity to the player. I will add an option where players can, depending on their PCs, adjust the range of firefly activation.
Additionally I took weather and season in consideration for fireflies as well as just the weather for shooting stars. (Would be weird seeing shooting stars in a thunder storm or clouded sky as well as fireflies in winter).
Does anyone have other ideas for immersion in the wilderness besides Shooting stars and fireflies? I know I am going a little overboard when not directly finishing a redistribution of billboards in all climate zones but rather adding additional stuff for immersion, but I have to admit, that it feels damn great to come across unexpected nature features when travelling the formerly bland and boring wilds of Daggerfall. Also I can reuse features such as the fireflies and shooting stars in many different climates (Bigger and more fireflies in Jungle, maybe frog and swamp sounds, fireflies at oasis in the desert, helping the player to see them from the distance at night - could be good with survival mods where you need that water desperately).
Project is still alive and kicking.
I had huge performance drops due to the way how I create and control the fireflies but thankfully I made big progress in reducing it by disabling all fireflies that are not in vicinity to the player. I will add an option where players can, depending on their PCs, adjust the range of firefly activation.
Additionally I took weather and season in consideration for fireflies as well as just the weather for shooting stars. (Would be weird seeing shooting stars in a thunder storm or clouded sky as well as fireflies in winter).
Does anyone have other ideas for immersion in the wilderness besides Shooting stars and fireflies? I know I am going a little overboard when not directly finishing a redistribution of billboards in all climate zones but rather adding additional stuff for immersion, but I have to admit, that it feels damn great to come across unexpected nature features when travelling the formerly bland and boring wilds of Daggerfall. Also I can reuse features such as the fireflies and shooting stars in many different climates (Bigger and more fireflies in Jungle, maybe frog and swamp sounds, fireflies at oasis in the desert, helping the player to see them from the distance at night - could be good with survival mods where you need that water desperately).
In Julianos we Trust.
-
- Posts: 9
- Joined: Fri Nov 08, 2019 9:42 pm
Re: Wilderness Overhaul
Not "wilderness" persay, but it would be realistic to have a region of farm land around settlements.
- Daniel87
- Posts: 391
- Joined: Thu Nov 28, 2019 6:25 pm
Re: Wilderness Overhaul
I was actually also playing with the idea, but couldn't come up with a good way of doing it.JaceyLessThan3 wrote: ↑Thu Apr 15, 2021 4:16 am Not "wilderness" persay, but it would be realistic to have a region of farm land around settlements.
At the point of time when texturing the terrain, the location data is not available, otherwise I could just check for the location rect size, where it is placed and then paint an area next to it with dirt texture to create a field. But then the next problem would be that I do not have any farm plants available when creating nature billboards as they are not part of the texture catalogue.
In Julianos we Trust.
- King of Worms
- Posts: 4753
- Joined: Mon Oct 17, 2016 11:18 pm
- Location: Scourg Barrow (CZ)
- Contact:
Re: Wilderness Overhaul
Well I had some immersion idea but its not particle based.
In desert, the hot shimmering air effect at the distance. I saw it in even some older games like Call of Juarez
In desert, the hot shimmering air effect at the distance. I saw it in even some older games like Call of Juarez
DREAM Nexus https://www.nexusmods.com/users/73250038?tab=user+files
DREAM Forums viewtopic.php?f=27&t=1168
DISCORD: king_of_worms_cz
DREAM Forums viewtopic.php?f=27&t=1168
DISCORD: king_of_worms_cz