terrain question

I just replied in the Yahoo list, but I try not to do a simple copy / paste. :wink:

In my opinion World Machine now does the terrain output correctly, no bug, no issue. Just in another way how we experienced it before in older WM versions. Following the terrain specification, it now does use the full 16 bit. So, I am in doubt if an optional checkbox is a good idea. It would mean a loss of accuracy.

So, letā€™s have a look how the height values are calculated. First important value is Base Height. Second is Height Scale. Following a row of many 16 bit values. Example:

Base Height = 100 (terrain units, not meters)
Height Scale = 30
ā€œManyā€ 16 bit integers: Range from -32768 ā€¦ 32767

For those who are interested to analyze terrain file information, I recommend to download TerrainScout. No, this is not hidden advertisement. :wink:

When you open that terrain in Terragen, there will be shown a height range of 70 ā€¦ 130 ( = 100 - 30 ā€¦ 100 + 30). Terragen always finds a combination of Base Height and Height Scale, whereas World Machine always uses Base Height = 0. Thatā€™s the reason for the discussion here.

Btw, Terragen itself also uses negative values (try generate + canyonize), there is no rule that ā€œforbidsā€ that.

Apologies to Stephen, it was not my intention to cause such trouble. :wink:

  • Karsten

well, hmmm 3 days ago, my terrains didnt have any issues, and didnt have any loss of accuracy, and then stephen releases this version of WM with extra accuracyā€¦

thats all fine, but my terrains looked fine without the precision, so yes, an optional check box is still a good idea, its not like the terrains were in absolute need of this extra bit of precision, or matt and stephen would have been using this information years ago.

It may not be visible at once - but one more used ā€œbitā€ (=1/8 byte) means a doubled accuracy.
Still I believe, if it is possible to set the terrain height in tg it is also possible to automatically set it in wm.

Time for WM v1.251 :twisted: - just kidding. Every day I find more wishes from users, that have been fulfilled in 1.25 :smiley: Even ā€œmyā€ bugs :mrgreen:

:smiley: Well I only just noticed the negative values last night. I personally am more than delighted to have this extra option available to me in Terragen. Thanks Stephen excellent. :smiley:

but, you see thats the catch, its not an option, currently its mandatory.

You can easily avoid the ā€œproblemā€ by clamping your result from 0.5 to 1.
The terrain will have the height set in WM and begin at 0m.

There shouldnā€™t be much loss of precision, because wm is working with 32bit. By clamping as described, you reduce it to 31bit which is still more than necessary, because a .ter file canā€™t have more than 16bit anyway.

(does this calculation make sense?)

I must be missing something here. So what is the problem with negative terrains? You mean to say that no terrain should ever be below sea level?

Although I do agree that this should be optional or at least made consistent with previous WM versions, Iā€™d like again to make it clear that the full 16 bit range was always supported by TG, and TGā€™s native terrains have always (as far as I know) occupied this full range. This is not ā€œextraā€ precision. It is in fact World Machine finally becoming fully compliant with the .ter file specification. The only reason it is strange is actually because of the way the .ter format is constructed, using signed values, with the full 16 bit range from -32767 to +32676 (or therabouts), rather than 0 to 65535.

I believe it can be corrected for by WM itself and the behavior should be made consistent with previous versions in the next WM update, but only for compatibility and consistency reasons. I donā€™t think thereā€™s a real reason that this is a problem aside from user expectation. If no previous WM version had existed to define an expected behavior, this would not be a big deal. After all TG itself tends to create negative values with its own terrain generation in many cases.

  • Oshyan

So 90% of every terrain I make is below water level. And this is some how a good thing? I know itā€™s an easy fix, but why should I have to?
Iā€™m sorry, but itā€™s a bit agrivating to make a terrain in WM thatā€™s 0 to 5000m, then open it in TG to have a terrain thatā€™s -3500 to 1500m. So Iā€™m right back to what I was doing with the old WM, readjusting terrain hights in TG.

Yeah, thatā€™s good for the fish and other submarin wildlife.

At least until the next version of WM is released, you will have to either clamp your terrain as described, or adjust it in TG.