High Fidelity/Eroded Terrain

Discuss modding questions and implementation details.
User avatar
Nystul
Posts: 1501
Joined: Mon Mar 23, 2015 8:31 am

Re: High Fidelity/Eroded Terrain

Post by Nystul »

I know how to make the new heightmap work with the game and the distant terrain mod in theory but it is quite a bit of work.

As mentioned earlier it will use the heights for the gameworld but texturing will be the same as now. distant terrain resolution will still be 1000x500 and use the average height value for a map pixel from the detailed heights. It should look ok I think. Near terrain will use the full resolution of the height map.

One further thing is water regions. If they don't match exactly locations will end up in water. Furthermore lakes also have to be at sea level to get water texture. There is currently no possibility to "raise" the level of a lake

User avatar
Freak2121
Posts: 60
Joined: Fri Sep 08, 2017 6:14 am

Re: High Fidelity/Eroded Terrain

Post by Freak2121 »

Nystul wrote:One further thing is water regions. If they don't match exactly locations will end up in water. Furthermore lakes also have to be at sea level to get water texture. There is currently no possibility to "raise" the level of a lake
I'm afraid that would just make the landscapes look like the surface of the moon and look completely out of place. I was hoping maybe it would be possible to have a separate map that defines the locations of lakes, which is something I can provide.

In regards to it being a lot of work, there's no rush, man. It's your choice, take it as easy as you can. :)

User avatar
Nystul
Posts: 1501
Joined: Mon Mar 23, 2015 8:31 am

Re: High Fidelity/Eroded Terrain

Post by Nystul »

A water map would be a thing but one would have to dig much deeper in code to make it work. Will take significantly longer to get this working

don't get me wrong - I also want to improve terrain as much as possible, but I am writing here of what I am capable of doing. Maybe there are people with more skill/time out there for whom it is just a piece of cake ;)

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

Re: High Fidelity/Eroded Terrain

Post by BadLuckBurt »

I have created three different versions of the noise map without the grid. They all yield something reminiscent of the vanilla Daggerfall terrain but I'm missing the local noise from the engine and the horizontal scale is 164 meters. Follow the link below to find the images and the equations I used.

https://imgur.com/a/WSALY

The two third origin | one third adjacent one seems to yield the best result but it's hard to judge in L3DT, the soldier figure it uses in the 3D view to give a sense of scale is tiny when I put the vertical range to 2048 meters.

I loaded the two third origin version into Photoshop and scaled it up to 10240x5120 while in 16-bit greyscale mode using the bl-linear smooth setting. Imported that into L3DT and it looks kinda nice, I wouldn't mind running around in this, the shots don't do it justice but still thought I'd share:

https://imgur.com/a/GFi3u

I did spot major issues in the swamp area but didn't take any screenshots of it. I was walking there today in vanilla Daggerfall and noticed a lot of square depressions and little to no elevation, scaling it up amplified those areas on my version and now it looks like an 8 bit map over there.

However, the noise in vanilla is definitely tied to the climate / ground textures so I'm going to adjust my script at some point to take those values into account. Right now, the noise is mostly going up in height.

Once I have sort of definitive version, I'm going to scale that up and use it as a base to try and make a replacement map

On a sidenote, I would love to plug this stuff into DF Unity to get a better sense of scale but I currently lack the knowledge and experience. I had a look at the source code for the terrain sampler and while I understand part of what I'm reading, I wouldn't know how to go about replacing it yet.
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

.

Spindle
Posts: 5
Joined: Fri Aug 03, 2018 11:18 am

Re: High Fidelity/Eroded Terrain

Post by Spindle »

Is there any progress with an improved altitude map? Is it possible to simply replace the original altitude map with a high resolution map, or can a "daggerfall unity" work only with the original elevation map?

User avatar
Interkarma
Posts: 7234
Joined: Sun Mar 22, 2015 1:51 am

Re: High Fidelity/Eroded Terrain

Post by Interkarma »

Spindle wrote: Mon Aug 20, 2018 6:11 pm Is there any progress with an improved altitude map? Is it possible to simply replace the original altitude map with a high resolution map, or can a "daggerfall unity" work only with the original elevation map?
Daggerfall Unity can use either the classic heightmap data or custom heightmap data by way of implementing ITerrainSampler. A couple of mods generate custom terrain data now: Uncanny_Valley's Mountains & Hills and Nystul's Distant Terrain.

You can use whatever heightmap data you like in the terrain sampler. Either purely procedural (e.g. basic Perlin noise) or fixed (e.g. part of the surface of Mars). I include a couple of examples in the code, along with the default terrain sampler. Daggerfall Unity will automatically handle stuff like flattening terrain for locations and managing shorelines.

The main challenges are maintaining a heightmap that both looks good and performs well, and is rational for gameplay purposes.

Spindle
Posts: 5
Joined: Fri Aug 03, 2018 11:18 am

Re: High Fidelity/Eroded Terrain

Post by Spindle »

Implementation of ITerrainSampler requires some knowledge in programming? It would be nice to have a lesson on its use, calculated for non-programmers.)

Now if I correctly understood the resolution of the original map of heights of 1000x500m and a pixel of 800m. If you simply replace the height map in the files of the original Daggerfall dos, let's say 8000x4000 adding details to it, will the area of 100m per pixel be displayed in "Daggerfall Unity"?

User avatar
Freak2121
Posts: 60
Joined: Fri Sep 08, 2017 6:14 am

Re: High Fidelity/Eroded Terrain

Post by Freak2121 »

I would be working on this and trying out different things, for example, a while back I hand-made a more detailed heightmap based off of the overworld map. I made mountains and valleys corresponding to those visible on the map to make the erosion more varied and interesting, though it can work on its own as well. But I know next to nothing about programming so despite having DFU running on Unity, I really don't even know where to begin or what I should even be doing to implement a custom heightmap. Maybe I'll go take programming lessons, but until then, this isn't going to go anywhere as the people who do know what to do are busy on way more important matters.

Narf the Mouse
Posts: 833
Joined: Mon Nov 30, 2015 6:32 pm

Re: High Fidelity/Eroded Terrain

Post by Narf the Mouse »

I would recommend holding off improvements to the terrain backend till at least Unity Engine 2018.3, if not 2019.1. 2018.3 includes four important terrain updates:

* GPU-instanced render path for terrain, yielding a dramatic reduction in draw calls for most cases.
* Auto-connect of adjacent terrain tiles.
* Seamless painting across multiple connected tiles
* An experimental C# API for building custom terrain tools, which can interact with newly introduced asset types for terrain materials and brushes.

#4, especially, would be something that DFU could leverage for its terrain generation. And if 2019.1 doesn't include terrain updates (it looks like they're still working on figuring out what to add to 2019.1, as there's only two items listed), I suspect the Unity Engine team would see a flood of complaints.

...Well, more than they already have on the terrain system.

Edit: On the upside, that is some major improvements to the terrain system. Finally.

https://unity3d.com/unity/roadmap
Previous experience tells me it's very easy to misunderstand the tone, intent, or meaning of what I've posted. If you have questions, ask.

Post Reply