Thursday, May 24, 2012

Making a 16bit height map without Photoshop

I have been asked many times how to make a height map for Skyrim without using Photoshop. Unfortionally Gimp 2.8 do not support 16 bit images that are needed to make a height map and I have been trying to find some other program to do this with, and also make raw files that TesAnnwyn can read.
A solution it seams is a good but ugly program I used to work with called ImageJ. It is a Java program developed for scientific image analysis, and I used to measure root growth of mutant Arabidopsis with it. But it can also do what I need for Skyrim world creation, and it is free :)

Work flow


First make the height map in Gimp, save as 8 bit Tiff (see previous post for some guidelines)
Download ImageJ.
Open in ImageJ, change to 16 bit under Image -> Type, save as RAW.
Import the RAW image of the height map in GeoControl, under Generatio -> Terrain Import -> "Raw (16bit) from Carrara".
 
After you run the filters and have a terrain you like, export as a 16 bit RAW file.

To make the esp run TESAnnwyn, and because the image is to bright you have to use the scaling function. Exactly what scaling factor to use depends on how bright/high your world is, try what works for your world.
TESAnnwyn command line:
TESAnnwyn.exe -i Skyrim -p 1 -b 16 -d 4096x4096 -s 0.2 -x -64 -y -64  -h -22192 -w NameOfWorldspace YourImage.raw
 -i sets the game, -p RAW format, -b 16 bit image, -d size in pixels, -s scales the height range of the image, -x and -y cell offset in x and y directions. (See original post on -h values and the effect on sea levels.)

If anyone have found a better program or solution let me know.
/E


12 comments:

  1. Hey great tutorial, 2 questions though:
    I'm having trouble with geocontrol - how do I pan over my map while keeping it in 3d mode, it keeps reverting to the 2d height map when I touch the render window.

    2nd question:
    Your world is 16384x16384, and max image size for Geocontrol is 4096x4096. So I assume you cut your height map into sections then edited them back together in photoshop after running each image through Geocontrol? Does that work ok or is it a lot of work to line up the images again?

    Thanks in advance, thanks for your tutorials and thanks for showing me geocontrol, its a nifty bit of software!

    ReplyDelete
  2. Actually, went back to the first post in the blog and found my answer to the second question. These are really great tutorials! Thanks very much for taking the time to make them!

    ReplyDelete
  3. Why not just create the terrain directly in GC2? The isolines tool is really easy to use, and you can mess around with shapes without having to import it to two different programs every time you change something.

    ReplyDelete
    Replies
    1. Well that is of course a good idea. This is for when you think you already made a nice height map with Gimp, and don't want to remake everything :)
      If I had not already drawn up my 16384 x 16384 image that I used to make my height map I would have done it in GeoControl directly, but I was to lazy to start over again...

      There are some very nice tutorials at the GeoControl homepage on how to get started with isolines and other things.
      http://www.cajomi.de/Forum/forumdisplay.php?f=49

      Delete
    2. Makes sense :)
      Is there a particular reason for transforming the image into RAW? Doesn't GeoControl also accept greyscale BMPs, which can be exported directly from GIMP? ( I haven't used the import fuction much, so I do't know if there's some issue with that.)

      Delete
    3. Can Gimp export 16bit BMP?
      Any way to do it is good as long as you get a nice 16 bit raw to run in TESAnnwyn in the end.

      Delete
    4. True.
      Anyway, thanks for the blog. It's been really helpful in understanding the arcane art that is importing maps in Skyrim :)

      Delete
    5. So I've been experimenting with GC2 some more, and apparently using height values between 0% (dark blue in the gradient shader) and 24% (an apple green) results in a heightmap with a 76%-100% gray range. Of course, with the default terrain settings this results in a really flat looking terrain, but luckily changing the height and width sliders doesn't seem to have an impact on the heighmap itself, and allows for a more prominent relief in 3d view. The various filter power settings would of course need adjusting to create a more realistic world.
      For those who already have a/want to draw a heightmap, I'd honestly recommend just getting the 30 day Photoshop trial and following Bisen's other tutorial, since the scale in TESAnnwyn method doesn't seem to be working all that well.
      L3DT (comes with a 90 day trial) also seems to be popular with some modders, but I don't know much about that program.
      Anyway, I hope this info might be helpful to someone. Later.

      Delete
  4. I give up. I've tried it over FIFTY times today but I can't get the blasted RAW stuff working. No matter what I do, I get either insane spikes or an almost flat terrain where there should be mountains. I've tried RAW and BMP, I've done 8 and 16 bit, I've downloaded everything from GeoControl2 to ImageJ and still it doesn't work. :(

    ReplyDelete
    Replies
    1. You want me to take a look at your files?

      Delete
    2. I have had a problem similar to this, some areas of the terrain are like huge steps and others worse, with gaps and vertical jagged spikes in rows like claws, I have only tried it once though and will look and creating a worldspace a different way or perhaps editing the tesannwyn values.

      Delete
  5. i have made a heightmap i'm very happy with, and GIMP now supports 16-bit raw.
    because my map is made from discreet shades of grey, it is possible to just
    select by colour each shade and replace with a new one. what range should i use?
    [please use hex values for grey, since the percent notation causes much chaos,
    at least as far as all the other forums and tutorials on the subject have shown]

    ReplyDelete