PDA

View Full Version : Open from TGA/hightmap > This is a question.


Mattikai
05-01-2007, 07:26 AM
Hi!.

I have been attempting to use a hightmap program to make maps from the TGA's that i can export.

i cant seem to get it right. is there a tutorial for WB for this?

thanks!

~Kai

Mael!
05-01-2007, 08:23 AM
I was messing with it the other day. It basically takes in grayscale 24bit tgas & uses them to generate height for the map.

The resolution of the tga corresponds directly to the size of the map (pixels = feet)

white = about 950feet high!
black = 0 feet
grey = somewhere in between :D

to get the best results, make sure to blur any height map tgas prior to importing them (i used a gaussian blur on power 5 in photoshop for this) otherwise you will end up with very messed up heights. Worldbuilder auto smooths the area between pixels/cells.

May put up a tutorial on this later...

The import/export raw heightmap feature seems to be for copying heightmaps between c&c3 levels (not sure how to edit the raw data using an external application)

spyVspy
05-01-2007, 12:09 PM
I've used "open from TGA..." to import a height map. The pixel size of the tga file is the map size it will create in Worldbuilder, but you need to resize it and add a border of 50 tiles. I found that black is lowest and white is highest.

From a test I did I found that RGB 30,30,30 gives a height of 112.5
RGB 70,70,70 gives a height of 262.5, and RGB 100,100,100 gives 375.

375 is very high for a map, so your image should fall under RGB 100,100,100 mostly. If you use photoshop, it helps to reduce the brightness of the overall image, and check it in various places with the eyedropper to see how high it goes.

After importing you need to smooth cliff faces to avoid stretched textures, and make sure base areas are nice and flat for building.

TIP: If your map has a lot of high elevations, you need to adjust the camera min and max settings, or the ground will be too close when you play it.

M2M
05-02-2007, 11:05 AM
question: why would anyone want to import hightmaps?... besides, what is the exact use? easy porting maps from other games into worldbuilder, or scanning your sketch and having an easy place to start?

Mattikai
05-02-2007, 06:50 PM
Thanks for the responses. I will test out some things. :)

hightmaps help with getting the "annoying" work done (like painting a map full of a certain higth, etc). and lets you make intricate and custom designs for your landscape.

M2M
05-03-2007, 08:06 AM
Thanks for the responses. I will test out some things. :)

hightmaps help with getting the "annoying" work done (like painting a map full of a certain higth, etc). and lets you make intricate and custom designs for your landscape.

mmm thought so, but I do not believe that it is anoying work, it will get your mind some new and bright ideas for the map if you do it the slow and old fashioned way (if you know what I mean)

sominus
05-28-2007, 08:58 AM
Actually I would like to know about this too. I want to generate the terrain in an external App (Terragen Lite) and save it as RAW. The error I get when importing is something like "image size error". What should be the size of the RAW file? (I remember in FarCry, the RAW had to be the same size of you map, lets say "300x300 your map, 300x300px you raw image".

Why? Because this way I can get very random unsymetrical lands for a start, then refine the terrain from there. Symetrical maps, after you play them 5 times, they get repetitive, 'cause you dont have too many "alternative ways to get it done".

PS: I'm a "team-coop against the hard AI" maps player.

UPDATE:
I've made a test using TGA files instead of RAW. As you can see the bitmat has to be quite dark like spyVspy said.
The other screenshot is what you get in WB importing that file. A good thing would be to fine tune the bitmap in photoshop prior to importing, I mean, "painting" roads with a black brush, and stuff like that.
Of course using some heightmap generator like Terragen or Bryce would make it look more natural.

You can try open this pic, save it and convert it to TGA 24b then import it in WB (is fast).
http://img217.imageshack.us/img217/6467/map1tgajpgjy5.th.jpg (http://img217.imageshack.us/my.php?image=map1tgajpgjy5.jpg)

This is what you get in WB from that pic:
http://img234.imageshack.us/img234/6509/mapfromtga1afm6.th.jpg (http://img234.imageshack.us/my.php?image=mapfromtga1afm6.jpg)