Page 1 of 1

Height of heightmap changed on import?

PostPosted: Thu Nov 22, 2012 1:42 pm
by Krileon
I'm importing a heightmap from WorldPainter which is a heightmap painting tool for Minecraft, which uses 8bit BMP for its 256 height range (1m is 1 block so 256 block height). I'm wanting to use this tool to import a heightmap from L3DT, but my problem is that L3DT always has a much much higher height range than 256. My guess is it's always exporting as 16bit. Is there anyway I can limit the height range properly? I've tried various parameters like vertical range and horizontal scale (believe this needs to be 1m). Below is an example of what happens when I import from WorldPainter and what it turns into.

Original BMP before import:
original.jpg
original.jpg (39.84 KiB) Viewed 15144 times


After import into L3DT:
l3dt.jpg
l3dt.jpg (192.34 KiB) Viewed 15144 times


As you can see the height range changes drastically so something is clearly changing the grayscale range or something of the sort.

Re: Height of heightmap changed on import?

PostPosted: Thu Nov 22, 2012 2:11 pm
by Aaron
Hi Krileon,

The bitmap exporter is automatically rescaling the heightfield such that the heights in the map span the 8-bit colour range from black to white, for maximum precision. This means that the lowest height will be written to the file as 0, and the highest as 255. This will occur even if the highest point in your heightmap is only, say, 127m (as seems to be the case in your 'original' map).

It is not converting to 16-bit, as this is not supported for the bitmap format exporter (unless you select the G16-BMP format, which I assume you didn't).

I'll modify the bitmap exporter to give you control over the output height range, including disabling the auto-scaling. I'll post back here when the update is available.

Best regards,
Aaron.

Re: Height of heightmap changed on import?

PostPosted: Thu Nov 22, 2012 4:39 pm
by Krileon
Absolutely awesome! I'm still on free trial, but give it a few minutes and my purchase will come through. Wonderful software.

Re: Height of heightmap changed on import?

PostPosted: Sat Nov 24, 2012 4:47 pm
by Krileon
Any sort of ETA on this feature if you don't mind me asking?

Re: Height of heightmap changed on import?

PostPosted: Fri Nov 30, 2012 1:40 pm
by Aaron
Hi Krileon,

I apologise for the delay in my reply. It's very difficult to give a meaningful ETA, but were I forced to guess, I'd say January, plus or minus three months (mostly plus).

Best regards,
Aaron.

Re: Height of heightmap changed on import?

PostPosted: Thu Dec 06, 2012 3:21 pm
by Krileon
Ok, thank you; no worries as I've another project am working on first before the project that'd need this.

Re: Height of heightmap changed on import?

PostPosted: Sun Oct 20, 2013 1:12 am
by Aaron
Hi Krileon,

I apologise for the delay. In the latest build of L3DT (v13.10.0.1, on the downloads page now), you can now set the output greyscale range so that L3DT doesn't always make your bitmap span from 0-255.To use this feature, open the export wizard, select the bitmap format, then select the 'Options...' button. In the options window, edit the Export->MinGreyscale and Export->MaxGreyscale values (double-click to edit, -1 = default value).

Please let me know if you find any problems.

Best regards,
Aaron.