Warcraft III resources & community, 2003–2006 · archived

Terrain

3.29 / 5 (7)
Submitted by DarkLordGraphic Tools1,531 downloads1.0 MB
This tool can convert a heighmap (tga) into a warcraft terrain (w3e). Maby it is usefull for big maps, because it's faster then the editor. It's open source so the source code is included. (Use SFmpq and cxImagelib.)
Have fun,
.:DarkLord
Author
DarkLord
Version
1.0
OS
WX
Download

Comments

27
i think it only works in lodrean summer...i tried it like 20 times usin a map in ashenvale exactly word for word how to and it didnt work and i tried it in Lodrean Summer and it worked fine...
For those of you that are missing DLLs, do a search on google and download them. You can find installation instructions for DLL files there as well.

For those of you that don't understand what a heightmap is--obviously, this tool will be of little use to you. The explanation that gadax gave is about as good as it gets.



The purpose is this tool is that the WE doesn't allow you to create steep terrain. Normally, you'd use the tools under the "Apply Height" section to raise and lower the terrain, but the WE forces it to be a gradual, more realistic effect. So if you want steep terrain, you have to use a 3rd party program like this one.

To demonstrate the effectiveness, I took a class image of a ying-yang. Heightmaps work on shades of gray, and ying-yangs are traditionally black and white. I decided a good resolution for the map would be 128x128, so I resized the image to be 129x129 and saved it as a targa.

http://www.raevan.org/wc3terrain/yingyang.jpg
Download the TGA

So once I had that saved as a targa and a new 128x128 map created, I used the tool to supply the paths to the two files and generated an Environment file (war3map.w3e).

Then I used WinMPQ to open the map file (*.w3x), deleted the (attributes) file, and dragged my new war3map.w3e file into the archive to overwrite the old one. Then I closed WinMPQ and opened the map in the WE.

This is bird's eye view of the new terrain. You can see how well it matches the ying-yang heightmap.
http://www.raevan.org/wc3terrain/wc3terrain_yingyang.jpg

Next, I angled the camera down and got a shot from the side to present how the height map works in 3D. Since my height map is pure black and white, there are only two levels of terrain. Everywhere that the image was white is very high, and where it was black is very low. You can use shades of gray in your own experiments in order to lessen the extremes.
http://www.raevan.org/wc3terrain/wc3terrain_heightmap.jpg

Finally, to demonstrate the benefits of this over using the cliff tool, I added a bit of terrain to this circular pocket. You'll notice a few things here:
1) The variation between high and low terrain is significantly greater than can be achieved through the cliff tool.
2) I'm no longer limited to using one of two types of terrain on my cliffs--they can be any available terrain and those terrains can even touch each other.
3) The edges are a near perfect circle. Using normal cliffs, you're forced to apply the height on a tiled pattern which makes it impossible to create curved edges.
http://www.raevan.org/wc3terrain/wc3terrain_terrainedcliffs.jpg

I should note for all the newbies out there that, since the game does view this as a deformation of the terrain and not a cliff, the game will allow ground units to walk up and down them as freely (and quickly) as over normal terrain. The easiest way to prevent this is to use ground pathing blockers (in the doodad pallette) at the bottom and top of each cliff.
please make this tool with map sizes from WEU.
doesnt work on xp, says missing dl or some file. I restarted the comp and still no work
ok i saw that map and all i did undestand is that tool lets you make more than 2 up whit out largening the cliffs
Ok, I'm sorry if you can't understand what this tool does. At this moment I'm writing a short howto with pictures and examples.

But does somebody knows the UT2004-Editor? This editor works with heightmaps, too. So my tools changes the terrain height - not the skin or something.
So I used this and I saw it only does cliffs? Aw that's kinda dumb, no offence. I tohught it made the pic you put in. Well... what can this serve for may i ask?
so... nobody has got it to work except for the guy with the picture of random cliffs? sounds pretty crappy by the sounds of it (no offense). Doesnt really make sense, seems the took is just spam, you dont even give proper directions just "this only works for tft but iono" you dont even explain HOW

A: Pixels = cliffs = useless
B: Takes a screenshot of entire map and puts it in a tga file
C: Does nothing

hmm ill pick C
sqqiii :cry: :cry: :cry: it is not working it sais it needs an .dll file somting abute MSVC71... hwat too doo.
Well, the editor can do this to, but Blizzard had include a blur-function, so you can't make this kind of cliffs. :wink: You will see what I mean if you edit your cliffs with the height-brush. :)
I have stressed in about 1 month now, and I finally made it! Your tool rock, man! It's so usefull. It makes straight downward cliffs, that I didn't know how to do, and now I only have to use this tool! If I use this tool to make a map terrain, I will give mass credits.

Here is the map I tested it on:
I only used this tool to make the terrain.

http://img34.echo.cx/img34/7775/showoff9cz.th.jpg
Well, it works but if I open the map with the WE there is another problem, the editor gets a error (windows-message) and close the window. :? I maybe upload the new source code, even if I finding the bug. :wink:
There's an easy solution for this:

Make your tool delete the (attributes) file from the map and it will work. (this file is not needed anyway, it just contains a checksum)
Ok, I explain it to you PitzerMike. My tool import all file, there is no problem. If I want to open the map with the WE I get an error, "File Data currpt!" or something. But if I open the map with WinMPQ, this tool gets no error, and add/edit the map (add a txt file or something) I can open the map with the WE. I think there is a problem with the compression, but I don'f find the bug.
And thx to gadax for his explaining.
hi all this is my first message on this forum.
I'm french, so sorry for english mistakes.
A height map, also known as heightfield, is generally in 3D programs a way for modelling a landscape.
It is very powerful, because you only need to paint a 2D picture with a grey scale and each grey level will be converted into a specific height by the 3D program. The lighter the color is the higher the point of the map is.
The conversion is done here by the DarkLord tool, i think. It looks very powerful for sparing time in original map making, i will try it as soon as i can.
:)
I know both languages. I might look into it if you explain what the problem is.
I have a function like this in the CMapTerrain-Class, but there is a bug and I can't find it. Have you looked at the source code? BTW. Do you code VB .Net or C++?
you should probably make your tool automatically import the new w3e into the map overwriting the old one (if you know how to use SFmpq.dll)
Hm.. do you use Winrar? Just use google.com an search for it. :wink:
this tool sounds very very useful, but it says the zip file is empty when i try to extract the files. :(

If you draw out your map you could get it exactly as you want it.
Here aren't any terrainer's that can use this tool? :?
Too much work and too many programs are involved in this conversion. Why do I need to find the "war3map.w3e" In winmpq?how do I know if the slopes are in the angle? I think it’s easier to create a new map then fix a pre made map.
Hm.. ok I descripe how you use this tool. Ok, it's beta but if you know what you have to do, it's easy. :wink:
Lets start:
1. Just make a map with the editor.
2. Save the map. :wink:
3. Open Gimp/Photo shop or someting and make a new image. The height (width) must be height (width) of the map + 1 Pixel. Make the backgrund black and draw your terrain with a light-tool, as lighter as heighter (as darker as lower).
4. Save the image to a TGA-File.
5. Open the tool.
6. Load the tga and the map.
7. Press the "Convert"-Button an save the w3e-file.
8. Open your map with WinMPQ.
9. Delete the "war3map.w3e".
10. Add the converted w3e-file (step 7).
11. Rename the file to "war3map.w3e".
12. Close WinMPQ.
13. Open your map with the editor and place your units etc....

I'll make some examplets for you.
:S ^^
I dont understand what make this tool and i dont know what a heighmap.
More description is needed!
I agree... this needs a better discription
Lets see here:
Noobs comment - "What the **** does this thing do? I don't know what a heighmap is!"
Intermediate comment - "Hmmm, this tool makes no sense to me... what does it do?"
Pro comment - "Well this thing is so useful! It can be used so easily! 5 stars!!!"

My comment: "I don't understand this, I am an intermediate mapmaker. Add some more description so noobs and people like me will be able to understand. What is a heighmap?"

That's what I think all the people would say.
But in my opinion, if I knew what this thing did, it'd be really good. So 3/5... for now :wink: .