New Release Terrain ToolKit

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,666
Reaction score
795
Points
128
I have finally got a Terrain ToolKit project into a condition that a beta can be released. Right now it can only import/export surface textures. Not nightlights or elevation.


To Export Data:

Place a vessel to export location on a surface, focus the camera into it so that you can see planets surface. Then use mouse to drag a yellow ractange around the area you want to export and click export button...


To Import Data:

Drag a yellow rectangle around the area where you want to import terrain and click "Import Image" button.

You can drag the colored balls around the surface with mouse to properly align the surface. If the yellow "Clip rectangle" is too small then you can click "ReSelect Clip Region" and make a bigger one.

If there is a known pixel location (x, y) and surface location (lng, lat) a Pin can be created by feeding the data into a Pin properties.

Use Transparency effect (Checkbox) to see both terrains at the same time to overlay them properly.

After the surface alignment and color adjustments are made, before the Bake, the clip rectangle should be re-adjusted to be within the surface area, The edge alpha fade feature only works at the clip boundries.

When selecting a clip rectangle, it's better to use as low level as possible this will reduse amount of unnessecary data.

"Log Level" value in a properties tells you what level the surface is good for, if the level is 16.7 as an example, you can choose the "Max Bake Level" to be either 16 or 17

Press "Bake" to create the tiles. They will be written in /TerrainToolBox/ folder in Orbiter Root.

Maximum import/export size depends on hardware and it's typically 8k or 16k pixels in width and height.

D3D9Client 4.1 rev. 1264 is required. Few days ago released 1263 won't work.
 

Attachments

  • Importing.jpg
    Importing.jpg
    364.5 KB · Views: 188
  • TerrainToolKit.zip
    43.4 KB · Views: 103
Last edited:

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,666
Reaction score
795
Points
128
Future Plans for the Program

If the program appears to be good enough then a future development could go in a following phases:

Phase 1.
Adding import/export support for nightlight and elevation

Phase 2.
Adding a support to import a Mesh placed on surface which would transform it to surface texture and elevation.

Phase 3.
Adding a support to Flatten, Raise, Lower, Smoothen terrain/elevation

Phase 4.
Microtexture build utility and Microtexture overhaul from D3D9. To support better 3D - microtextures those could include 3D rocks when viewed from upclose distance, farther away the rocks would be just surface normal maps.

Phase 5.
Ability to paint a localised terrain with mouse using different 3D paints (i.e. microtextures). There would be micro surface/texture overlay placed on a top of regular tile texture which would be painted by using SketchPad in real-time and compressed in real-time to DXT1 format for rendering. In theory the overlay could also include high resolution runway markers and paintings.
 

4throck

Enthusiast !
Joined
Jun 19, 2008
Messages
3,502
Reaction score
1,008
Points
153
Location
Lisbon
Website
orbiterspaceport.blogspot.com
From my quick initial tests I have to report that it works as intended :)
It's quite intuitive and results are good. :cheers:
Attaching a Apollo 11 landing site image.

- I'd say that terrain/nightlight is the next phase.
- Import from NASA image sources would also be interesting....

- Mesh » elevation would also be good. If you add elevation » mesh export, terrain editing is solved. One can do it on any 3D software.

- For Microtextures I'd use a "landclass" map. MS Flight Simulator used this approach ( https://www.scenerytech.com/products/landclass/images/mosaicdef.gif ).
The advantage is that it can be derived from geological mapping, slope maps, surface roughness maps, etc.
For example, here are rock amounts for each moon location ( https://sos.noaa.gov/datasets/moon-surface-roughness/ )

Just my 2cents...


Thanks again for this effort.
Looking forward to improve those Apollo landing sites ;)
 

Attachments

  • 0049.jpg
    0049.jpg
    117.9 KB · Views: 87
Last edited:

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,666
Reaction score
795
Points
128
For Microtextures I'd use a "landclass" map. MS Flight Simulator used this approach ( https://www.scenerytech.com/products/landclass/images/mosaicdef.gif ).
The advantage is that it can be derived from geological mapping, slope maps, surface roughness maps, etc.
For example, here are rock amounts for each moon location ( https://sos.noaa.gov/datasets/moon-surface-roughness/ )


Yes, something like that could work pretty well in a global scale.

---------- Post added at 22:20 ---------- Previous post was at 22:06 ----------

Import from NASA image sources would also be interesting....


Having a lot of data available would be useful. I haven't given any thought about it, How those sources could be accessed and how they are indexed ? If there is some kind of index text file that could be easily browsed and searched for a suitable data entries/images then it should be possible to do.


I once looked for a Martian surface elevetion and only piece of information there was for a data was a time index when the samples were taken. So, one would need to back-track the probes orbit to figure out the location where the probe was at that time. And that's a way too complicated but not impossible of course.
 
Last edited:

jalexb88

Addon Developer
Addon Developer
Joined
Aug 11, 2008
Messages
152
Reaction score
154
Points
43
Location
Canada
Thanks for this! Looking to improve some of the landing sites in NASSP. How do I open the user interface in-sim? I am using it with the latest D3D9 as indicated, activated the module and can use the mouse to highlight terrain segments (with the highlighted border) but I can not figure where to go from there and how to get the toolkit menu to appear.

Thanks
 

4throck

Enthusiast !
Joined
Jun 19, 2008
Messages
3,502
Reaction score
1,008
Points
153
Location
Lisbon
Website
orbiterspaceport.blogspot.com
Had the same problem and enabled gcGUI mode and GDI overlay in D3D9. Problem solved ;)

---------- Post added 28th Jan 2020 at 00:29 ---------- Previous post was 27th Jan 2020 at 23:43 ----------

How those sources could be accessed and how they are indexed ? If there is some kind of index text file that could be easily browsed and searched for a suitable data entries/images then it should be possible to do.


In the past you had this: https://astrogeology.usgs.gov/tools/map-a-planet-2 but now it requires a login...

It used to work by URL parameters, so in theory you could extract any area needed.
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,666
Reaction score
795
Points
128
How do you do that?


Open the Video Tab and then click "Advanced" button. You see "gcGUI Mode" in a middle of the left edge of the dialog. Switch it to "Default" or "Windowed". The later is probably more falimiar with what you have used to in Orbiter.

The "GDI Overlay" shouldn't have anything to do with this. It's a compatibility mode for an older addons those want to use GDI to render to Orbiter's main screen/HUD. I am not sure if anyone has actually tested it, if it works.
 

Wolf

Donator
Donator
Joined
Feb 10, 2008
Messages
1,091
Reaction score
11
Points
38
Location
Milan
Open the Video Tab and then click "Advanced" button. You see "gcGUI Mode" in a middle of the left edge of the dialog. Switch it to "Default" or "Windowed". The later is probably more falimiar with what you have used to in Orbiter.

The "GDI Overlay" shouldn't have anything to do with this. It's a compatibility mode for an older addons those want to use GDI to render to Orbiter's main screen/HUD. I am not sure if anyone has actually tested it, if it works.


Thanks Jarmonik. Is that a function available with the latest D3D9 rev.? I have no gcGUI Mode in the advanced tab (I have the old R3.8_beta)
 

Wolf

Donator
Donator
Joined
Feb 10, 2008
Messages
1,091
Reaction score
11
Points
38
Location
Milan
Latest DRD9 version installed.
I have a problem with the mouse use and the resolution of the selected area. I canot drag ther mouse to select any area I like, instead a pre determined area (yellow rectangle) shows and as I move the mouse around adjacent areas pop up...

I also cannot import hi-res images/texture (don't know how to properly setup the desired res level in the dialog window: let's say I want a L16 texture, what values do I need to put in the "selection level" and "Max bake level"?)
Clearly I am missing some major steps here.
Any help?

Thanks
 

4throck

Enthusiast !
Joined
Jun 19, 2008
Messages
3,502
Reaction score
1,008
Points
153
Location
Lisbon
Website
orbiterspaceport.blogspot.com
Latest DRD9 version installed.
I have a problem with the mouse use and the resolution of the selected area. I canot drag ther mouse to select any area I like, instead a pre determined area (yellow rectangle) shows and as I move the mouse around adjacent areas pop up...

Yes, that's how it's supposed to be. You can drag the mouse, it will select more adjacent areas. There's an option to select only existing tiles, or to break them down into smaller levels.

I also cannot import hi-res images/texture (don't know how to properly setup the desired res level in the dialog window: let's say I want a L16 texture, what values do I need to put in the "selection level" and "Max bake level"?)
Clearly I am missing some major steps here.
Any help?

Thanks

To import, first select the area you want to import to. Then load your image.
If you image doesn't cover the entire selected area, use the pins to adjust.
I think "max bake level" depends on the imported image resolution. Just select the highest value possible.
Press bake. It will save the surface textures into a folder. You then have to manually copy the textures into Moon\surf, for example.
 

Wolf

Donator
Donator
Joined
Feb 10, 2008
Messages
1,091
Reaction score
11
Points
38
Location
Milan
Thanks 4throck.
So let's say I created level16 textures around Zaragoza: in the Terrain toolbox now I have a Surf folder with several subfolders (10,11,12...16): I guess each number contains the corresponding level textures. Shall I copy and paste the new generated "16" folder (with all its subfolders) into the Textures/Earth/Surf/16 folder?
 

4throck

Enthusiast !
Joined
Jun 19, 2008
Messages
3,502
Reaction score
1,008
Points
153
Location
Lisbon
Website
orbiterspaceport.blogspot.com
You need to copy them all. Your LV16 changes will also be present on the lower levels.
This way you get a smooth transition to higher levels as you fly lower.
 

llarian

Well-known member
Joined
Apr 1, 2009
Messages
578
Reaction score
159
Points
58
Location
Ottawa
OK. So it's late at night when I am trying this. I put a ship where I want it, camera to exterior to see the surface. Select the module, and see a rather large yellow box. Mouse drag only permits me to access the tiles around it. So, to test, I hit the export texture button. Fine, where does the data go? I can't really see that it is doing anything at this point.

I must have missed something.

Editted:

Ok, played with the level selections and I finally get an output. Haven't had a chance with the import yet. Too late.
 
Last edited:

4throck

Enthusiast !
Joined
Jun 19, 2008
Messages
3,502
Reaction score
1,008
Points
153
Location
Lisbon
Website
orbiterspaceport.blogspot.com
The first post explains where the data goes.
Check Orbiter documentation about the surface tile system (PlanetTextures.PDF) for an explanation about about levels and tile trees.
 
Last edited:

Wolf

Donator
Donator
Joined
Feb 10, 2008
Messages
1,091
Reaction score
11
Points
38
Location
Milan
I manged to get some level 13 textures in ZAZ. I tried level 16 but the tool gave a max of 12.7
Does it mean the max res available for that area is 12.7?

Also I noticed that in the selected area the tiles boundaries are quite visible (seamlines clearly show). Is that normal?
 
Top