Elevation Grid Generator

Note that alterations to the YSFlight .EXE is forbidden
User avatar
Barr
Veteran
Veteran
Posts: 1011
Joined: Wed Mar 28, 2012 8:49 pm
Favorite Aircraft: The Boeing 757
Location: Providence, Rhode Island
OS: Windows 10/Gentoo
Has thanked: 272 times
Been thanked: 205 times

Re: Elevation Grid Generator

Post by Barr » Sun Aug 14, 2016 12:10 pm

OfficerFlake wrote:
kiwiflieger wrote:pixel brightness (0-255) * height amplification = final grid height
So basically what I've been saying this whole time.

I mean, have I explained this poorly or...?

---
BARRACUZ wrote:It cant be a max of like 180,43,189?
You could do that. The height is based of the LUMINANCE value of the pixel, Colors are irrelevant.

Colors can be defined by Red, Green, Blue, or Hue, Saturation, Luminence. Full white is 255 luminence, regardless of hue and saturation levels. Full black is 0 luminence, regardless of hue and saturation. It would be best to think of the light level in regards to luminence.

I tried explaining in RGB as this is what everyone is most familiar with.

You could use colors but they would have NO impact on the grid height - just the luminance of the pixel is all that matters.
Yea you suck at explaining. Oh and I think kiwi can take it from here bro...


JK, JK ,JK. Youre doing a great job. Im just an ass thats all. Feel free to belittle me. :oops:

Ok so im slowly getting it now. I went into my image editor (paint.net) hit grey scale, image turned grey, used the pick a color tool and went into the andvanced color selector. Here I noticed that the RGB values are all the same as in theyre 31,31,31 or 102,102,102. Is this the pixel brightness/luminence you were talking about? I thought there was supposed to be a seperate option for pixel brightness so I assumed it was that opacitity alpha option
Screenshot (127).png
Image
Beginner ATC for hire!
Current Projects:
-Pilatus PC12
-Mooney M20
-New England Scenery
Fine Print:
**Word of Caution**
My knowledge is limited. Anything I write in my posts may or may not be accurate. To be honest I think its all crap.

User avatar
kiwiflieger
Contributor
Contributor
Posts: 227
Joined: Thu Mar 27, 2014 7:09 am
Favorite Aircraft: Die Fledermaus
Has thanked: 125 times
Been thanked: 92 times

Re: Elevation Grid Generator

Post by kiwiflieger » Sun Aug 14, 2016 7:08 pm

Nailed it on the head. The opacity/transparency has absolutely nothing to do with the brightness.
OfficerFlake wrote:The height is based of the LUMINANCE value of the pixel, Colors are irrelevant.

Colors can be defined by Red, Green, Blue, or Hue, Saturation, Luminence. Full white is 255 luminence, regardless of hue and saturation levels. Full black is 0 luminence, regardless of hue and saturation. It would be best to think of the light level in regards to luminence.
I normally use equal RGB values but using the HSL interface could possibly be easier?

200th post...
Currently dormant... playing IL2 Cliffs of Dover

User avatar
Flake
Core Staff
Core Staff
Posts: 4354
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 836 times
Been thanked: 1238 times
Contact:

Re: Elevation Grid Generator

Post by Flake » Mon Aug 15, 2016 4:50 am

kiwiflieger wrote:200th post...
Grats. 8-)
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!

User avatar
Barr
Veteran
Veteran
Posts: 1011
Joined: Wed Mar 28, 2012 8:49 pm
Favorite Aircraft: The Boeing 757
Location: Providence, Rhode Island
OS: Windows 10/Gentoo
Has thanked: 272 times
Been thanked: 205 times

Re: Elevation Grid Generator

Post by Barr » Tue Aug 16, 2016 2:53 am

OfficerFlake wrote:
kiwiflieger wrote:200th post...
Grats. 8-)

Ok new problem?
I overlayed my 100x100 bitmap in google earth and got a measurement of 48000 meters by 48000 meters. So I hit the grid genertor and replace the length and width both to 48000. I import the grid and the adjust the latice size to 48000. Now the grid is way to big am I doing something wrong? Again sorry for the bother and thanks in advance :oops:
Screenshot (130).png
Image
Beginner ATC for hire!
Current Projects:
-Pilatus PC12
-Mooney M20
-New England Scenery
Fine Print:
**Word of Caution**
My knowledge is limited. Anything I write in my posts may or may not be accurate. To be honest I think its all crap.

User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3846
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win 10
Has thanked: 1615 times
Been thanked: 1729 times
Contact:

Re: Elevation Grid Generator

Post by Neocon » Tue Aug 16, 2016 3:23 am

Just edit the .ter in notepad. The width x length is per square face, so divide your 48000 by the number of faces wide and then 48000 by the number of faces long.

EDIT: If I have it right, each pixel of the .bmp is one square face of the .ter, so you could also do the math so you enter the width of each pixel into the generator before you run it.

User avatar
Flake
Core Staff
Core Staff
Posts: 4354
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 836 times
Been thanked: 1238 times
Contact:

Re: Elevation Grid Generator

Post by Flake » Tue Aug 16, 2016 5:23 am

So the X/Y distance of the grid in the generator is one cell or the full size of the grid? What about the definition in a .ter file?
I am an accountant working full-time (and some). I'm not here as often as I would like to be. Send a message if you need me. There are a few people in the community who can get in contact with me urgently if you need - don't be afraid to ask. I just don't check here as frequently as I used to. Sorry!

User avatar
Barr
Veteran
Veteran
Posts: 1011
Joined: Wed Mar 28, 2012 8:49 pm
Favorite Aircraft: The Boeing 757
Location: Providence, Rhode Island
OS: Windows 10/Gentoo
Has thanked: 272 times
Been thanked: 205 times

Re: Elevation Grid Generator

Post by Barr » Sun Aug 21, 2016 2:41 pm

Well I think theres some freaky mumbo jumbo goin on in there.

I think the x/y values are infact for cell size and not total grid size.

This time I reset the ground lattice to 48000m so each box is 48000m. Then I divided the estimated desired 48000m grid size by the 100 pixels to get 480. Input that into the grid generrator and WAHLA! I got me a 48000m elevation grid, aprox.
Attachments
Screenshot (131).png
Image
Beginner ATC for hire!
Current Projects:
-Pilatus PC12
-Mooney M20
-New England Scenery
Fine Print:
**Word of Caution**
My knowledge is limited. Anything I write in my posts may or may not be accurate. To be honest I think its all crap.

User avatar
Neocon
First Class Membership
First Class Membership
Posts: 3846
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win 10
Has thanked: 1615 times
Been thanked: 1729 times
Contact:

Re: Elevation Grid Generator

Post by Neocon » Sun Aug 21, 2016 4:47 pm

BARRACUZ wrote:I think the x/y values are infact for cell size and not total grid size.
Patrick31337 wrote:The width x length is per square face
That's what I was trying to say above.

User avatar
Barr
Veteran
Veteran
Posts: 1011
Joined: Wed Mar 28, 2012 8:49 pm
Favorite Aircraft: The Boeing 757
Location: Providence, Rhode Island
OS: Windows 10/Gentoo
Has thanked: 272 times
Been thanked: 205 times

Re: Elevation Grid Generator

Post by Barr » Sun Aug 21, 2016 11:52 pm

Patrick31337 wrote:
BARRACUZ wrote:I think the x/y values are infact for cell size and not total grid size.
Patrick31337 wrote:The width x length is per square face
That's what I was trying to say above.
He needed proof mane... I think OP should update the program and change it. And if someone can make a tut for other knuckle heads like me

Also what about the .ter definition?
Image
Beginner ATC for hire!
Current Projects:
-Pilatus PC12
-Mooney M20
-New England Scenery
Fine Print:
**Word of Caution**
My knowledge is limited. Anything I write in my posts may or may not be accurate. To be honest I think its all crap.

User avatar
Skipper
Rookie
Rookie
Posts: 52
Joined: Mon Dec 09, 2013 8:28 pm
Favorite Aircraft: Spitfire
Location: South Wales, UK
OS: Windows 7
Has thanked: 9 times
Been thanked: 24 times
Contact:

Re: Elevation Grid Generator

Post by Skipper » Mon Aug 22, 2016 8:37 pm

Anyone done a size/dimension test with ter files?
Can YS handle a 3000x3000 terrain mesh?
(if not... One UK sized terrain mesh coming up...)
Image
Skipper's Mod Pack: www.skipper-iwb.co.uk (On YS Mod Site)

User avatar
Gunny
Business Class Membership
Business Class Membership
Posts: 3224
Joined: Sun Feb 06, 2011 6:17 pm
Favorite Aircraft: Any thing with a prop.
Location: New Iberia.LA.
OS: Windows XP SP3
Has thanked: 577 times
Been thanked: 731 times

Re: Elevation Grid Generator

Post by Gunny » Mon Aug 22, 2016 10:39 pm

@Skipper Are you going to do the UK or is it just exercizing you scenery editor muscles?
Image[/align=centre]

User avatar
kiwiflieger
Contributor
Contributor
Posts: 227
Joined: Thu Mar 27, 2014 7:09 am
Favorite Aircraft: Die Fledermaus
Has thanked: 125 times
Been thanked: 92 times

Re: Elevation Grid Generator

Post by kiwiflieger » Tue Aug 23, 2016 4:18 am

Skipper wrote:Anyone done a size/dimension test with ter files?
I made an airshow map a few months ago and the main terrain elevation grid was 301 x 328 faces, at about 50 - 60 km length by width. YS handled it alright fps-wise but there appears to be some sort of rendering issue in OpenGL with elevation grids that have a large number of faces, where small transparent 'stripes' seem to be cut out from hills and occasionally whole mountains can disappear because of this :x . Annoying but hopefully fixable.
The scenery editor also appears to dislike elevation grids coming up to that size, but I find turning off the 'View Wireframe' option tends to help with stuttering.

I'm trying to make a map that involves large, detailed elevation grids and I think the only way around the issue is to divide the grids into smaller, less detailed rectangles, as a few of our Japanese members have done in their maps. It's not so much size of the grid itself but the number of faces that really pushes up the lag...
Currently dormant... playing IL2 Cliffs of Dover

User avatar
Skipper
Rookie
Rookie
Posts: 52
Joined: Mon Dec 09, 2013 8:28 pm
Favorite Aircraft: Spitfire
Location: South Wales, UK
OS: Windows 7
Has thanked: 9 times
Been thanked: 24 times
Contact:

Re: Elevation Grid Generator

Post by Skipper » Tue Aug 23, 2016 4:36 am

Gunny wrote:@Skipper Are you going to do the UK or is it just exercizing you scenery editor muscles?
Just exercising my scenery editor muscles, and I've got most GIS data for the UK.
My experiments with the shuttle radar topography mission dataset are here. I stressed it out with my 30mb elevation grid, and it died.
But it was a 1200x1000 grid....


One thing I. Did realise though, the version I made as a test, with the UK mainland shapefile polygon, is that it is to scale, and it is in the British National Grid (OSGB36) projection, which means you can use an OS map (or similar) and use the coordinates to find any position on the YS map (as BNG and YS both use meters). So you could put things in their exact real world positions really easily...
Image
Skipper's Mod Pack: www.skipper-iwb.co.uk (On YS Mod Site)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest