A question of terrain

Discuss Daggerfall Unity and Daggerfall Tools for Unity.
User avatar
BadLuckBurt
Posts: 557
Joined: Sun Nov 05, 2017 8:30 pm

Re: A question of terrain

Post by BadLuckBurt » Thu Jan 09, 2020 5:17 pm

Interkarma wrote:
Mon Jan 06, 2020 10:34 pm
Correct, I'm using the original unmodified heightmap directly from the game files as input, and I am trying to show the terrain as I understand it was originally intended. Obviously some creative license is still required in the technical execution of this, but I looked at a any pre-release screenshots I could find and did the best I could with the data present. Old screenshots like the below were my guide.

What actually took place during my development process is a far cry from what jayhova seems to believe. This was all done in a very thoughtful manner to not only recreate Daggerfall, but to give some sense of what classic Daggerfall could have been using nothing but the data available in the game files and more modern methods.

The overall fidelity of the terrain in the game files is much higher than apparent in classic. And both comments from developers and early screenshots show that terrain was also intended to be more detailed. While I probably didn't get things exactly right, I did the best I could with what I had on the table.
You've done a magnificent job with the terrain tbh, I probably spent more time with that code than other modders and everything you need to make the terrain more diverse is there already. All I did was add different noise functions and some logic to generate different kinds of terrain based on climate, most of the other code was left untouched.

If I had to make one observation it's that the high and low noise settings for the micro detail in the default terrain sampler are way too conservative and hardly make a dent in the terrain. That's actually what got me started on this, I changed the scale values for fun and saw angular bumpy terrain appear. After that I just follow the rabbit down the hole :lol:

I hope to put out my version in the first quarter of this year once I'm satisfied with the different terrain types it can create and I have a decent grasp on how to present settings to users, noise gets complicated real quick :lol: Once those settings are in, users will be able to set up the terrains more to their personal preference so they can get as close to the original DF experience as they want to, you could even make the world completely flat if you wanted to.

I don't think people even realise that Daggerfall's heightmap is not like a traditional one and that even when sampling the large 5000x2500 version, you're still left generating terrain heights in 160x160meter chunks to go beyond the originals resolution. Anyone who loads up either heightmap in a 3d terrain editor / viewer can see that the height differences are far from spectacular in the original versions so the devs probably intended to do what DFU does as well: generate the extra detail at runtime using algorithms.

Biggest mystery to me when it comes to the originals data is the white pixel which Hazelnut and I call Mount Phallus in the southwest of Tigonus. I wonder if it's a trick used to push the rest of the terrain down as the other highest point sits around 92. That's less than half of Mt. Phallus' 255
Daggerfall Unity on UESP: https://en.uesp.net/w/index.php?title=T ... fall_Unity
Daggerfall Unity on Nexus Mods: https://www.nexusmods.com/daggerfallunity
My github repositories with mostly DFU related stuff: https://github.com/BadLuckBurt

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

Re: A question of terrain

Post by DigitalMonk » Thu Jan 09, 2020 5:35 pm

BadLuckBurt wrote:
Thu Jan 09, 2020 5:17 pm
Biggest mystery to me when it comes to the originals data is the white pixel which Hazelnut and I call Mount Phallus in the southwest of Tigonus. I wonder if it's a trick used to push the rest of the terrain down as the other highest point sits around 92. That's less than half of Mt. Phallus' 255
Any chance that was supposed to be a hell pit with a height of -128? Just wondering, 'coz the in-game map has a single pixel of water right next to Mt. Phallus (which, if the in-game map has an off-by-one error as suggested elsewhere, might be supposed to correspond to a ridiculously deep hole)

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

Re: A question of terrain

Post by Lokkrin Zhataros » Thu Jan 09, 2020 5:36 pm

I recently found this Reddit post from the old, now dead, DaggerXL project. It has an interesting rendering of the terrain for sure. Maybe a bit too bumpy. ;)

https://www.reddit.com/r/Daggerfall/com ... r_terrain/

User avatar
pango
Posts: 2460
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: A question of terrain

Post by pango » Thu Jan 09, 2020 5:48 pm

DigitalMonk wrote:
Thu Jan 09, 2020 5:35 pm
Any chance that was supposed to be a hell pit with a height of -128? Just wondering, 'coz the in-game map has a single pixel of water right next to Mt. Phallus (which, if the in-game map has an off-by-one error as suggested elsewhere, might be supposed to correspond to a ridiculously deep hole)
And if the heightmap is an array of signed values, signed bytes more precisely, 255 is the representation of -1 (in 2's complement representation). So basically a non-event, maybe a small underflow while generating or painting the heightmap...
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

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

Re: A question of terrain

Post by BadLuckBurt » Thu Jan 09, 2020 6:12 pm

DigitalMonk wrote:
Thu Jan 09, 2020 5:35 pm
Any chance that was supposed to be a hell pit with a height of -128? Just wondering, 'coz the in-game map has a single pixel of water right next to Mt. Phallus (which, if the in-game map has an off-by-one error as suggested elsewhere, might be supposed to correspond to a ridiculously deep hole)
pango wrote:
Thu Jan 09, 2020 5:48 pm
And if the heightmap is an array of signed values, signed bytes more precisely, 255 is the representation of -1 (in 2's complement representation). So basically a non-event, maybe a small underflow while generating or painting the heightmap...
Ah yeah, I went skydiving in that lake when my terrain sampler still honoured the Mt. Phallus height, I've since removed it since that entire area is swamp but I'll make it part of the lake as you suggest as that is probably what it's supposed to be, never occurred to me :D

The heightmap is a greyscale image ranging from 0-255. The western sea part of the map is the lowest at elevation 0. The coastlines are all at elevation 2. It's most likely an underflow like Pango suggests, I don't know what software they used to make it but I doubt it was done by hand.
Lokkrin Zhataros wrote:
Thu Jan 09, 2020 5:36 pm
I recently found this Reddit post from the old, now dead, DaggerXL project. It has an interesting rendering of the terrain for sure. Maybe a bit too bumpy. ;)

https://www.reddit.com/r/Daggerfall/com ... r_terrain/
I was watching this a few weeks ago and thought it was funny how this was super-impressive when I first saw it but that DFU has surpassed this by far now. The terrain itself looks quite nice but way too modern for Daggerfall in my opinion, I bet the world would look a bit off if the flats and textures were all in. The smaller details close to the ground remind me of Outterra, a program that models the entire earth using DEM satellite imagery and algorithms for finer detail.

And if you think that's bumpy, this is what Zadroter did while testing my sampler :lol:

https://streamable.com/4p45t

Also why a configurable terrain sampler is needed I think, everyone has different tastes.
Daggerfall Unity on UESP: https://en.uesp.net/w/index.php?title=T ... fall_Unity
Daggerfall Unity on Nexus Mods: https://www.nexusmods.com/daggerfallunity
My github repositories with mostly DFU related stuff: https://github.com/BadLuckBurt

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

Re: A question of terrain

Post by DigitalMonk » Thu Jan 09, 2020 6:50 pm

pango wrote:
Thu Jan 09, 2020 5:48 pm
And if the heightmap is an array of signed values, signed bytes more precisely, 255 is the representation of -1 (in 2's complement representation). So basically a non-event, maybe a small underflow while generating or painting the heightmap...
Yeah... Realized I'd had a brain-fart as I was driving away from my keyboard towards lunch. Don't have my forum login credentials on my phone though.

Gotta admit, I sort of like Mt. Phallus... Some weird stuff at the top. And going off the edge is, um, exciting.

I actually like the extra noise from the DaggerXL version (a link for anyone else like me who is blocked from reddit: https://www.youtube.com/watch?v=NwTWrdB6vIU). Works quite nicely for the sand. Kinda crap for grasslands, hills, swamps, etc. And not actually jagged enough for rocky mountainous terrain. So, while I like the idea of subdividing the noise down to fine details, it would take some tweaking to get the noise frequency and amplitude to look sane...

Thoughts:
  • Sand can have higher frequency noise (small particles making little dunes) but not as much amplitude (yes, dunes can get quite tall, but that's already handled by the larger scale of the heightmap -- we're talking about small scale stuff, and sand generally won't stack up really steep)
  • Grass and hills should have much lower frequency "rolling" noise. Amplitude can vary -- possibly scaled with local heightmap gradient? That would mean that if the heightmap was flat, the local noise wouldn't force hills into it, but if the heightmap already had a large hill, the local noise could provide some bumps along the way.
  • Rocks and mountains kind of need two noise functions. One has low frequency but large amplitude, for medium scale features jutting up out of the ground. The other has high frequency but small amplitude, for the gravel scattered around as the larger features weather down. Both noise functions should be present and simply added together in mountains. Flatter rocky areas maybe only have the gravel function. I suppose the "jutting features" amplitude could be scaled with heightmap gradient like the hills, so that cliffs have crazy jaggies, but rocky beaches are still pretty smooth.
  • Not that familiar with swamps personally, but seems like they should be low frequency and extremely low amplitude...
  • Structured noise generators (I'm familiar with Perlin) generally have "octaves", where each octave is characterized by a base frequency and amplitude range. I've only talked about 1 or 2 octaves for each of the above. More varied results can be achieved by adding additional octaves.

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

Re: A question of terrain

Post by Lokkrin Zhataros » Thu Jan 09, 2020 7:23 pm

BadLuckBurt wrote:
Thu Jan 09, 2020 6:12 pm
And if you think that's bumpy, this is what Zadroter did while testing my sampler :lol:

https://streamable.com/4p45t
Lol, that level of exaggerated terrain is a bit too much for me. Would make me kinda dizzy. :o

Speaking of dizzy. I just went to that tall mountain that everyone has been talking about. It's ridiculously tall and the sides are too steep to walk/run so the only way to get to the top is to levitate. On the top it's just normal terrain with tree/plant flats. In a way it would be kinda cool to have a house to live in up there, a secret mountain home. ;)

Edit: Reworded my comment below so not taken out of context. :roll:

I'm kinda curious of why the original developers thought it was a good idea to put this tall of a mountain in such an obscure place.
20200109120238_1.jpg
20200109120238_1.jpg (48.59 KiB) Viewed 328 times
20200109120614_1.jpg
20200109120614_1.jpg (48.38 KiB) Viewed 328 times

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

Re: A question of terrain

Post by BadLuckBurt » Thu Jan 09, 2020 11:50 pm

Lokkrin Zhataros wrote:
Thu Jan 09, 2020 7:23 pm
Lol, that level of exaggerated terrain is a bit too much for me. Would make me kinda dizzy. :o

Speaking of dizzy. I just went to that tall mountain that everyone has been talking about. It's ridiculously tall and the sides are too steep to walk/run so the only way to get to the top is to levitate. On the top it's just normal terrain with tree/plant flats. In a way it would be kinda cool to have a house to live in up there, a secret mountain home. ;)

Edit: Reworded my comment below so not taken out of context. :roll:

I'm kinda curious of why the original developers thought it was a good idea to put this tall of a mountain in such an obscure place.
I like it toned down a bit myself but with the settings exposed, everyone can find their own or copy other peoples.

And that isn't even the full height of the mountain. I think all the samplers except mine cap the terrain around 1500 units, a bit more. This monstrosity reaches up to the 2500s if you let it :D

It's possible to put a location up there since it's a map pixel but also highly impractical except for the morning dive in the lake :)
Daggerfall Unity on UESP: https://en.uesp.net/w/index.php?title=T ... fall_Unity
Daggerfall Unity on Nexus Mods: https://www.nexusmods.com/daggerfallunity
My github repositories with mostly DFU related stuff: https://github.com/BadLuckBurt

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

Re: A question of terrain

Post by jayhova » Mon Jan 13, 2020 11:23 pm

Lokkrin Zhataros wrote:
Sat Jan 04, 2020 3:18 am
jayhova wrote:
Fri Jan 03, 2020 11:30 am
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.
Maybe I'm misunderstanding the context of this statement, but there are many examples of large hills and cliffs right next to the ocean and bays just in America alone. The Pacific coast is a good example, Oregon coast specifically. Many hills and cliffs that some gradually slope down to beach areas while others are right next to the water. There are places in Europe (you mentioned Norway) and South America that sometimes have much more exaggerated terrain with tall mountains right next to the ocean. Large hills, mountains or cliffs right next to the coast or bay is very realistic and fairly common throughout the world. That area around Privateers Hold and Gothway Garden is realistic. Of course, this is a fictional fantasy game world we are talking about here so "realistic" is subjective.
There are in fact many examples of these sorts of things. The west coast (I was in Oregon this summer visiting a friend) has a mountain range that goes right up to the sea. This is of course What happens when mountain ranges do this. Two plates are colliding together. However, over the entire gulf coast of the U.S., this does not happen at all. So where there are plates coming together you will get hills and mountains but in the U.S. from east Texas to Florida there are no examples of hills near the coast. This is caused by millions of years of erosion and shifting seas because mountains wear down over time and new ones must be brought up by shifting geology. The presence of an ocean means frequent rains and that causes erosion.
Remember always 'What would Julian Do?'.
Windows 10 Pro 64 bit. DFU Ver. Alpha 0.10.7

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

Re: A question of terrain

Post by Lokkrin Zhataros » Tue Jan 14, 2020 3:16 am

--My original post was argumentative, a bit less than civil, and unnecessary. My apologies for my behavior.

Post Reply