Discussion area flattening experiment - SUCCESS

4throck

Enthusiast !
Joined
Jun 19, 2008
Messages
3,502
Reaction score
1,008
Points
153
Location
Lisbon
Website
orbiterspaceport.blogspot.com
I'd like to see this feature available on the current client versions. It's very useful, specially for small areas where you just want to place a mesh (AMSO rocks) or a landing pad.
Much easier to do it with a config file than doing permanent changes to the tile tree.
Any reason why it was dropped / not included in D3D9?
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,390
Reaction score
577
Points
153
Location
Vienna
While the visual part of it is standard code, the collision part is a hooking of Orbiter's internals, and can therefore be considered a hack. I guess this is the reason why the code was never included in D3D9.
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,390
Reaction score
577
Points
153
Location
Vienna
It is not my decision to make.

I have presented the code and a binary already, but I can't put it into the D3D9 repository, because I don't have commit access there.
There is nothing more to do with the code, besides maybe a more robust parser. I guess the only thing making it not worthy is the use of assembler in it to hook the Orbiter function doing the collision work. Can't change that without help from Martin, though (i.e. API extension).

The whole thing was meant as a demonstrator to show the concept. The concept is shown, the demonstrator works as good as it gets, so now it is in the hands of others to incorporate it in their work. Or not...
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,390
Reaction score
577
Points
153
Location
Vienna
No, you had to do everything manually. Not only code, the whole projects were deleted, so you also had to manually transfer tickets and whatnot. It was an absolute asshole move of them, so I decided not to use their service anymore. If I want to use git with a big company behind it, I can always use github, right?

EDIT: Look, no auto-censor anymore. Hehe.
 

acsheehy

New member
Joined
Aug 14, 2020
Messages
3
Reaction score
3
Points
3
Location
London
I realised that I was not using the new Mars textures properly. The adjustment to level 16 makes it much more obvious. Now, I thought about it and this is probably cheeky, but I made a depression so that I could expose one of the underground avenues... There's two flattens here, one for the Square with the swimming pool, and the other to make a depression...
 

Attachments

  • Avenues.png
    Avenues.png
    642.6 KB · Views: 41

igel

Addon Developer
Joined
Mar 28, 2008
Messages
252
Reaction score
119
Points
43
Website
www.pin-plus.ca
Using the new feature for base flattening works like a charm, thanks!
However, when I tried to experiment with trenches and wells, I hit several problems.
I use the following record (on Baikonur, near Site 70):

Rect 300 63.0962397 46.0351904 600 500 0 1

When Orbiter puts a hill in these coordinates, and I place a vessel on top of the hill, vessel's coordinates are different:

POS 63.1054616 46.0437039

I suspect my other "flattened" bases are also mismatched - I had to increase radius for the flattening more that I thought would be needed - probably their centres are quite offset.

But second problem is even bigger. Even with dropoff 1, the inclines of the hills (I moved to hills from wells for experimenting, as they are easier to see) are still really shallow - did not get anything sharper than ~45 degrees. For my purposes, I need them - the closer to verticals, the better. Well, correction: I finally did manage to get sharper angles - by elevating the hill to the very impractical several kilometers... leading to the next problem:

Finally, the killer: I could not get hill size parameter smaller than 600 by 500 meters. Even 500 by 500 is just ignored. And the shape of the base of the hill is... well, kinda approximate - and HUGE! For launch pad trenches, the needed precision is down to meters, but, more importantly, size should also be down to meters: silo well is only about 10 meter in diameter (and 40-50 meters deep).

I don't know... I see screenshots of some quite sharp and small dugouts in this thread... I noticed they all seem to be on Moon and Mars. Is it maybe the Earth model being more complex, and getting in the way? I understand that I probably trying to use the feature for what it was not intended for. But for these types of launch facilities on Baikonur, flattening the area is only the "invitation to negotiations": the next "must" step is to prevent flame trenches and silos from "filling with the earth" as surface elevation is loaded...
 

GLS

Well-known member
Orbiter Contributor
Addon Developer
Joined
Mar 22, 2008
Messages
5,870
Reaction score
2,867
Points
188
Website
github.com
I don't think it is possible to dig a well with (perfectly) vertical walls, as planetary surfaces are meshes so you will always have some sort of slope.

The best way to shape the terrain into what you want (within the limits) is Martin's tileedit tool: https://github.com/mschweiger/orbiter-tileedit
The limits are elevation tile (horizontal) resolution level... and I'm not sure how vertical resolution is controlled.
You can increase horizontal resolution by adding higher resolution level tiles (until level 19)... but I'm not sure how to add new tiles. ?‍♂️
Anyway, tileedit allows you to move individual surface points up and down, and that might be enough for your needs.
 

igel

Addon Developer
Joined
Mar 28, 2008
Messages
252
Reaction score
119
Points
43
Website
www.pin-plus.ca
Will this approach force users of my addons to always use fixed level 19 surface?
 

Face

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 18, 2008
Messages
4,390
Reaction score
577
Points
153
Location
Vienna
I understand that I probably trying to use the feature for what it was not intended for. But for these types of launch facilities on Baikonur, flattening the area is only the "invitation to negotiations": the next "must" step is to prevent flame trenches and silos from "filling with the earth" as surface elevation is loaded...

I agree. The flattening feature is just that: something to easily flatten the terrain that is already there. If this terrain is low-res, of course the flattening is also low-res. It is certainly not a terrain definition language.

If your addon needs high-res terrain, you have to author this outside of the scope of the flattening feature. I.e. you have to use tileedit or similar tools to create it, then create a concept how you can distribute it.
Perhaps there is a tool that automatically extrapolates high-res tiles from given low-res areas. With that, you could just "blow-up" the area you have in resolution, then use the flattening feature to define finer terrain features. The new tree format is there to allow high-res in only certain areas, so there is no need to force users to fixed level 19 global surface.
 

4throck

Enthusiast !
Joined
Jun 19, 2008
Messages
3,502
Reaction score
1,008
Points
153
Location
Lisbon
Website
orbiterspaceport.blogspot.com
You can flatten a large area to create the bottom of the trench (low area).
Then add meshes on top to create trench walls, the elevated pad and the surrounding terrain, much like it was done in 2010.
A textured mesh will be of much higher resolution than LV19 terrain, so that's the way to go :)
 

barrygolden

Well-known member
Joined
Nov 3, 2009
Messages
936
Reaction score
291
Points
78
Location
North of Houston
Hey any of you guys looking at Jesero Crater. The mars rover landing not far off and issues with the LZ's for Artemis as well
 

4throck

Enthusiast !
Joined
Jun 19, 2008
Messages
3,502
Reaction score
1,008
Points
153
Location
Lisbon
Website
orbiterspaceport.blogspot.com
Adding to the previous suggestion.
When you place structures over terrain that can't be changed (or has low resolution), you draw what's called a skirt.

Here's an example from back in the day, when you could add buildings to Google Earth:
96d018b2-f5db-4696-8f68-b4723c65333d

Notice the garden/roads around the building, on the left you can see they are actually part of the model.
On this photo the terrain is slopped, but the principle is the same if it was flat.
 

jacquesmomo

Addon Developer
Addon Developer
Joined
Jun 14, 2008
Messages
611
Reaction score
449
Points
78
Location
FRANCE
Website
francophone.dansteph.com
Hello

I have just, thanks to BrianJ and 4throck, discovered and learned this new possibility of flattening a zone, much more easily than with tileedit and the "elv_mod" files. :hailprobe:

I tested this functionality in an area of french Guyana (small village called "Saul") that I am doing (future add-on "Guyane airports")

The area at the origin:

01.jpg

there is a bump (red arrow)

02.jpg

And here is what it gives with the "flt" file:

With Rect 2400 -53.203940 +3.61535 1000 1000 45 50

03.jpg
:p
With ELLIPSE 2400 -53.203940 +3.61535 1000 1000 45 50

04.jpg
:ROFLMAO:
With ELLIPSE 0 -53.203940 +3.61535 1000 1000 45 50

05.jpg

Now I will do something more suitable ...:sneaky:

And a big thank you to Fred18 and Face !!!! :salute::cheers::hailprobe:
 

N_Molson

Addon Developer
Addon Developer
Donator
Joined
Mar 5, 2010
Messages
9,271
Reaction score
3,244
Points
203
Location
Toulouse
there is a bump (red arrow)

It looks very realistic for a tropical forest airstrip, no problem at all for light aviation, remember than in real life runways don't have to be perfectly flat. Birmingham, UK, is quite famous for being bumpy, and this is a runway used by jets such as 737s :

12oe4.jpg
 

4throck

Enthusiast !
Joined
Jun 19, 2008
Messages
3,502
Reaction score
1,008
Points
153
Location
Lisbon
Website
orbiterspaceport.blogspot.com
You can check terrain elevation on Google Earth (for Windows), in case you doubt Orbiter's values. Google Earth should be more accurate.
For the Saul runway, Google Earth's profile shows a more or less constant slope from 204 to 229 meters.
1620205084198.png

I guess Orbiter's bump is because of insufficient terrain resolution, but represents the correct altitude increase. As long as the airplane is able to takeoff and land, no problem.
But if it crashes then simply flatten the area to the average altitude of 217m
 
Top