Biome transitions

Discuss modding questions and implementation details.
Post Reply
User avatar
Daniel87
Posts: 391
Joined: Thu Nov 28, 2019 6:25 pm

Biome transitions

Post by Daniel87 »

Hi dear modders and devs,

While working on my Nature Overhaul I came across some pretty nasty edge cases, which I believe were not solved in the original Daggerfall but due to lower resolution, did not look too bad. Does anyone currently work on a mod to solve this visual issue? If not, I would give it a shot, if anyone with experience working with terrains and generating them, is willing to join or give me some hints where to start and how to go about it. I think it could be solved with little effort when checking for neighbouring MapPixels Climate and if it differs, using a second material (the ground material of the neighbouring MapPixel) and alphablending it slowly into the current MapPixels ground material or overlaying it while increasing alpha, maybe over 2 or 3 consecutive tile rows/columns.
Technically it should be possible but I have to start learning that aspect of DfU first, before I can start working on this. Anyone willing to join me in this endeavour? Let's maybe start with the most important part: Is the Terrain generation process currently modable? If yes, how would be the best approach to override the traditional generation process with an own one (which classes would I need to substitute)? Any help is much appreciated. Meanwhile I will continue with the vegetation redistribution. Let me know if anyone is interested in creating a fix for this edge case together.

Transition between mountain climate and desert climate:
Image

Border triangle between Desert/Subtropical/Mountain - While Subtropical and Mountain Climate blend into each other "more or less", desert doesn't blend in so well with the others.
Image
In Julianos we Trust.

User avatar
TheLacus
Posts: 1305
Joined: Wed Sep 14, 2016 6:22 pm

Re: Biome transitions

Post by TheLacus »

Daniel87 wrote: Tue Jan 26, 2021 9:09 am Is the Terrain generation process currently modable? If yes, how would be the best approach to override the traditional generation process with an own one (which classes would I need to substitute)? Any help is much appreciated. Meanwhile I will continue with the vegetation redistribution. Let me know if anyone is interested in creating a fix for this edge case together.
Hi. There is ITerrainSampler, ITerrainTexturing and i plan to add something like ITerrainMaterialProvider to better integrate this mod.

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

Re: Biome transitions

Post by Daniel87 »

That's awesome! That mod exactly does what I need! Wonderful. You got my endorsement! :D
In Julianos we Trust.

User avatar
Hazelnut
Posts: 3016
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Biome transitions

Post by Hazelnut »

I created a modification to the terrain system so that info about neighbouring map pixels was made available for the terrain gen code - it was for a terrain replacement BadLuckBurt was making. It worked but he stopped development so I never contributed it back into DFU... seemed superfluous if no one was going to need it. Can't recall exactly why he wanted it but it might have been for this exact reason. It was quite a while ago so it will need refreshing and retesting since DFU code has changed a bit since.

He did a lot of work on it, and might pick it up again. It may be worth collaborating.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

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

Re: Biome transitions

Post by Daniel87 »

Okay, I will definitely check this out. I think it is better if I first finish the vegetation of all biomes and call it a mod and leave this for an additional module. I think the atlas thing will pose the biggest challenge, so not sure if it is even possible the way I imagine. But so far I couldn't think of another way to blend two climates into each other. It works naturally pretty good already for terrains that share the same ground textures, but especially mountain and desert look pretty bad next to each other.
In Julianos we Trust.

User avatar
BadLuckBurt
Posts: 948
Joined: Sun Nov 05, 2017 8:30 pm

Re: Biome transitions

Post by BadLuckBurt »

Hazelnut wrote: Mon Feb 01, 2021 2:08 pm I created a modification to the terrain system so that info about neighbouring map pixels was made available for the terrain gen code - it was for a terrain replacement BadLuckBurt was making. It worked but he stopped development so I never contributed it back into DFU... seemed superfluous if no one was going to need it. Can't recall exactly why he wanted it but it might have been for this exact reason. It was quite a while ago so it will need refreshing and retesting since DFU code has changed a bit since.

He did a lot of work on it, and might pick it up again. It may be worth collaborating.
I used it for a nicer transition between climates height wise but I suppose the same principle applies to texturing. I haven't given up on the terrain stuff yet, it just needs more tweaks :D I've put all the changes and additions you made into my current test build but have less spare time to invest at the moment.

Still, I wouldn't mind collaborating, this stuff looks really promising going by what I've seen in the other thread.
DFU on UESP: https://en.uesp.net/w/index.php?title=T ... fall_Unity
DFU Nexus Mods: https://www.nexusmods.com/daggerfallunity
My github repositories with mostly DFU related stuff: https://github.com/BadLuckBurt

.

User avatar
Hazelnut
Posts: 3016
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Biome transitions

Post by Hazelnut »

Yeah they could dovetail very nicely, especially with your coastline changes. It's great to see a more realistic nature placement being worked on!
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

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

Re: Biome transitions

Post by Daniel87 »

Nice, I am always open for cooperation :)
I am a hobby coder, so don't expect my code to be... let's say clean. I will try to clean it up before I publish the mod and the code will also be open source. I just wanted to create the basics for a better nature. Always glad when someone picks up my mod and refines it to something shiny :)
In Julianos we Trust.

User avatar
BadLuckBurt
Posts: 948
Joined: Sun Nov 05, 2017 8:30 pm

Re: Biome transitions

Post by BadLuckBurt »

Daniel87 wrote: Mon Feb 01, 2021 3:02 pm Nice, I am always open for cooperation :)
I am a hobby coder, so don't expect my code to be... let's say clean. I will try to clean it up before I publish the mod and the code will also be open source. I just wanted to create the basics for a better nature. Always glad when someone picks up my mod and refines it to something shiny :)
My code in the terrain sampler I work on is still a mess so don't worry about cleaning up :D I'll grab the source from your mod once you put it up and integrate it into my test build. The only thing I'm not sure about yet is how to override the climate when drawing the ground tiles but will tackle that once I get there.
DFU on UESP: https://en.uesp.net/w/index.php?title=T ... fall_Unity
DFU Nexus Mods: https://www.nexusmods.com/daggerfallunity
My github repositories with mostly DFU related stuff: https://github.com/BadLuckBurt

.

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

Re: Biome transitions

Post by Daniel87 »

Yes, was thinking bout the same problem. When blending/fading from one gtound texture atlas to another within the same MapPixel, how that could be solved. I guess there can only be one ground texture atlas per climate.
In Julianos we Trust.

Post Reply