• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Making a map from a picture file

Status
Not open for further replies.
Level 4
Joined
Dec 19, 2015
Messages
52
Is there any way to take a height map or a tga file and turn it into a very general wc3 map terrain? I remember seeing something about it, preferably the tga method. maybe via a mpq editor or something.

 
Level 4
Joined
Dec 19, 2015
Messages
52
is that for the height map? I want to use the tga picture that I have made and turn it into wc3 terrain of a different size/scale. What is a w3e library? I googled the term but couldn't find much of anything.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
is that for the height map?
The image was a demonstration of converting my avatar into a height map for water.

What is a w3e library?
A program library that can manipulate the w3e file of Warcraft III maps. The w3e file is the terrain mesh file, which contains all the details of the terrain mesh the map uses.
 
Level 4
Joined
Dec 19, 2015
Messages
52
are there any public programs that I could use to achieve this? I am looking to turn the picture that I have into a world editor map? even just the grass and water would make it 100x easier to cointinue with the project.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
There are some buggy ones with little documentation.

However I can give you my JAVA library if you want. Using that you can hack together a program which can do anything to w3e files.

You could also send me the image and explain its meaning and I could perform the conversion. If you decide to do this it is important that you are very clear as to what the component values mean. For example the height of black, white and if the colour space is linear or sRGB.
 

EdgeOfChaos

E

EdgeOfChaos

oO
Could you please post your java library? I definitely want to see that.
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,285
Could you please post your java library? I definitely want to see that.
Here but it is the same one I have posted multiple times before. It also is the second one I wrote, after deciding to completely change how I/O worked for the third or fourth time.

It works like a standard ObjectStream. The W3E file is a file which contains a single object, TerrainMesh. This covers everything to do with WC3 terrain mesh, and features many useful constants and static conversions for manipulating it with. Needs Java 8 as it uses the recently added lambdas and other functional features to help process areas of the terrain mesh (not too happy with how I implemented this).

Depending when this was snapshotted, it may feature part of my BLP decoder, however that is still very much a WIP as much had to be rewritten after finding out more detailed BLP mechanics.
 
Status
Not open for further replies.
Top