TerrainBlock::import - Heightmap should be 16bit greyscale!
by Mike Rowley · in Torque 3D Professional · 05/04/2009 (4:57 pm) · 34 replies
I have 2 choices in paintshop pro. 4 and 8 bit greyscale. How are we to make heightmaps if we are subject to 1 size that our paint program won't make?
#22
Edit: I was once able to generate a 16 bit grayscale png a few days ago with Grome. But I'm not able to reproduce this. :)
05/07/2009 (8:26 am)
Grome is able to generate 16 bit grayscale pngs. It can also import raw heightmaps from L3DT.Edit: I was once able to generate a 16 bit grayscale png a few days ago with Grome. But I'm not able to reproduce this. :)
#23
MicroDEM produces a 24bit grayscale from a Digital Elevation Map of an actual mapped location, in every option it's 24 bit(.PNG, .BMP, .Targa). I'm not actually producing a heightmap from a application (L3DT, Grome, etc.) or trying upconvert an 8bit grayscale, but needing to covert it from 24bit down to a 16bit for it to work in T3D.
(I've also noted this as a bug report, since TGE & TGEA both didn't have a problem with 24bit grayscales)
05/07/2009 (3:59 pm)
@Logan,Quote:I'm not actually trying to generate the heightmap, I'm trying to convert 24bit grayscale maps that I'd used previously in TGE/TGEA that came from DEM sources using MicroDEM.
MicroDEM produces a 24bit grayscale from a Digital Elevation Map of an actual mapped location, in every option it's 24 bit(.PNG, .BMP, .Targa). I'm not actually producing a heightmap from a application (L3DT, Grome, etc.) or trying upconvert an 8bit grayscale, but needing to covert it from 24bit down to a 16bit for it to work in T3D.
(I've also noted this as a bug report, since TGE & TGEA both didn't have a problem with 24bit grayscales)
#24
05/07/2009 (4:08 pm)
I broke down and bought l3dt. It's not very expensive, but will take a bit of learning to get it figured out.
#25
*ponders developing a new web service that converts any image to 16bit grayscale...*
05/07/2009 (4:17 pm)
My Photoshop CS exports in 16bit grayscale natively.*ponders developing a new web service that converts any image to 16bit grayscale...*
#26
I export from Grome 1.2 as PNG then save from Paint.net to BMP and use imageMagick with -define png:color-type=0 as a PNG file again.. Seems to work fine. I should have my lic for Grome 2 tomorrow and can tell. But I don't see a way to save PNGs from Grome as 16bit either.
07/01/2009 (9:03 pm)
@Konrad,I export from Grome 1.2 as PNG then save from Paint.net to BMP and use imageMagick with -define png:color-type=0 as a PNG file again.. Seems to work fine. I should have my lic for Grome 2 tomorrow and can tell. But I don't see a way to save PNGs from Grome as 16bit either.
#27
I'd appreciate feedback on the new functionality.
07/02/2009 (3:03 am)
Oh... FYI... 24/32bit importing is fixed.I'd appreciate feedback on the new functionality.
#28
I am at work at lunch, but I get IDAT errors on any PNG's unless I convert to 8bit.
I am using the default template build which still has RAW as an option. Should I try recompiling?
If not, can I send you the PNG I created for the above that would not work. Heightmaps are not my strong area..
07/02/2009 (9:03 am)
Tom,I am at work at lunch, but I get IDAT errors on any PNG's unless I convert to 8bit.
I am using the default template build which still has RAW as an option. Should I try recompiling?
If not, can I send you the PNG I created for the above that would not work. Heightmaps are not my strong area..
#29
07/02/2009 (11:55 am)
@Randy - Email me that PNG and i'll take a look at it.
#30
07/02/2009 (1:42 pm)
On its way.....
#31


If it's any consolation, I am able to import 24/32 bit .PNGs, but they do the same thing. I'm sure I'm doing somethin' wrong! =)
07/03/2009 (8:40 pm)
OK, here's what I'm getting with a heightmap that worked fine in B1:

If it's any consolation, I am able to import 24/32 bit .PNGs, but they do the same thing. I'm sure I'm doing somethin' wrong! =)
#32
07/03/2009 (9:28 pm)
@Alan - I think that is another bug and not really an issue with the heightmap... is it really flat?
#33
I have since generated a new heightmap and so far I think I have a solution, so no need to worry on the file I sent. Will post results this weekend.
07/03/2009 (9:40 pm)
@Tom,I have since generated a new heightmap and so far I think I have a solution, so no need to worry on the file I sent. Will post results this weekend.
#34
I think it might be a smoothing thing/actual png quality issue? If I hit it with the smoothing tool it eliminates it. I'll experiment some more, haven't had a chance to do to much with B3, and the money I'd set aside for a new video card went into my youngest sons computer (bad motherboard). So I'm another few weeks out from a card that can actually run T3D! =)
07/03/2009 (9:49 pm)
It is realatively flat, but if I monkey with the square size either direction (at 4 here) it still does the same thing. I think it might be a smoothing thing/actual png quality issue? If I hit it with the smoothing tool it eliminates it. I'll experiment some more, haven't had a chance to do to much with B3, and the money I'd set aside for a new video card went into my youngest sons computer (bad motherboard). So I'm another few weeks out from a card that can actually run T3D! =)
Associate Logan Foster
perPixel Studios
I would highly recommend that you guys generate the 16-bit image from whatever program you are using to create the heightmaps if this is an option. Why? Well simply converting an 8-bit to 16-bit image you don't get that same range of data that you do from rendering it to 16-bit right off the get go, you are simply telling the image that you can potentially have more of a value range the color information in the image remains pretty much exactly the same and as such you will get a jagged result when you import the data (better than 8 bit but not much in my experiance). True 16-bit data only will come if the data is actually generated in 16-bits.
I hope that helps you guys generate better heightmaps that will be easier to get into T3D and use.