The trick to get it to compile under visual studio is to disable precompiled headers.
I noticed quite a few interesting things;
Metal map shouldnt be the same size as heightmap, it should be (heightmap-1)/2 -the same size as the typemap- because otherwise it gets rescaled.
Mapconv calculates the size of the map from the texturemap only, and nothing else. It will resize the height, metal and typemaps according to the texture map. Feature map must be of the correct size (heightmap-1) because that uses pixel values.
Mapconv has support for variable tree size and tree placement rotation built in, but spring doesnt read these variables yet.
Every map compiled with mapconv has variable default tree size, but spring doesnt read this info in the featurehandler.
Also, random rotation is supported, but not by the engine
Code: Select all
MapFeatureStruct ffs;
ffs.featureType=t_type;
ffs.relativeSize=0.8f+float(rand())/RAND_MAX*0.4f;
ffs.rotation=0;
ffs.xpos=(float)startx+x*8+4;
ffs.ypos=0;
ffs.zpos=(float)starty+y*8+4;
You can clearly see dark and light colored strips of terrain very close to each other. So when this is compressed into dds files, the mipmaps are interpolated from non neighbouring areas, thus resulting in scanlines. The only way to combat this is to use a box filter in the compression tool, since this equates to mipmaps made with nearest neighbour filtering.
This is highly sub optimal, since it results in ugly mip levels, as there are much better filters around for making mipmaps.
Also, im having trouble getting my own compiled mapconv to work on 32*32 maps, since it runs out of memory on texture, and cant allocate itself 1gb