Orbiter-Forum  

Go Back   Orbiter-Forum > Orbiter Addons > Addon Development
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Addon Development Developers post news, updates, & discussions here about your projects in development.

Reply
 
Thread Tools
Old 04-25-2017, 07:48 AM   #196
GLS
Addon Developer
 
GLS's Avatar
Default

Quote:
Originally Posted by Face View Post
 Thanks for the report, I'll take a look. I guess it has something to do with error accumulation due to automatic range adjustment in combination with the 16-bit LUT for 8-bit RGBs.
In the meantime - if you need the functionality - you can use the "-r0" option to disable this dynamic range adjustment, or use "-g" to switch to 16-bit grayscale. This should make the round-trip work again.
I thought of the -r0 last night in bed, but didn't get back up to try it. I'll try it now, thanks!

Quote:
Originally Posted by Face View Post
 Just a quick question: treeman doesn't show me tiles at 15/000628/.* for the stock elevation archive on Earth, so could you tell me what package you've got them from? I guess it is the high-res pack at that region.
It comes from a ~15GB archive... which was downloaded from somewhere.
GLS is online now   Reply With Quote
Old 04-25-2017, 07:55 AM   #197
Face
Beta Tester
 
Face's Avatar

Default

Quote:
Originally Posted by GLS View Post
 It comes from a ~15GB archive... which was downloaded from somewhere.
Could you please extract the tile in question afresh (e.g. via treeman) and send it to me?
Face is offline   Reply With Quote
Old 04-25-2017, 08:02 AM   #198
GLS
Addon Developer
 
GLS's Avatar
Default

Quote:
Originally Posted by Face View Post
 Could you please extract the tile in question afresh (e.g. via treeman) and send it to me?
Here you go.
Attached Files
File Type: zip 000675.zip (17.2 KB, 9 views)
GLS is online now   Reply With Quote
Thanked by:
Old 04-25-2017, 08:15 AM   #199
Face
Beta Tester
 
Face's Avatar

Default

Round-trip error on default setting confirmed. Round-trip on "-r0" works. "-g" works, too.

Will investigate!
Face is offline   Reply With Quote
Thanked by:
Old 04-25-2017, 08:15 AM   #200
GLS
Addon Developer
 
GLS's Avatar
Default

Yep, the -r0 does not produce "horns".
GLS is online now   Reply With Quote
Old 04-25-2017, 01:52 PM   #201
Face
Beta Tester
 
Face's Avatar

Default

Quick notice: my first guess of having to do with 16-bit LUT was wrong. The tile in question uses the 8-bit type for elevation data, and ele2png produces simple 10-bit LUT (the "standard" colormapping) for those tiles.

I think it can't be actual error accumulation either, because some data-points are completely wrong whereas others are simple off-by-one errors. Might be a systematical error that I never noticed due to mostly working with -16 type elevation data.

---------- Post added at 15:52 ---------- Previous post was at 13:00 ----------

Fixed the round-trip bug with type 8 elevation tiles: http://www.snoopie.at/face/beta/ot3.zip .
Face is offline   Reply With Quote
Thanked by:
Old 04-25-2017, 02:39 PM   #202
GLS
Addon Developer
 
GLS's Avatar
Default

Quote:
Originally Posted by Face View Post
 Quick notice: my first guess of having to do with 16-bit LUT was wrong. The tile in question uses the 8-bit type for elevation data, and ele2png produces simple 10-bit LUT (the "standard" colormapping) for those tiles.

I think it can't be actual error accumulation either, because some data-points are completely wrong whereas others are simple off-by-one errors. Might be a systematical error that I never noticed due to mostly working with -16 type elevation data.

---------- Post added at 15:52 ---------- Previous post was at 13:00 ----------

Fixed the round-trip bug with type 8 elevation tiles: http://www.snoopie.at/face/beta/ot3.zip .
Many thanks!
One question: you didn't implement the elevation tile integration to lower resolutions?
GLS is online now   Reply With Quote
Old 04-25-2017, 03:45 PM   #203
Face
Beta Tester
 
Face's Avatar

Default

Quote:
Originally Posted by GLS View Post
 One question: you didn't implement the elevation tile integration to lower resolutions?
Not yet, because the overlap makes it a bit complicated. If there is a need for that, I can look into it.
Face is offline   Reply With Quote
Old 04-25-2017, 04:15 PM   #204
GLS
Addon Developer
 
GLS's Avatar
Default

Quote:
Originally Posted by Face View Post
 Not yet, because the overlap makes it a bit complicated. If there is a need for that, I can look into it.
It would be a nice thing to have when 2 or more adjacent tiles are edited, because as we move away from them, the tile furthest away will "unload" first (i.e. load a lower level) and that will show a discontinuity in the elevation because that lower level tile isn't edited.
GLS is online now   Reply With Quote
Old 09-16-2017, 01:42 PM   #205
astrogull
Orbinaut
Default ELV Tile Splitter

Quote:
Originally Posted by GLS View Post
 It would be a nice thing to have when 2 or more adjacent tiles are edited, because as we move away from them, the tile furthest away will "unload" first (i.e. load a lower level) and that will show a discontinuity in the elevation because that lower level tile isn't edited.
Yesterday I published the addon Elv Tile Splitter, which solves most of the problems when making new elevation tiles and integrate them in the existing tiles. Scale, stitching, merge, split and also stitch the new tile to tiles of a lower level.(https://www.orbithangar.com/searchid.php?ID=7109)

Stitching to a lower level still is a problem, because, at least on my laptop and graphic card, Orbiter2016 generates new elevation points as soon as you insert a higher level elv tile, even more points then are available at the higher resolution level. You can check this with a treeman list of AntilopeValleyScn package and look for level gaps.

Of course one can allways resize the background tile, say 16 x for a level+4 increase to generate a map and split in into 256 tiles. That way the discontinuity is moved out of sight. This is at least some kind of a solution, but not a satisfying one.
astrogull is offline   Reply With Quote
Old 09-16-2017, 02:39 PM   #206
GLS
Addon Developer
 
GLS's Avatar
Default

Quote:
Originally Posted by astrogull View Post
 Yesterday I published the addon Elv Tile Splitter, which solves most of the problems when making new elevation tiles and integrate them in the existing tiles. Scale, stitching, merge, split and also stitch the new tile to tiles of a lower level.(https://www.orbithangar.com/searchid.php?ID=7109)

Stitching to a lower level still is a problem, because, at least on my laptop and graphic card, Orbiter2016 generates new elevation points as soon as you insert a higher level elv tile, even more points then are available at the higher resolution level. You can check this with a treeman list of AntilopeValleyScn package and look for level gaps.

Of course one can allways resize the background tile, say 16 x for a level+4 increase to generate a map and split in into 256 tiles. That way the discontinuity is moved out of sight. This is at least some kind of a solution, but not a satisfying one.
Right now I'm busy with other things, but when I get back to terrain editing I'll check this. Thanks!
GLS is online now   Reply With Quote
Old 09-16-2017, 04:21 PM   #207
Face
Beta Tester
 
Face's Avatar

Default

Quote:
Originally Posted by astrogull View Post
 Yesterday I published the addon Elv Tile Splitter, which solves most of the problems when making new elevation tiles and integrate them in the existing tiles.
Great work! It's nice to see that OT3 inspired people to work on the tree toolset.
Face is offline   Reply With Quote
Old 11-13-2017, 08:31 AM   #208
Face
Beta Tester
 
Face's Avatar

Default

There is a new version of treeman and ele2png in this updated OT3 package: http://www.snoopie.at/face/beta/ot3.zip .

Nothing big, just added the "Label" layer to treeman and a metadata file feature to ele2png.
With the later, the need for editors to preserve the PNG comment holding the metadata is gone. Now ele2png knows about 4 metadata modes, with the default one producing both comment and file on write, and reading comment first, then falling back to file if none is found. This solves the problem of lossy editors that drop the comment.
It also allows for external editing of the metadata. If you have data from external sources, you can create a metadata file with the following content:
Code:
vmin=<lowest> vmax=<highest> scale=<scale> offset=<offset> type=<type> padding=1x1 colormap=<colormap> smin=0 emin=0 smean=0 emean=0 smax=0 emax=0 latmin=0 latmax=0 lngmin=0 lngmax=0
Note that there is no newline at the end of the single line. Values in angle brackets should be filled according to the picture data, constant values should be left as they are. The min/max/mean are recalculated on import, the lat/lng don't matter to Orbiter as it seems from the OVP D3D7Client code base.
Meaning of the variables:
  • <lowest> is the height value that should be associated with the lowest color value. In grayscale that's black, in color it's deep blue.
  • <highest> is the height value that should be associated with the highest color value. In grayscale that's white, in color it's cyan.
  • <scale> is the multiplication factor to get to the meter unit. I.e. if you have value 1 here, the height values mentioned above are in meters. With the beta versions, Orbiter supports other scales than 1 now, so you can have e.g. 0.5 as value there to get half meters. A height value of e.g. 25 would then mean 12.5m .
  • <offset> is the height from mean planet radius that serves as zero-level for the tile data, unit in meters. So if you have a height value of e.g. 25 with scale 0.5 and offset -4, your absolute height from mean planet radius is 25x0.5+(-4)=8.5m .
  • <type> is the type of Orbiter tile that should be created. Currently only "-16" and "8" are supported, corresponding to signed 16-bit precision and unsigned 8-bit precision.
  • <colormap> denotes the color translation table that is taken into account when decoding 8-bit color PNG. Value "2" interprets the data with the OT3 look-up-table (LUT), which was invented to allow full 16-bit precision encoded in an 8-bit color PNG, and would hardly be found in external data sources. All other values will interpret data with a standard LUT ("HSV blue-cyan"). In addition, every 8-bit color import will also try to guess the value if it doesn't match the LUT according to trivial and single-channel grayscale mappings.
So let's say you have some external heightmap in grayscale, with lowest value -5 meter and highest value 2000m. You can then produce a metadata-file like so:
Code:
 vmin=-5 vmax=2000 scale=1 offset=0 type=-16 padding=1x1  colormap=0 smin=0 emin=0 smean=0 emean=0 smax=0 emax=0  latmin=0 latmax=0 lngmin=0 lngmax=0
Face is offline   Reply With Quote
Thanked by:
Old 06-05-2019, 02:02 PM   #209
Face
Beta Tester
 
Face's Avatar

Default

There is a new version of ele2png in this updated OT3 package: http://www.snoopie.at/face/beta/ot3.zip .

This is just an implementation of the changes discussed here: https://www.orbiter-forum.com/showth...3&postcount=51
  • The meta-data extension is now *.hdr .
  • For vmin and vmax values, floating point input is now tolerated, although truncated to integer internally. On save, these values are still serialized as integers.
  • The lat/lng min and max values are now serialized and interpreted as degrees, in contrast to the former radian representation. This might break backwards-compatibility, but only so with values that are never used in Orbiter, anyway. I.e. an old (unedited) PNG converted back to ELE with this new version might be binary different in the header part containing the lat/lng values, but it should work just fine.

Last edited by Face; 06-05-2019 at 02:05 PM.
Face is offline   Reply With Quote
Thanked by:
Reply

  Orbiter-Forum > Orbiter Addons > Addon Development


Thread Tools

Posting Rules
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


All times are GMT. The time now is 07:37 PM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.