Elevation Grid Generator

Note that alterations to the YSFlight .EXE is forbidden
User avatar
Barr
Veteran
Veteran
Posts: 1012
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: 206 times

Re: Elevation Grid Generator

Post by Barr »

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 »

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
VFA-49
VFA-49
Posts: 4375
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 861 times
Been thanked: 1279 times
Contact:

Re: Elevation Grid Generator

Post by Flake »

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: 1012
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: 206 times

Re: Elevation Grid Generator

Post by Barr »

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: 3955
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win 10
Has thanked: 1769 times
Been thanked: 1810 times
Contact:

Re: Elevation Grid Generator

Post by Neocon »

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
VFA-49
VFA-49
Posts: 4375
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Boeing F/A-18A
Location: Australia
OS: Windows 10 (x64)
Has thanked: 861 times
Been thanked: 1279 times
Contact:

Re: Elevation Grid Generator

Post by Flake »

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: 1012
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: 206 times

Re: Elevation Grid Generator

Post by Barr »

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: 3955
Joined: Wed Oct 19, 2011 5:01 am
Favorite Aircraft: Baron 58
Location: Tennessee
OS: Win 10
Has thanked: 1769 times
Been thanked: 1810 times
Contact:

Re: Elevation Grid Generator

Post by Neocon »

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: 1012
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: 206 times

Re: Elevation Grid Generator

Post by Barr »

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: 83
Joined: Mon Dec 09, 2013 8:28 pm
Favorite Aircraft: Spitfire/F-15E
Location: SAM VOR 240 radial, 27nm
OS: Windows 10
Has thanked: 15 times
Been thanked: 57 times
Contact:

Re: Elevation Grid Generator

Post by Skipper »

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
Host of YSRP: YSRP.co.uk - YS Role Play Server
User avatar
Gunny
Business Class Membership
Business Class Membership
Posts: 3250
Joined: Sun Feb 06, 2011 6:17 pm
Favorite Aircraft: Any thing with a prop.
Location: New Iberia.LA.
OS: Windows 10 & XP SP3
Has thanked: 586 times
Been thanked: 786 times

Re: Elevation Grid Generator

Post by Gunny »

@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 »

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: 83
Joined: Mon Dec 09, 2013 8:28 pm
Favorite Aircraft: Spitfire/F-15E
Location: SAM VOR 240 radial, 27nm
OS: Windows 10
Has thanked: 15 times
Been thanked: 57 times
Contact:

Re: Elevation Grid Generator

Post by Skipper »

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
Host of YSRP: YSRP.co.uk - YS Role Play Server
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests