L3DT users' community
Large 3D terrain generator

Heightmap import wierdness

Got a problem or need advice?

Heightmap import wierdness

Postby aaglo » Mon Mar 03, 2014 10:45 pm

Im having some issue importing some heightmaps

http://i.imgur.com/qh8zy5J.png

No matter what vertical range I specify it seems to import at a ridiculous altitude.
It also seems to leave out a rather arbitrary amount to the top and right of the image, each import seems to change this amount of black space.
Sapphire works, but is extremely laggy, I believe the black area produces a memory leak or something as it also is not really a uniform shape, but rather glitches and changes as you move over it.

I've attempted multiple import filetypes, and some don't seem to work at all (tiff), even when I scale the heightmap down extremely small and reduce filesize. The image posted was from a 13kx13k PNG import, exported from photoshop in 16bit.

Thanks for any help.
aaglo
New member
 
Posts: 3
Joined: Fri Apr 05, 2013 3:16 am

Re: Heightmap import wierdness

Postby Aaron » Tue Mar 04, 2014 12:56 am

Hi Aaglo,

I apologise for this inconvenience. Is there any way you could send me the PNG file, or perhaps the smallest cutdown version that still reproduces the black border fault? Dropbox or equivalent would be ideal, as I'm guessing this file isn't going to get through inbox e-mail attachment limits. With the file I should be able to get the importer working as it should.

I believe the black area produces a memory leak or something as it also is not really a uniform shape, but rather glitches and changes as you move over it.


Sapphire's dynamic level of detail algorithm creates a optimised mesh on the fly based on how close you are to the patch of terrain. If your terrain is extremely rough or has very large and sudden step changes in height, as appears the case here with the falloff to the 'black' region, then the mesh will pop suddenly as the level of detail changes when you move closer or further away. Not a bug in Sapphire per se, just a consequence of dealing with very unusual terrain data.

...and some don't seem to work at all (tiff)...


The TIFF importer only imports the GeoTIFF profile, one of several thousand different TIFF types. If you would like me to support the TIFF profile you're using, please send a small example to aaron@bundysoft.com.

By the way, have you tried to export/import as RAW in 16 bit unsigned?

Best regards,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Re: Heightmap import wierdness

Postby aaglo » Tue Mar 04, 2014 10:48 am

Hey thanks for explaining some of that, for the TIFF file, I had just used a photoshop export TIFF, and assumed thats what was used to import, but having used geoTIFF before, I'm surprised I didn't catch that myself. I attempted to export and import as a RAW16, but it re-imported with the same blank area, I assume you meant export it out of l3dt after imported via the png, and then re-import it, or did I misunderstand?

Sent a PM with a link to the PNG used as well.
Thanks,
Aaglo
aaglo
New member
 
Posts: 3
Joined: Fri Apr 05, 2013 3:16 am

Re: Heightmap import wierdness

Postby Aaron » Tue Mar 04, 2014 11:53 am

Hi Aaglo,

Thanks for the PM; I've reproduced the fault and am looking into it presently.

With regards to the RAW, I was suggesting exporting it from Photoshop (instead of PNG or TIFF) and importing it into L3DT, as a way to check whether it's the PNG importer or a wider problem.

Best regards,
Aaron.
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia

Re: Heightmap import wierdness

Postby Aaron » Tue Mar 04, 2014 12:16 pm

Hi Aaglo,

The PNG was saved as 32-bit RGBA, which only has 8 bits of height precision. The PNG importer didn't handle this case properly, but it's fixed for the next update. In the mean-time, I'd recommend you export from Photoshop as a 16-bit greyscale PNG, as this will work with L3DT, and will give you better height precision at the same time (on the proviso that the height data was never converted to 8 bits, 24-bit RGB, nor 32-bit RGBA.

Best regards,
Aaron.

PS:

testbbb_screencap.png
testbbb_screencap.png (72.7 KiB) Viewed 10554 times
User avatar
Aaron
Site Admin
 
Posts: 3696
Joined: Sun Nov 20, 2005 2:41 pm
Location: Melbourne, Australia


Return to Help and support

Who is online

Users browsing this forum: No registered users and 8 guests

cron