A question of terrain

Discuss Daggerfall Unity and Daggerfall Tools for Unity.
User avatar
jayhova
Posts: 924
Joined: Wed Jul 19, 2017 7:54 pm
Contact:

A question of terrain

Post by jayhova »

I know the subject has been raised before but I was never very clear on the answer. Is correcting terrain to match classic on the roadmap? It became very obvious to me that there was a large difference in terrain between classic and DFU when I compared the walk between Privateers Hold and Gothway Garden. In DFU to get to GG, you must trek up a very large hill that does not exist in classic.

The reason this is of some importance is that mods that require that terrain be consistent would have to change to match if the terrain changed. In particular any road or river mod.
Remember always 'What would Julian Do?'.

User avatar
Jay_H
Posts: 4062
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: A question of terrain

Post by Jay_H »

It was decided very early that DFU was going to use Daggerfall's unused heightmaps. I don't know of any reason why DFU would become a flat world like classic was. A mod could accomplish that, but I've only heard overwhelming praise for DFU's terrain from new players.

User avatar
DigitalMonk
Posts: 111
Joined: Sun Nov 10, 2019 8:01 pm

Re: A question of terrain

Post by DigitalMonk »

I vaguely remembered classic DF being astoundingly boring to walk across, but didn't have enough experience to comment...

I'm also rather curious about terrain issues in general. My understanding was that DFU used the heightfield data from the DF files, and then might apply some scaling and some subsampling/noise addition through the terrain sampler for flavor (because the heightfield data is pretty low resolution, I think). So I would have expected the general shape of landscape to be consistent, though comparative heights might differ, and small features might differ.

But then I got curious about "Distant Terrain" vs "Mountains and Hills" vs "mod-less DFU" because I was wandering around at the edge of the Wrothgarian mountains, and the three seemed to give me very different results. To be fair, however, I was partway through the experimentation before I realized that when I loaded my file, my facing got reset to North, so I wasn't looking where I thought I was looking. So it is entirely possible that they're fairly consistent and I just confused myself.

With each load, I got the "terrain sampler changed, relocating player", which isn't too surprising. Other times that I've swapped out, though, my save was inside a town and the relocation moved me outside town, which always surprises me. I would have expected that the only relocation needed would be a vertical one to match the new effective heightfield. Do cities move horizontally based on local terrain features? If so, then yeah, the player needs to be moved outside the city for safety.

I still can't decide which terrain I want to use. Distant Terrain was giving me impossibly spiky terrain, but it was at least mountainous and different from the plains (although zone loading was ridiculously obvious, and the terrain it showed in the distance was significantly different than the terrain I eventually got to walk on -- ie, a HUGE cliff just eroded with each successive load zone until it was just gone). Mountains and Hills and mod-less DFU both have smoother, prettier landscapes, but everything seems very similar. Deep in the mountain, I wouldn't expect to see rolling grasslands that just happen to be at such a high altitude that birds keep flying into the ground. I would be interested in other opinions about the available terrain interpreters (but don't want to hijack the thread...)

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

Re: A question of terrain

Post by Interkarma »

Daggerfall Unity uses the classic terrain heightmap from game data. The irony here is that classic does not use its own heightmap in any meaningful way.

Terrain is available to mod system and there are already multiple mods that change terrain processing. If somebody wants to create a mod to output the flat and occasionally angular terrain from classic, they certainly have the means to do so.

Any serious attempt at rivers and roads would also use a custom terrain processor. Rivers don't just sit on top of the terrain, they carve it away. Roads might grade and flatten the surface. And this mod can't rely on a consistent terrain in any other situation, as user might change their processor at any time. Anyone with a lick of engineering nouse will create a bespoke terrain processor to fit hand-in-glove with roads and rivers generation. Only then will they have the control and consistency necessary.

Jeoshua
Posts: 153
Joined: Tue Nov 26, 2019 7:25 am

Re: A question of terrain

Post by Jeoshua »

I am making a serious attempt at a high resolution terrain replacement right. I am also adding rivers. IK you're dead on about rivers carving into and influencing the terrain. The thing is I think any serious attempt at rivers is going to have to treat the terrain as part of it, as any realistic simulation of erosion is going to be too slow for runtime, and you're not going to be able to get rivers placed in the world realistically without having a custom terrain as a part of it because of that.

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

Re: A question of terrain

Post by Interkarma »

Indeed, that's another advantage of using a custom terrain sampler. You can generate the terrain heightmap offline using whatever process works best for erosion, etc. then sample the new heightmap in later. There's no need to do this work at runtime as a secondary (and expensive) process.

User avatar
jayhova
Posts: 924
Joined: Wed Jul 19, 2017 7:54 pm
Contact:

Re: A question of terrain

Post by jayhova »

To a great extent terrain, as it exists, must be taken into account before these sorts of mods are implemented. Rivers do carve out their own path to some extent but they have to follow a path first. Roads also must take terrain into consideration in order to deal with problems like the ruling grade. Of course, they would then have to modify that terrain to make it appropriate.

As a person living on the Texas gulf coast, I am very familiar with coastal plains where you need to be more than 100 miles from the shore to see any hills at all. It seems strange to see these large hills next to a large bay. Maybe it would not seem odd if I was in Norway but coastal plains seem to be the rule and not the exception. I'm kinda curious where the terrain data for classic came from if not from the heightmap. I'm also curious as to why the terrain was as it was in classic and why it was done that way.
Remember always 'What would Julian Do?'.

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

Re: A question of terrain

Post by Interkarma »

jayhova wrote: Fri Jan 03, 2020 11:30 am To a great extent terrain, as it exists, must be taken into account before these sorts of mods are implemented.
...
Of course, they would then have to modify that terrain to make it appropriate.
I'm not sure you quite get it yet - by implementing a custom terrain sampler, a mod has full and complete control over both terrain and roads/rivers. The mod will know everything about the terrain because it's also generating that terrain. This system is very flexible and could use data from anywhere: precomputed or realtime, classic or custom. You could create a custom terrain sampler to set Daggerfall on Mars if you wanted to.

We don't need to change terrain in the base game to support rivers and roads, modders already have this facility at their disposal.

jayhova wrote: Fri Jan 03, 2020 11:30 am I'm kinda curious where the terrain data for classic came from if not from the heightmap. I'm also curious as to why the terrain was as it was in classic and why it was done that way.
Both classic and DFU use the exact same heightmap data. However, classic has a less sophisticated terrain engine and can only produce very basic angular shapes. Procedurally generating smooth transitions and finer details at runtime takes a lot of CPU time that most consumer PCs of the day simply did not possess.

I understand Daggerfall originally planned to use a more sophisticated plasma terrain setup (I'm assuming diamond-square), but this was either cut or scaled back during development. Daggerfall terrain is known to produce horizontal and vertical creases that is an artifact of older diamond-square implementations, so it could be they still ended up using a cut-down variant of this algorithm. The 5000x2500 map in WOODS.WLD is actually a 1000x500 array of 5x5 cells, which also resembles diamond-square data. Julian Jensen says he used plasma fractals in his Reddit AMA. So if not diamond-square, it's going to be something very similar.

At the end of the day, classic Daggerfall's angular terrain really isn't something worth reproducing. But it would be fairly trivial to do so via mod if someone wanted to.

Lokkrin Zhataros
Posts: 256
Joined: Thu Nov 21, 2019 9:27 pm

-

Post by Lokkrin Zhataros »

-
Last edited by Lokkrin Zhataros on Wed May 26, 2021 3:33 am, edited 2 times in total.

Jeoshua
Posts: 153
Joined: Tue Nov 26, 2019 7:25 am

Re: A question of terrain

Post by Jeoshua »

Interkarma wrote: Fri Jan 03, 2020 10:35 pm We don't need to change terrain in the base game to support rivers and roads, modders already have this facility at their disposal.
Actually, in the latest release its not something we can do quite yet. I was going to wait until I had something finalized to say something about it, but while we do have the ability to replace the TerrainSampler at runtime in a mod, we don't have the ability to replace TerrainTexturing in any way. Hazelnut and BadLuckBurt do have a branch have been toying around with that does add this, but vanilla DFU doesn't. We still need the ability to set tiles before we can make surface water.

Post Reply