Page 1 of 1

Elevation Grid Generator

Posted: Tue May 05, 2015 2:24 pm
by decaff_42
Excelent Tutorial Video! :D

Elevation Grid Generator

Posted: Sat Jun 13, 2015 1:29 am
by Barr
Am I doin it right?

600x600 @ aprox 3min.


Edit:

How can you lower the height amplification. For example for a maximum of 50ft? I tried using decimals but the program makes everything flat.

Re: Elevation Grid Generator

Posted: Sat Nov 07, 2015 5:06 pm
by Barr
Bumping old topic for goodness...

How does the height amplification work? Is 255m default? So if its at 1 the max height will be 255m? Right and if its at .5 the max height will be 122.5m, correct?

Re: Elevation Grid Generator

Posted: Sun Nov 08, 2015 1:38 am
by Flake
1 to 1 of the pixel value.

Height amplification * pixel value = height in meters of point.

So if the heigh amp is 1, and the pixel is 255 white, then the point would be 255m. ;)

EDIT: 3000th post! Bow before my true Planar form! :lol:

Re: Elevation Grid Generator

Posted: Sun Nov 15, 2015 1:07 am
by Barr
OfficerFlake wrote:1 to 1 of the pixel value.

Height amplification * pixel value = height in meters of point.

So if the heigh amp is 1, and the pixel is 255 white, then the point would be 255m. ;)

EDIT: 3000th post! Bow before my true Planar form! :lol:
Ay mind dumbing that down for me :?:

oh wait never saw the white after 255. So basically the brighness of each pixel is basically the height.


Also Im using 100x100 pixel bitmaps but it takes about 30 seconds for it to process it? Surely cant be my computer? And to add the .flds are coming out blank and zoomed in? No elevation grids

Re: Elevation Grid Generator

Posted: Sun Nov 15, 2015 3:41 am
by Flake
BARRACUZ wrote:So basically the brighness of each pixel is basically the height.
Exactament.

BARRACUZ wrote:Also Im using 100x100 pixel bitmaps but it takes about 30 seconds for it to process it? Surely cant be my computer? And to add the .flds are coming out blank and zoomed in? No elevation grids
Probably your PC.

Re: Elevation Grid Generator

Posted: Sun Nov 15, 2015 1:32 pm
by Barr
Hmm okay I'll check on it. Though a 3.3ghz processor with 8gb of ram should be plenty.

Re: Elevation Grid Generator

Posted: Sun Jun 26, 2016 7:46 pm
by kiwiflieger
Apologies for bumping old topic, but I think I may have a fix for:
BARRACUZ wrote:Also Im using 100x100 pixel bitmaps but it takes about 30 seconds for it to process it? Surely cant be my computer? And to add the .flds are coming out blank and zoomed in? No elevation grids
It may not be the PC, as I have very similar specs to BARRACUZ, but the fld.
I have conducted some testing of this program and found that removing the fld information in a text editor and leaving just the elevation grid information, then saving as a .ter file, gives a working elevation grid.

Example:

Code: Select all

FIELD
FLDNAME WANAKAELEV
GND 0 0 215
SKY 23 106 189
GNDSPECULAR FALSE
DEFAREA LAND
BASEELV 0.00m
MAGVAR 0.00deg
CANRESUME TRUE
PCK "00000000.ter" 274601
TerrMesh
SPEC FALSE
NBL 501 546
TMS 108.00 108.00
CBE 0.00 1833.76 46 112 10 194 169 92
BLO 0.00 R 1 46 112 10 1 46 112 10
BLO 0.00 L 1 73 122 25 1 73 122 25
BLO 0.00 R 1 100 133 40 1 73 122 25
If the start of the generated elevation grid looks like this, then remove this:

Code: Select all

FIELD
FLDNAME WANAKAELEV
GND 0 0 215
SKY 23 106 189
GNDSPECULAR FALSE
DEFAREA LAND
BASEELV 0.00m
MAGVAR 0.00deg
CANRESUME TRUE
PCK "00000000.ter" 274601
So the file starts at TerrMesh.

Hope this helps...

Re: Elevation Grid Generator

Posted: Sun Jun 26, 2016 9:10 pm
by Barr
Can confirm What kiwi said. I kept having troubles with the output flds. Simply deleting a few lines and saving as a ter file gave me a working elevation grid.


Also just so others are aware both kiwi and I have noticed that the program will also include any "picture" that shows up on screen and behind the running program window. For example if you decide to load and generate a bitmap while having a chrome window or fancy wallpaper in the background you will see it in the resulting elevation grid.

Re: Elevation Grid Generator

Posted: Tue Aug 09, 2016 10:34 am
by DD-Destroyer
What is my problem???????

Re: Elevation Grid Generator

Posted: Wed Aug 10, 2016 1:15 am
by Barr
DD-Destroyer wrote:What is my problem???????
I'm a boob at this so take my suggestions lightly. Hopefully flake or grigor can chime in.

1. The grid generator will generate the bitmap plus whatever is under or ontop of it on the screen. So let's say you have a pickachu wallpaper and have a text document open. The generator will pick these up and include it in the end result so you will get a mountain plus a pikachu mountain. So set your wall paper to none or black and drag all windows even the generator itself away from under the image.

2. Make sure to set the program to run as administrator and run it under xp compatibility. Also try not to run major cpu hog programs like chrome or a videogames. I've noticed that the generator will take a tad longer probably due to the CPU usage priority.

3. Make sure the bitmap is a true 100 pixel by 100 pixel image. I used paint.net and it has some weird settings when you resize so depending on your program double check. Remember that the generator takes the color value of each and every pixel and turns it into a coordinate for ys. So the more pixels or larger the image is the longer it will take to process it all.

4.The generator uses raw cpu power to make the grids so if you have an older machine it will take longer



And if someone can please explain in some detail how to properly use the height amplification. I'm having g trouble getting accurate sized grids since I don't know what to multiply the height amplification by. Like do you average out your highest or Max rgb values and use that?

Re: Elevation Grid Generator

Posted: Wed Aug 10, 2016 1:58 am
by Flake
BARRACUZ wrote:I'm a boob at this
But that's okay because I like boobs. 8-)

Re: Elevation Grid Generator

Posted: Wed Aug 10, 2016 3:47 am
by kiwiflieger
BARRACUZ wrote:And if someone can please explain in some detail how to properly use the height amplification.
The height amplification is a multiple of the pixel value, e.g. black (0,0,0) or white (255,255,255). So if the height amp. was set to 20, say, then the height of a white pixel (in metres, of course 8-) ) would be 255 x 20 = 5100 metres.

Re: Elevation Grid Generator

Posted: Wed Aug 10, 2016 4:53 am
by DD-Destroyer
Thanks. I'll try again. I forgot to tell my PC specification

1. OS : Windows 10 64bit
2. CPU : Intel Skylake i7-6700k with quad core and 4.0Ghz clock
3. VGA : nVidia Geforce GTX 1080
4. RAM : 8G

Re: Elevation Grid Generator

Posted: Wed Aug 10, 2016 12:00 pm
by Flake
Also, for your viewing pleasure BARRACUZ: viewtopic.php?p=86162#p86162

Re: Elevation Grid Generator

Posted: Thu Aug 11, 2016 9:11 am
by DD-Destroyer
I got what is the problem. I think grigor have to add "7. Don't click or change to other program in actual before process completely finish." This script reflex screen in actual and start from left top point of the window to as image file's pixel.

Re: Elevation Grid Generator

Posted: Sat Aug 13, 2016 11:38 pm
by Barr
OfficerFlake wrote:Also, for your viewing pleasure BARRACUZ: viewtopic.php?p=86162#p86162
Ok so if im understading the max elevation in the bitmap must be 255 white? It cant be a max of like 180,43,189.

Or is there a way to scale a maps elevation when the highest point in the bitmap is not a 255 white? This what ive been trying to understand. If you cant then its a real bummer since youll need to edit alot when you pull elevation maps of gis sites

Re: Elevation Grid Generator

Posted: Sun Aug 14, 2016 12:42 am
by kiwiflieger
Just did some testing and determined that the equation for grid face height is always:

pixel brightness (0-255) * height amplification = final grid height

The maximum pixel value doesn't have to be 255 and the scaling is only determined by the brightness of an individual pixel, not the maximum value anywhere on a bitmap.
BARRACUZ wrote:Or is there a way to scale a maps elevation when the highest point in the bitmap is not a 255 white? This what ive been trying to understand. If you cant then its a real bummer since youll need to edit alot when you pull elevation maps of gis sites
Normally, I find the highest pixel value in the bitmap, and then find its elevation on a map. Then just divide elevation of highest point by pixel value and you have the height amplification value.
Example:
Say I'm using this image:
Image
(a random bit of NZ I picked out) and the highest point is somewhere in the bottom right corner. I'd find the elevation on a map and calculate accordingly. ( I think the amplification is something around 15 on this example)

NB all measurements are in metres!

Re: Elevation Grid Generator

Posted: Sun Aug 14, 2016 1:44 am
by Barr
kiwiflieger wrote:Just did some testing and determined that the equation for grid face height is always:

pixel brightness (0-255) * height amplification = final grid height

The maximum pixel value doesn't have to be 255 and the scaling is only determined by the brightness of an individual pixel, not the maximum value anywhere on a bitmap.
BARRACUZ wrote:Or is there a way to scale a maps elevation when the highest point in the bitmap is not a 255 white? This what ive been trying to understand. If you cant then its a real bummer since youll need to edit alot when you pull elevation maps of gis sites
Normally, I find the highest pixel value in the bitmap, and then find its elevation on a map. Then just divide elevation of highest point by pixel value and you have the height amplification value.
Example:
Say I'm using this image:
Image
(a random bit of NZ I picked out) and the highest point is somewhere in the bottom right corner. I'd find the elevation on a map and calculate accordingly. ( I think the amplification is something around 15 on this example)

NB all measurements are in metres!
Okay so now you have me at pixel brightness. A quick Google search and I think I need to find a way to convert the bitmap to a true grey scale image and not just use the "black and white" color function.

Re: Elevation Grid Generator

Posted: Sun Aug 14, 2016 3:51 am
by Flake
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.