Elevation Grid Generator
-
- Contributor
- Posts: 201
- Joined: Wed Mar 16, 2011 7:57 am
- Favorite Aircraft: Ball-Bartoe Jetwing
- OS: Windows XP
- Has thanked: 58 times
- Been thanked: 122 times
Elevation Grid Generator
1) Run the program from wherever you like - no installation necessary.
2) A file menu will ask for a bitmap filename.
3) Enter the grid size - number of segments is generated automatically from the bitmap file.
4) Enter the height amplification, if desired.
5) Enter a filename, if desired.
6) Press the "Do it!" button and a file will be generated containing the elevation grid.
From there you can use the Scenery Editor to apply finishing touches.
- I recommend using landscape rather than portrait format, or better still plain square.
- Colour images will work, though not as accurately.
- Also included is the AutoHotkey Script, if you would like to tinker with the code.
Enjoy the scenery!
Grigor.
(Added gradient colour selection and fixed output filename error... Also fixed the default sky and ground colours.)
- Attachments
-
- Elevation Grid Generator.zip
- (400.82 KiB) Downloaded 519 times
- Gunny
- 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
- Dragon029
- Veteran
- Posts: 601
- Joined: Sun Feb 06, 2011 6:09 am
- Favorite Aircraft: F-35A
- Location: Australia
- Has thanked: 42 times
- Been thanked: 85 times
- Contact:
Re: Elevation Grid Generator
>>> Dragon Addon Pack <<<
(PAK-FA, F/A-52, F/A-36, MQ-21)
-
- Contributor
- Posts: 201
- Joined: Wed Mar 16, 2011 7:57 am
- Favorite Aircraft: Ball-Bartoe Jetwing
- OS: Windows XP
- Has thanked: 58 times
- Been thanked: 122 times
Re: Elevation Grid Generator
Even Testmap_1.bmp at 60x60 pixels, with a grid size of 400 x 330 makes for spectacular scenery and fun flying.
I've always been a little nonplussed at the flatness of most YS landscapes... even just a small variation of low rolling hills makes a difference. Of course, I do most of my flying at treetop level, so...
- Gunny
- 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
-
- Contributor
- Posts: 201
- Joined: Wed Mar 16, 2011 7:57 am
- Favorite Aircraft: Ball-Bartoe Jetwing
- OS: Windows XP
- Has thanked: 58 times
- Been thanked: 122 times
Re: Elevation Grid Generator
- Dragon029
- Veteran
- Posts: 601
- Joined: Sun Feb 06, 2011 6:09 am
- Favorite Aircraft: F-35A
- Location: Australia
- Has thanked: 42 times
- Been thanked: 85 times
- Contact:
Re: Elevation Grid Generator
>>> Dragon Addon Pack <<<
(PAK-FA, F/A-52, F/A-36, MQ-21)
-
- Contributor
- Posts: 201
- Joined: Wed Mar 16, 2011 7:57 am
- Favorite Aircraft: Ball-Bartoe Jetwing
- OS: Windows XP
- Has thanked: 58 times
- Been thanked: 122 times
Re: Elevation Grid Generator
Elevation Grid Generator
Things like this are nice! (just experiments)
I should only be able to obtain ocean elevation faces to zero elevation, or zero slope at least, anf then hide them. I hate to see grids disappear when i fly high on them, is there a way to fix the distance to which ys flight draw the grids?
Elevation Grid Generator
Elevation Grid Generator
- Flake
- 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:
Elevation Grid Generator
- waspe414
- Staff
- Posts: 1582
- Joined: Thu Feb 10, 2011 9:35 pm
- Favorite Aircraft: Kiowa, Mitten, Hornet
- Location: Canada
- Has thanked: 154 times
- Been thanked: 506 times
Elevation Grid Generator
You can do it by editing the .ter file, though the vertical scaling is a little involved.
NBL specifies subdivisions on both axes, which affects the number of BLO sections. Unspecified BLO sections will be hidden zero elevation faces.TerrMesh
NBL 2 2
TMS 85.31 70.99
BLO 0.00 L 1 0 0 255 1 0 0 255
BLO 0.00 R 1 0 0 255 1 0 0 255
BLO 0.00
BLO 0.00 R 1 0 0 255 1 0 0 255
BLO 33.57 L 1 0 0 255 1 0 0 255
BLO 0.00
BLO 0.00
BLO 0.00
BLO 0.00
END
TMS defines the length and width in meters.
I wrote down exactly what the BLO lines meant somewhere else, but the first number, before the L or R, is that point's height.
Changing the horizontal scaling is easy. Changing the vertical scaling requires modifying each BLO line input.
I stole your turnip. Now you must come and defend your honour. ~ Hank Green
- Flake
- 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:
Elevation Grid Generator
- Welshy
- Staff
- Posts: 2042
- Joined: Thu Feb 24, 2011 4:53 pm
- Favorite Aircraft: Sea Jet
- Location: Wales
- OS: Windows NT
- Has thanked: 249 times
- Been thanked: 254 times
- Contact:
Elevation Grid Generator
Overlord of VMFA-125 (CVW-171)
Previously Supreme Overlord of 323rd CAW
Friendly Neighbourhood Miscreant
Head Honcho at Talking Aero and British Defence
If you see me post like this in a thread pay attention!
- Flake
- 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:
Elevation Grid Generator
- decaff_42
- Staff
- Posts: 3838
- Joined: Sat Oct 29, 2011 7:23 pm
- Favorite Aircraft: SR-71 Blackbird
- Location: Eastern United States
- OS: Mac OSX
- Has thanked: 844 times
- Been thanked: 1727 times
- Contact:
Elevation Grid Generator
Visit my GitHub page for Python codes: https://github.com/decaff42?tab=repositories
YSFlight Addon Database - Find links to nearly every addon made for YSFlight!
Submit Addon To Database
- decaff_42
- Staff
- Posts: 3838
- Joined: Sat Oct 29, 2011 7:23 pm
- Favorite Aircraft: SR-71 Blackbird
- Location: Eastern United States
- OS: Mac OSX
- Has thanked: 844 times
- Been thanked: 1727 times
- Contact:
Elevation Grid Generator
If someone is willing to test it on a windows machine, that would be helpful! I'll PM you a link. Here is my test elevation grid imported into Scenery Editor.
I cannot handle colors very well, but that is pretty much the easiest step to do in Scenery Editor. Making the node elevations is the harder part.
You can now import and scale an elevation grid in the x,y, and z directions.
Visit my GitHub page for Python codes: https://github.com/decaff42?tab=repositories
YSFlight Addon Database - Find links to nearly every addon made for YSFlight!
Submit Addon To Database
- Flake
- 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:
Elevation Grid Generator
Also notes:
Develop a terrain map bmp file - you can photoshop one or whatever you are happy with.
0,0,0 Black is NO elevation at all. 255,255,255 is maximum elevation.
Whatever size you save the bmp as is the size of the grid in subdivisions - so 50*50 pixels is a good size but 200+px is overkill.
Now, if you are me and use win 7: Set the compatability for the program to: Run Win XP SP3, Disable visual themes, Disable desktop composition, Run as admin.
Launch the program and choose the height amplification and terrain size - Size of grid is distance X/Y in meters. Height amplification is the 255m * amplification for each pixel - so if a pixel is perfect white and amplification is 1, it should be 255m above ground, the generated node.
Generate the grid and it should create a new field.
In Scenery Editor (latest test I use...)
File,Import,Scenery... Load the field.
I like to move the grid out of the child scenery and into the root so... Alt+SC, select the grid, Alt+ETR (grid goes to root), Alt+SS (To select the scenery) Select the scenery, ALT+EDS (Delete the scenery). Now you can alt+SC the grid again, then ALT+OVHZ to hide zero elvation faces, then just move and place to suit (ALT+EVI / ALT+ERI) then finally set the gradation color.
Save the field, load and test in YSF - should be all good.
EDIT: Bump.
Who is online
Users browsing this forum: No registered users and 5 guests