16bit grayscale heightmap

I’ve done some searching and have come up blank for answers. I’m trying to use blender to generate terrains for a game called rigs of rods, I have been able to successfully
make terrains and export them into the game so I have the process down. Except for one problem, the images are all 8bit gray scale, which appears choppy, is quite ugly and frankly, annoying for driving a vehicle on (which is what the game is based on).

so like I said, I’ve done some searching but haven’t been able to find any information, yay or nay, on 16bit grayscale rendering, or even possible solutions. sooo is this possible, or are there any work around or possibilities?

I had the idea of using a blender script to export a 16bit heightmap, but I’m not sure if this is even possible.

Anyways, any direction is appriciated, thanks.

Blender renders everything in 32bit float…although i’m not sure how you create the heightmap.
But for normal render buffers it’s just a matter of you picking the right file format when saving. E.g. save as EXR and use a suitable program to convert to whatever 16bit image format you need…

Upload a .blend file please.

hmm I just tried, it failed. so I uploaded it to my website,you can find it here: http://www.chrisnem.com/rorterrain.blend

note: this file is ~8 MB

Addition:
Thanks for the tip about exr, I compiled blender and imagemagivk with openexr support and now I get 16bit heightmaps!

question though, png and tiff both support 16bits per channel, is there a place to set this as a setting so you can render at a 48 bpp png or tiff?

Not directly from Blender, though I think they should natively save that way.

You’ll need to save in a high dynamic range format such as OpenExr or Radience then convert to 16 bpc in an external imager such as Photoshop or Gimp. If you have Photoshop CS2 download the OpenExr plugin available from Industrial Light and Magic and use it instead. Don’t get rid of the adobe plugin as it allows you to do faster batch processing on your images if you simply need to convert to 16 bpc. Just segregate it into a separate folder until you need it. The ILM plugin allows you correct exposure and gama when the image is imported but you have to approve exch change upon import even when batch processing with this plugin. The Adobe factory installed plugin brings everything in with a gama of 2.2 and labels it as 1.0 which makes for nightmare adjustment scenarios. Adobe has a plugin factory installed for the Radience HDR format also and you can import the image select Image>Mode>16Bits/Channel, then Image>Adjustments>Exposure to correct exposure and gama. If you record this as an action you can can batch process your sequences via File>Automate>Batch. Just peruse the help files if you aren’t familiar with the process yet.

I couldn’t even begin to tell you how to tackle this workflow in Gimp but I think it’s reasonable to assume that you can do it there also. Good luck.

Not from Gimp since it doesn’t support > 8bpc images. You can try Cinepaint though, I think it saves TIFF.

or at least make it an option, maybe a script could do it but, that’s something I’ll leave for someone else.

or just not use gimp, as was pointed out it only supports 8bpc. However Imagemagick does support HDR and 16bpc (maybe even higher…) besides, I can’t use adobe as I’m a linux guy, which Is why I’m working so hard to figure out terrains/height in blender, other wise I’d use some free terrain editing program.

oh since imagemagick is primarily cmd line you can write batch/bash files to automate the process.

Perhaps this post will help you out. I don’t know how this user accomplished this task. All I know is that they used POV-Ray to render some damn impressive results. See post #8 for the result.

http://blenderartists.org/forum/showthread.php?t=83730&highlight=pov

Hmm the height_field in POV combined with fractint sounds interesting, perhaps I’ll look at that further when I want to get into more realisting terrains with river cutout and other kinds of erosion.

so I did take what I learned and wrote up a, hopefully, easy to read tutorial on how to generate a 16 hightmap for our game. if you’re interested you can read the tutorial here: http://wiki.rigsofrods.com/index.php?title=Blender_Terrains