The Orbiter texture-tree tools project - or OT3 for short - is inspired by the release of Orbiter 2016, discussions about texture-tree manipulation during the RC-phase and an early addon request.
The idea is to extent Orbiter's /Utils/ toolset with useful programs to inspect and/or manipulate the new texture and elevation file formats. These programs should eventually be released as open-source software.
My idea is to create small programs that can be joined together to create a full-featured work-environment, similar to the Unix mindset:
) into /Utils/ folder.
From the usage text:
As of now, you can use this to:
Point 2 does the same to the water-mask layer, piping to the file "mask.txt".
Point 3 takes the files from surf.txt and integrates them back into the texture tree (-i). Point 4 does the same for the water-mask files.
So far I've tried that with Edwards, Vandenberg, Ascension and CSSC successfully. The results are certainly not perfect, but you can get a pretty good starting point for further development with it.
A last note: if you use old base configuration files in Orbiter 2016 with converted tiles by treeman, you might have to remove the SURFACE_TILES section from the base config in order to see the converted textures. In addition, you should have the "Try cache first, then archive" setting in the "Visualisation parameters->Planet rendering options" dialog set, which should be there by default.
The idea is to extent Orbiter's /Utils/ toolset with useful programs to inspect and/or manipulate the new texture and elevation file formats. These programs should eventually be released as open-source software.
My idea is to create small programs that can be joined together to create a full-featured work-environment, similar to the Unix mindset:
- archive tree manager (treeman) as CLI tool, making it possible to selectively manage texture-tree archives and/or caches
- visual selection tool (treevis) as GUI tool, allowing users to visualize the various aspects of the new formats (textures, elevations, tree population, etc.), navigate through the tree(s), and select tiles for further processing
- elevation converter for 2D solutions (ele2png), creating compositions of texture and height-map in order to seamlessly edit both aspects in a graphics program, then converts it back to tile formats
- elevation converter for 3D solutions (ele23DS), creating terrain meshes from selected tiles to be edited in 3D programs, then converts meshes back to tiles
From the usage text:
Code:
treeman: Orbiter texture tree managing tool
Lists, extracts, or updates the files of a packed planet texture layer directory tree.
Usage: treeman <Planet-tree-root> <Layer> [<Actions> | <Options> | <Configs>]
<Planet-tree-root>:
Path to planet textures, e.g.
c:\Orbiter\Textures\Earth
<Layer>:
Surf surface layer tiles
Mask water mask and night light texture tiles
Cloud cloud tiles
Elev elevation tiles
Elev_mod elevation modification tiles
<Actions>:
-l (default) lists files included in the archive
-s prints a summary
-e extracts files into planet tree root
-i[res] integrates files in the planet tree root into low-level tiles
[res] is an optional single digit specifying the minimum tile resolution,
with 2^res meaning 0=1x1, 1=2x2, 3=4x4, 4=8x8, etc. - default is 0=1x1
supported layers: Surf, Mask, Cloud
note: file list (-F) is mandatory, only full pathes will be checked
-b <path\to\base\file> <path\to\textures>
converts old style base surface tiles into planet tree root
supported layers: Surf, Mask
-t <path\to\tex\file>
converts old style texture archives (*.tex) into planet tree root
supported layers: Surf, Mask, Cloud
<Options>:
-T <path> tree archive file - default is <Layer>.tree in <Planet-tree-root>\Archive
-I <rgx> file filter include regular expression - default is include all files
-X <rgx> file filter exclude regular expression - default is exclude no files
-F <path> file list - if defined, this list defines the base file set for actions
if no path is given, standard input is read until EOF
entries in the list are newline separated, can use '\' or '/' as
separator, and don't need to be full length (e.g. /04/000010 is valid)
padding whitespace and empty lines will be removed
-n dry run - all file writing actions will be skipped
-v increase verbosity level (-vvv supported)
-w run stop-watch for timing information
-y acknowledge all questions positively
-y0 acknowledge all questions negatively
<Configs>:
--texconv <path> path to texconv.exe DDS conversion tool - if not present,
DDS files in the wrong format will be skipped - defaults to
'texconv.exe', which will start the bundled version.
- list the files in a *.tree archive,
- extract files by specifying regular expressions and/or file lists,
- print a summary on the contents of the archive (also use -v option to get more details),
- import old-style *.tex files into the cache (currently only up to old level 5),
- import old-style base tiles into the cache,
- integrate high-res tiles into lower levels to have seamless experience (only non-elevation tiles for now)
- print difference between archive and cache as status list,
- update files from cache into archive selectively,
- merge archives,
- import full-scale old-style textures,
- support integration of elevation tiles
- treeman ..\Textures\Earth Surf -b <path_to_base_config> <path_to_textures_dir> -y > surf.txt
- treeman ..\Textures\Earth Mask -b <path_to_base_config> <path_to_textures_dir> -y > mask.txt
- treeman ..\Textures\Earth Surf -i -F surf.txt
- treeman ..\Textures\Earth Mask -i -F mask.txt
Point 2 does the same to the water-mask layer, piping to the file "mask.txt".
Point 3 takes the files from surf.txt and integrates them back into the texture tree (-i). Point 4 does the same for the water-mask files.
So far I've tried that with Edwards, Vandenberg, Ascension and CSSC successfully. The results are certainly not perfect, but you can get a pretty good starting point for further development with it.
A last note: if you use old base configuration files in Orbiter 2016 with converted tiles by treeman, you might have to remove the SURFACE_TILES section from the base config in order to see the converted textures. In addition, you should have the "Try cache first, then archive" setting in the "Visualisation parameters->Planet rendering options" dialog set, which should be there by default.