[Idea] The elephant in the room: rivers.

Talk about the mods you'd like to see in Daggerfall Unity. Give mod creators some ideas!
Jarlyjarljarl
Posts: 64
Joined: Sat Aug 01, 2020 6:37 am

Re: [Idea] The elephant in the room: rivers.

Post by Jarlyjarljarl »

The mod author of Eroded and Enhanced Terrain created his mod with a realistic terrain generator and this came with a rivers map that would work with his mod, provided someone used that map to actually make rivers (which is beyond his skillset).

Mod is here:
http://forums.dfworkshop.net/viewtopic.php?t=4431

The rivers map is here:
Https://m.imgur.com/rNFn6Zl

User avatar
Daniel87
Posts: 391
Joined: Thu Nov 28, 2019 6:25 pm

Re: [Idea] The elephant in the room: rivers.

Post by Daniel87 »

luccas. wrote: Fri Mar 26, 2021 10:51 am I feel like most people who've played Daggerfall have noticed this: why there are no rivers? Where are all the lakes? I was really excited when the roads mod was released, but there is still something missing. The map as is still feels quite barren without rivers/bodies of water, so a mod for it would be appreciated. I am already creating another mod, but I still have no clue how to change the game's map so drastically so as to add them, but everything is possible in Unity. Either way, a mod like that would definitely make the game feel more complete and feel 'just right'.
You can just take Interesting Terrain. It has the best height maps from all mods and is on GitHub, so it will be easy to add your algorithm for rivers into the mix. Then just reexport as a different mod and ask the original creator if he is fine with it and for sure add that this is his mod and you just added a little somthing. I then can add water plants to my Wilderness Overhaul mod and Real Grass will also shine like a jewel with its beautiful water plants.
It will blow you away, I promise.

So my offer: You give me rivers, I give you a beautiful landscape with real forests + rivers :D

Image
Image
Image
In Julianos we Trust.

User avatar
Daniel87
Posts: 391
Joined: Thu Nov 28, 2019 6:25 pm

Re: [Idea] The elephant in the room: rivers.

Post by Daniel87 »

l3lessed wrote: Mon Mar 29, 2021 10:59 pm I think Daniel could shed some light on this and how it works in terrain generation. From his post though, it seems water can be generated above a set water level. It would make sense to me, water is merely a tile right now and nothing else. I imagine the water level setting was put in to ensure water always generated at sea level because they didn't have time/resources to develop a more intricate water generation system that didn't look wonky as hell on original DF release. So, force all water to spawn at set sea level and avoid all the wonky generation issues and mounds of code to work around it.

If I'm understanding the below post correctly, Daniel has already made water spawn on top of hill sides and mountains.

Code: Select all

I got around to write a small function that checks the terrain of desert climates for local minima in the heightmap before tiling the ground with water.
This way I can make sure that an Oasis will only spawn at the locally lowest point in the terrain and not at a hill side or mountain top. Yay!
If that is the case, could some one take his work from there, and get rivers to spawn from water/lakes created on mountain tops and large hills using terrain generation data to find the lowest points from said water source and laydown water from there keeping it searching and dropping the water on the next lowest point until a river was formed? The other issue is, how will the river know where to dump into? tribitary system are actually very complicated with many smaller sources leading into the rivers and streams we know before they go into the ocean.
Yes, basically what I did was to compare neighbouring tiles by their height in a 4x4 grid or 5x5 grid and find the lowest point. If there was one, this tile will get water asigned as tile type.

The terrain texturing later does the rest.

There might be cases, where there already are rivers in the terrain (by example Interesting Terrain, which I will recommend to use in conjunction with my mod) and where an algorithm just needs to check for the lowest point, paint it as water, take the next neighbour with lowest altitude, paint it water, etc.

I will give this a quick shot now and let you know what I came up with.
In Julianos we Trust.

hfc2x
Posts: 25
Joined: Mon May 03, 2021 3:57 am

Re: [Idea] The elephant in the room: rivers.

Post by hfc2x »

Daniel87 wrote: Sat May 01, 2021 5:25 pm You can just take Interesting Terrain. It has the best height maps from all mods and is on GitHub, so it will be easy to add your algorithm for rivers into the mix.
Daniel87 wrote: Sat May 01, 2021 5:29 pm Yes, basically what I did was to compare neighbouring tiles by their height in a 4x4 grid or 5x5 grid and find the lowest point. If there was one, this tile will get water asigned as tile type.

The terrain texturing later does the rest.

There might be cases, where there already are rivers in the terrain (by example Interesting Terrain, which I will recommend to use in conjunction with my mod) and where an algorithm just needs to check for the lowest point, paint it as water, take the next neighbour with lowest altitude, paint it water, etc.

I will give this a quick shot now and let you know what I came up with.
I'd recommend using this mod then: Interesting Eroded Terrains.

It's basically a merger of Interesting Terrains plus Enhanced and Eroded Terrains, and adds partial compatibility with Basic Roads. Although this version of the mod has the problem that some of the lakes become colossal craters that are filled with water only at the bottom. I realized it's because it changes some of the altitudes of Interesting Terrains to be way higher to match the geographical map, whereas Interesting Terrains takes the compromise by lowering said locations to sea-level in order to be able to have lakes (places high up in the Wrothgarian Mountains, for example, which should not be sea-level). From what I understand, it sounds like your method would allow mods like this one to have actual, proper lakes at the intended high altitudes?

User avatar
Daniel87
Posts: 391
Joined: Thu Nov 28, 2019 6:25 pm

Re: [Idea] The elephant in the room: rivers.

Post by Daniel87 »

hfc2x wrote: Mon May 17, 2021 7:24 pm
Daniel87 wrote: Sat May 01, 2021 5:25 pm You can just take Interesting Terrain. It has the best height maps from all mods and is on GitHub, so it will be easy to add your algorithm for rivers into the mix.
Daniel87 wrote: Sat May 01, 2021 5:29 pm Yes, basically what I did was to compare neighbouring tiles by their height in a 4x4 grid or 5x5 grid and find the lowest point. If there was one, this tile will get water asigned as tile type.

The terrain texturing later does the rest.

There might be cases, where there already are rivers in the terrain (by example Interesting Terrain, which I will recommend to use in conjunction with my mod) and where an algorithm just needs to check for the lowest point, paint it as water, take the next neighbour with lowest altitude, paint it water, etc.

I will give this a quick shot now and let you know what I came up with.
I'd recommend using this mod then: Interesting Eroded Terrains.

It's basically a merger of Interesting Terrains plus Enhanced and Eroded Terrains, and adds partial compatibility with Basic Roads. Although this version of the mod has the problem that some of the lakes become colossal craters that are filled with water only at the bottom. I realized it's because it changes some of the altitudes of Interesting Terrains to be way higher to match the geographical map, whereas Interesting Terrains takes the compromise by lowering said locations to sea-level in order to be able to have lakes (places high up in the Wrothgarian Mountains, for example, which should not be sea-level). From what I understand, it sounds like your method would allow mods like this one to have actual, proper lakes at the intended high altitudes?
Yeah, my method could work in these cases, not sure though, as it could also cover some edge cases in water.
A better approach would be (since the lakes are not that numerous in DFU) to artificially flatten their lake bed perfectly horizontal and having a script texture these surfaces with water specifically only for certain MapPixels.
This is something that should be done ideally AFTER all other major changes to the mod are done, as it otherwise would mean to do the work twice.

Let me know, when the Mod is more or less completed and I will help with that code.
In Julianos we Trust.

hfc2x
Posts: 25
Joined: Mon May 03, 2021 3:57 am

Re: [Idea] The elephant in the room: rivers.

Post by hfc2x »

Lol I'm dumb. I didn't notice you were already using that version of the mod anyways, since you've been commenting on the thread. :lol:

Anyways, I think flattening the terrain, and using the same texture (and properties) as puddles would be the best approach for lakes, since they work the most "like water", unlike the ocean. This meaning that you submerge partially in them, and they drain your stamina. Is there any limitation to the size puddles have to be?

l3lessed
Posts: 1400
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: [Idea] The elephant in the room: rivers.

Post by l3lessed »

How hard would it be to lower the terrain further and make the water tile an alpha layer to allow for the player to actually go below the water line? Could this be done on a second pass, after the original water tiles are placed?
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.

Post Reply