L3DT users' community
Large 3D terrain generator

Stichig Heightmaps

Any and all chit-chat regarding L3DT.

Stichig Heightmaps

Postby ET_Gamer03 » Tue Apr 30, 2019 3:13 pm

Ok i have gone ahead and taken Real world Terrain and imported it into l3dt (which works fine). The only problem is that they have to give the data to me in tiles (meaning i have to import them separately and stitch them together to make the full heigthmap after i have exported them). This means the terrain has varying highest and lowest points in each tile (or heightmap). Therefore when i got to export the heightmaps as images, the value of lets say (Black) could be 650m in one image and 800m in another. This "dominoes" through the rest of the grayscale, meaning that white in one is 1000m and 1150m respectively.

Untitled.png
This is what happens.


Desktop Screenshot 2019.04.30 - 15.23.46.76.png
and in 3d


Is there a way to make the height/value of a Grayscale colour the same over more than one heightmap?

Elliott
ET_Gamer03
Newbie
 
Posts: 1
Joined: Tue Apr 30, 2019 10:33 am

Re: Stichig Heightmaps

Postby Czorio » Thu May 09, 2019 9:13 pm

If you know the lowest height and the heighest height of all your images, you can normalize the values of the pixels with

Code: Select all
result = (Pixel Value - Minimum Value) / (Maximum Value - Minimum Value)


This should result in floating point values between 0 and 1, which you can then scale back to desired heights using

Code: Select all
result = Normalized Pixel Value * (Maximum Value - Minimum Value) + Minimum Value


Of course, this is assuming that the pixel values in your image are not simply [0, 255], but the actual heights of the terrain at that point.
Czorio
New member
 
Posts: 3
Joined: Tue Apr 23, 2019 10:41 pm


Return to General discussion

Who is online

Users browsing this forum: Majestic-12 [Bot] and 1 guest

cron