What graphics file format should be used for "Height ma

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
Post Reply
User avatar
semicolon
Halfling
Posts: 94
Joined: Sun Jul 04, 2004 4:42 pm
Location: Bangkok, Thailand
Contact:

What graphics file format should be used for "Height ma

Post by semicolon »

Hi There,

I have been busy working on a game for a while. But I still have a question about Height map. As the subject said, which graphics file format should I use that is best suited for the "Height map"? And if so, what are the technical reason or comparative advantage behind the chosen one?

So far I have seen a lot of 3D terrain generating softwares out there that are using RAW for height map. Is this the best format for this use?

Thank you very much,
Semicolon
"Nature is the mother of learning"
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

png or tga, as those support 16 bit greyscale images
User avatar
NeOmega
Halfling
Posts: 86
Joined: Mon Apr 04, 2005 2:30 am
Location: Washington State, USA

Post by NeOmega »

Blender has a script called "truedisplace" that makes a heightmap on a mesh.

It requires a .tga grayscale image saved in uncompressed format. Can be saved correctly in the Gimp, but not Paint Shop Pro 9. (I don't know about Photoshop).

I only mention this because:

1) I think the heightmaps I have made in Blender would be directly transferrable to OGRE

and

2) They are required to be uncompressed. I think this has something to do with every pixel needing to be defined on it's own.
User avatar
Occulis
Halfling
Posts: 91
Joined: Tue Mar 29, 2005 7:29 pm
Location: Houston, TX
Contact:

Post by Occulis »

NeOmega wrote:Blender has a script called "truedisplace" that makes a heightmap on a mesh.
Does this mean a heightmap is used in a manner similar to a bumpmap? Or are they synonymous in what you're saying?
User avatar
NeOmega
Halfling
Posts: 86
Joined: Mon Apr 04, 2005 2:30 am
Location: Washington State, USA

Post by NeOmega »

Occulis wrote:
NeOmega wrote:Blender has a script called "truedisplace" that makes a heightmap on a mesh.
Does this mean a heightmap is used in a manner similar to a bumpmap? Or are they synonymous in what you're saying?
No... it's not a bump map, it uses an uncompressed grayscale image in .tga format to actually deform the mesh. I have made an entire linkable hill (nearly seamless) hex-tile set with this tool. And probably could make a mountain set of 66 more tiles in about 3 hours with it, now that I have the workflow down.

The nice thing is, not only do I have the meshes, I also have heightmaps. :)
(allthough, unfortunately, I made them with black as ground level, so things like river beds or canyons would require re-doing them, which I am considering.)

Playing with normal maps, I can subsurface them, and make these tiles smooth out really well, and still maintain the 282 face count.... I think.
User avatar
Occulis
Halfling
Posts: 91
Joined: Tue Mar 29, 2005 7:29 pm
Location: Houston, TX
Contact:

Post by Occulis »

Wow, that's what I was hoping you would say. I bet there are all sorts of interesting things you can do with this.
User avatar
NeOmega
Halfling
Posts: 86
Joined: Mon Apr 04, 2005 2:30 am
Location: Washington State, USA

Post by NeOmega »

Occulis wrote:Wow, that's what I was hoping you would say. I bet there are all sorts of interesting things you can do with this.
Most definitely. There is another script in the works for photoclinometry (converting a b/w photo to a raised mesh)


truedisplace:
http://www.dedalo-3d.com/index.php?file ... orial.html

I had to re-install the gimp, something I didn't want to do, but it was worth it.
There are lots of terrain generator, but none of them have actual control like this one... most are noise based.
User avatar
semicolon
Halfling
Posts: 94
Joined: Sun Jul 04, 2004 4:42 pm
Location: Bangkok, Thailand
Contact:

Post by semicolon »

:wumpus: wrote:png or tga, as those support 16 bit greyscale images
Hi everyone,

Thanks a lot for giving me the information. By the way as :wumpus: said, it means 16-bit PNG or TGA is better than 8-bit in the same format, doesn't it? Well sorry for being too curious. :D

Thanks a lot,
Semicolon
"Nature is the mother of learning"
User avatar
Kentamanos
Minaton
Posts: 980
Joined: Sat Aug 07, 2004 12:08 am
Location: Dallas, TX

Post by Kentamanos »

semicolon wrote:By the way as :wumpus: said, it means 16-bit PNG or TGA is better than 8-bit in the same format, doesn't it?
Not sure if you're asking what I think you are, but just in case...

8-bit means you can only have 8-bits worth of data (256 shades of gray, or 256 elevations). 16-bit means you can have 16-bits worth of data (65536 shades of gray, or 65536 elevations).

This gives you more "resolution" essentially, which makes your landscape closer to representing reality.
User avatar
semicolon
Halfling
Posts: 94
Joined: Sun Jul 04, 2004 4:42 pm
Location: Bangkok, Thailand
Contact:

Post by semicolon »

Thanks a lot for the clues. I couldn't create 16-bit grayscale Targa format, but I could do it with PNG format and RAW. (Using Photoshop 8) Then I think I will use 16-bit Grayscale PNG for the Heightmap for now. Well I saw 32-bit Grayscale of RAW format. If the bit-depth does matter, this format is supposed to do well also, isn't it?

Semicolon
"Nature is the mother of learning"
User avatar
Kentamanos
Minaton
Posts: 980
Joined: Sat Aug 07, 2004 12:08 am
Location: Dallas, TX

Post by Kentamanos »

semicolon wrote:Thanks a lot for the clues. I couldn't create 16-bit grayscale Targa format, but I could do it with PNG format and RAW. (Using Photoshop 8) Then I think I will use 16-bit Grayscale PNG for the Heightmap for now. Well I saw 32-bit Grayscale of RAW format. If the bit-depth does matter, this format is supposed to do well also, isn't it?

Semicolon
Whatever you're using would also have to support the 32-bit images as well. 32-bit is probably overkill though. 256 levels is probably not enough, but 4 billion (32-bit) might be more than you need ;).
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

I noticed that the download link for truedisplace is down.
If any of you have it sitting on your computer, I would appreciate if you sent it to me! Would be awesome if you did. :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
Post Reply