Orbiter-Forum  

Go Back   Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter SDK
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Orbiter SDK Orbiter software developers post your questions and answers about the SDK, the API interface, LUA, meshing, etc.

Reply
 
Thread Tools
Old 04-17-2019, 01:48 PM   #61
gattispilot
Addon Developer
 
gattispilot's Avatar
Default

So not sure how I can test it? I saw the bitbucket. Is the dll made already?
gattispilot is offline   Reply With Quote
Old 04-17-2019, 02:42 PM   #62
Face
Beta Tester
 
Face's Avatar

Default

Quote:
Originally Posted by gattispilot View Post
 So not sure how I can test it? I saw the bitbucket. Is the dll made already?
What I proposed 2 days ago is not done yet (to my knowledge). But I'm close, I guess I can release a first cut tomorrow.
Face is offline   Reply With Quote
Thanked by:
Old 04-17-2019, 03:01 PM   #63
Donamy
Beta Tester


Default

Pardon my lack of knowledge, but does the moon have new texture mode ?
Donamy is offline   Reply With Quote
Old 04-17-2019, 08:24 PM   #64
Face
Beta Tester
 
Face's Avatar

Default

Quote:
Originally Posted by Donamy View Post
 Pardon my lack of knowledge, but does the moon have new texture mode ?
It is a configuration thing. If you have the following in the GBody config, you have the new mode:
Code:
TileFormat = 2
The stock moon configuration has this setting.

---------- Post added at 22:24 ---------- Previous post was at 17:11 ----------

I've finished implementing my proposal. Get the release build of the modded D3D9Client here: http://snoopie.at/face/beta/D3D9Client.dll

With this you can define *.flt files in /Textures/<planet>/Flat/ folders with the following (slightly changed) line definition:
Code:
ELLIPSE <height> <lng> <lat> <major> <minor> <phi> <falloff>
or
RECT <height> <lng> <lat> <length> <width> <phi> <falloff>
* <height> is in integer meter, supposedly w.r.t. mean sphere radius
* <lng> <lat> are double longitude and latitude coordinates, as defined in e.g. base configuration file
* <major> <minor> are ellipse major and minor radius in integer meter, <minor> defaults to <major> if not defined - the meter definition might not be exact, as it uses a decimal degree guess at the latitude circle
* <length> <width> are rectangle length and width in integer meter, <width> defaults to <length> if not defined - meter definition same as above
* <phi> is rotation angle in double degree from equator, with <major> and <length> being parallel to equator
* <falloff> is the integer percentage (e.g. 50 for 50%) of the shape radius where transparent merging with original height is done

Lines with comment start and/or too less arguments are ignored.

Get the full code at https://bitbucket.org/face/ovp/get/D3D9Client/2016.zip

Please let me know what you think about this concept.

Last edited by Face; 04-17-2019 at 09:33 PM. Reason: Clarified data types
Face is offline   Reply With Quote
Thanked by:
Old 04-17-2019, 08:30 PM   #65
fred18
Addon Developer

Default

Quote:
Originally Posted by Face View Post
 What I proposed 2 days ago is not done yet (to my knowledge). But I'm close, I guess I can release a first cut tomorrow.
i don't want to be any bottleneck here. I am about to leave with family for easter holidays and packing everything with 2 small daughters it's quite a challenge so I won't have much time available for about a week unfortunately.

Quote:
Originally Posted by Donamy View Post
 Pardon my lack of knowledge, but does the moon have new texture mode ?
I would sum up this saying that if they have mountains and are not flat sphere they have for sure the new texture mode.
fred18 is offline   Reply With Quote
Old 04-17-2019, 08:33 PM   #66
Face
Beta Tester
 
Face's Avatar

Default

Quote:
Originally Posted by fred18 View Post
 i don't want to be any bottleneck here. I am about to leave with family for easter holidays and packing everything with 2 small daughters it's quite a challenge so I won't have much time available for about a week unfortunately.
No worries, I've thrown in a quick&dirty parser. If it turns out to be a good idea, you can always take a look over it and do a more stable parser for it, or perhaps also some in-simulation controls.
Face is offline   Reply With Quote
Old 04-17-2019, 08:35 PM   #67
fred18
Addon Developer

Default

Quote:
Originally Posted by Face View Post
 No worries, I've thrown in a quick&dirty parser. If it turns out to be a good idea, you can always take a look over it and do a more stable parser for it, or perhaps also some in-simulation controls.
Great.

Do you think that Jarmo and Kuddel will add this to the D3D9 until martin do it for the Beta or will you/us be forced to update the system in D3D9 at each release? or shall we take this as a demonstration and that's it?
fred18 is offline   Reply With Quote
Old 04-17-2019, 09:04 PM   #68
Face
Beta Tester
 
Face's Avatar

Default

Quote:
Originally Posted by fred18 View Post
 Do you think that Jarmo and Kuddel will add this to the D3D9 until martin do it for the Beta or will you/us be forced to update the system in D3D9 at each release? or shall we take this as a demonstration and that's it?
I don't know. I'll certainly keep it updated if it is not included, but I don't really care if it gets "official" or not.

At the glacial pace of Orbiter's core releases we could even afford to get the hooking updated.

---------- Post added at 23:04 ---------- Previous post was at 22:41 ----------

With the above posted client, you can do something like this to e.g. Brighton Beach:
/Textures/Moon/Flat/test.flt
Code:
Rect -3000 -33.4375 +41.125 2500 2500 0 50
Rect -2400 -33.4375 +41.125 1000 1000 45 50
This will give you this at the base there:

Face is offline   Reply With Quote
Old 04-17-2019, 09:11 PM   #69
fred18
Addon Developer

Default

Quote:
Originally Posted by Face View Post
 
Code:
ELLIPSE <height> <lng> <lat> <major> <minor> <phi> <falloff>
or
RECT <height> <lng> <lat> <length> <width> <phi> <falloff>
* <height> is in meter, supposedly w.r.t. mean sphere radius
* <lng> <lat> are longitude and latitude coordinates, as defined in e.g. base configuration file
* <major> <minor> are ellipse major and minor radius in meter, <minor> defaults to <major> if not defined - the meter definition might not be exact, as it uses a decimal degree guess at the latitude circle
* <length> <width> are rectangle length and width in meter, <width> defaults to <length> if not defined - meter definition same as above
* <phi> is rotation angle in degree from equator, with <major> and <length> being parallel to equator
* <falloff> is the percentage of the shape radius where transparent merging with original height is done

Lines with comment start and/or too less arguments are ignored.
just the first quick and dirty feedbacks:

- I saw from the code that the "comments" are intended as per code // but I would add also the ";", since it is very common for text file inputs
- I'd add some orbiter.log entries when a flat area is parsed, so users will have a feedback if their line is read or not
- I tried on a random location and it work as expected, but then I tried to flatten the second runway of palmdale base and it didn't work. I haven't checked myself yet, but maybe palmdale use elev_mod and this is the root cause somehow?
- I will put down some code to get the rectangle corners coordiantes from your definitions (length, width, phi etc) and viceversa, since I'd want the option to use also the corners
- The falloff is an integer right? It seems to me from the code that it's an integer that is divided by 100 after parsed so 50% is 50 and not 0.5, correct?
- are multiple definitions per file allowed? so if I have a base I can put all the circles and rectangles there?
fred18 is offline   Reply With Quote
Old 04-17-2019, 09:17 PM   #70
Face
Beta Tester
 
Face's Avatar

Default

Quote:
Originally Posted by fred18 View Post
 just the first quick and dirty feedbacks:
- I tried on a random location and it work as expected, but then I tried to flatten the second runway of palmdale base and it didn't work. I haven't checked myself yet, but maybe palmdale use elev_mod and this is the root cause somehow?
- The falloff is an integer right? It seems to me from the code that it's an integer that is divided by 100 after parsed so 50% is 50 and not 0.5, correct?
- are multiple definitions per file allowed? so if I have a base I can put all the circles and rectangles there?
* From what I have seen, the filtering should also trump the elev_mod data. It does so in the case of the cape, at least.
* The falloff is percent, right.
* Multiple definitions are allowed, as demonstrated by the pictures posted above.
Face is offline   Reply With Quote
Old 04-17-2019, 09:19 PM   #71
fred18
Addon Developer

Default

Quote:
Originally Posted by Face View Post
 * From what I have seen, the filtering should also trump the elev_mod data. It does so in the case of the cape, at least.
Then I don't know why the palmdale flattening is compeltely ignored.

basic test, a big square centered on te runway:
Code:
RECT 766.1 -118.072702 34.629199 5000 5000 0 10
fred18 is offline   Reply With Quote
Old 04-17-2019, 09:21 PM   #72
Face
Beta Tester
 
Face's Avatar

Default

Quote:
Originally Posted by fred18 View Post
 Then I don't know why the palmdale flattening is compeltely ignored.

basic test, a big square centered on te runway:
Code:
RECT 766.1 -118.072702 34.629199 5000 5000 0 10
Height is integer, not floating point. It gets ignored because it is not parsed correctly.
Face is offline   Reply With Quote
Old 04-17-2019, 09:39 PM   #73
fred18
Addon Developer

Default

Quote:
Originally Posted by Face View Post
 Height is integer, not floating point. It gets ignored because it is not parsed correctly.
Ah yes, sorry! my fault. If I may, I am completely with you that 1 meter is more than enough as resolution but there will be tons of users that will complain that it doesn't work because they had put 0.34 centimeters difference... so if possible I'd switch it to float

Anyway if anybody have any doubts about this tool look at this:



On the left the second runway of Palmdale base as it is by default: super bumpy! and if you look around you'll see that also taxiways and everything around is bumpy.

On the right the result with a simple line of text file... a perfectly flat runway and sorroundings... it took 2 minutes to set it up...

Thanks Face for your implementation, this is huge!!!

Last edited by fred18; 04-17-2019 at 09:56 PM.
fred18 is offline   Reply With Quote
Thanked by:
Old 04-17-2019, 09:49 PM   #74
kuddel
Donator
Default

Very good proof-of-concept!
One question (I haven't found time to check for myself):
Can the patches overlap? So a "ring" could be made with:
Code:
// ELLIPSE <height> <lng> <lat> <major> [<minor>] [<phi>] [<falloff>]
ELLIPSE -2000 -33.4375 +41.125 2500
ELLIPSE -3000 -33.4375 +41.125 2000

Last edited by kuddel; 04-17-2019 at 09:52 PM.
kuddel is offline   Reply With Quote
Old 04-17-2019, 09:51 PM   #75
fred18
Addon Developer

Default

Quote:
Originally Posted by kuddel View Post
 Very good proof-of-concept!
One question (I haven't found time to check for myself):
Can the patches overlap? So a "ring" could be made with:
Code:
// ELLIPSE <height> <lng> <lat> <major> <minor> <phi> <falloff>
ELLIPSE -2000 -33.4375 +41.125 2500 2500
ELLIPSE -3000 -33.4375 +41.125 2000 2000
It seems to me that the example posted by face about brighton beach is precisely like that, so I'd say it's a go
fred18 is offline   Reply With Quote
Thanked by:
Reply

  Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter SDK


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 08:47 AM.

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.