Game Development Community

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?
Page«First 1 2 Next»
#21
05/07/2009 (8:13 am)
I ran into this as well on a 'side' project I am working on for myself. Luckily for me I was generating all my heightmap data as I normally do via 3DS Max so it was a simple matter of telling Max to export the PNG as a 16-bit image.

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.
#22
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
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
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
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.

i60.photobucket.com/albums/h15/kd4vcu/Game/terrain-test.png
#27
07/02/2009 (3:03 am)
Oh... FYI... 24/32bit importing is fixed.

I'd appreciate feedback on the new functionality.
#28
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.
#31
07/03/2009 (8:40 pm)
OK, here's what I'm getting with a heightmap that worked fine in B1:


www.monsterpacks.com/tmp/screenshot_001.png

www.monsterpacks.com/tmp/screenshot_002.png

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
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
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! =)
Page«First 1 2 Next»