Page 5 of 18
Re: mapconv
Posted: 05 Feb 2008, 17:07
by user
no the tile comparison is for every 32x32.
and -r -u will be optional at 0.8.
the tiles look like that when using rescaling,
Re: mapconv
Posted: 05 Feb 2008, 17:10
by Argh
Oh, it's because it's being rescaled?
Is there any way to shut off the rescaling then? I really love having a map that doesn't have ugly lines on it... it's just the tiling problem that keeps me from using this.
Re: mapconv
Posted: 05 Feb 2008, 17:16
by user
wait a few minutes, 0.8 is almost done, just needs a few tests, it doesnt requires -r -u,
it was really easy to fix.
Re: mapconv
Posted: 05 Feb 2008, 17:17
by Argh
Great!

Re: mapconv
Posted: 05 Feb 2008, 18:37
by user
Re: mapconv
Posted: 05 Feb 2008, 18:44
by Argh
Sweet, I'll test it immediately.
Re: mapconv
Posted: 05 Feb 2008, 18:57
by Argh
Still doesn't work. With the following settings:
Code: Select all
mapconv.exe -x 101 -n 100 -m metal.png -a height.png -t terrain.png -f feature.png -c 0.5 -o mapname.smf -q 100
I got a 38MB SMT, and the following results:

Same problem. It's not the rescaling. I really don't think it's the tile detection code, either.
I think it is something in the tile-placement code. Lemme go look at MapConv's source for a minute, maybe I can help...
Re: mapconv
Posted: 05 Feb 2008, 19:03
by user
if you want to look at the source, i will post a new patch, but i think its a texcompress issue, the mipmaps generated by it.
it uses cubic interpolation for rescaling.
Re: mapconv
Posted: 05 Feb 2008, 19:05
by Argh
Oh, so we're looking at the wrong mipmap level, then? The size of the sub-pixels within each tile look the right size, though... I was going to look at tilehandler.h...
Re: mapconv
Posted: 05 Feb 2008, 19:08
by user
tilehandler.cpp contains the functions, tilehandler.h is only function definitions.
go look at texcompress-nogui.cpp there you will see what i mean.
Re: mapconv
Posted: 05 Feb 2008, 19:12
by Argh
I don't have texcompress-nogui.cpp, is it in Spring somewhere?
Re: mapconv
Posted: 05 Feb 2008, 19:15
by user
get the patch from page 4, and i mean texcompress nogui.cpp
Re: mapconv
Posted: 05 Feb 2008, 19:27
by Argh
Hrmm. Did you mean to forget the following line?
Your code, CTileHandler::ProcessTiles:
Code: Select all
meanThreshold=(int)(2000*compressFactor);
meanDirThreshold=(int)(20000*compressFactor);
Old MapConv code:
Code: Select all
meanThreshold=(int)(2000*compressFactor);
meanDirThreshold=(int)(20000*compressFactor);
borderThreshold=(int)(80000*compressFactor);
You lost that line referring to borderThreshold, looks like. I'm surprised it doesn't crash then, but it probably defaults to 80000 if it hasn't gotten a value yet...
I dunno, maybe I'm just reading the patch wrong.
Re: mapconv
Posted: 05 Feb 2008, 19:31
by Argh
Also, I see what you're doing here, in the DDS Gimp plugin code:
Code: Select all
- int internal = GL_COMPRESSED_RGBA_S3TC_DXT1_EXT;
+ int internal = 0x83F1;
Lemme look at that... I assume you're using that, because of the problems you reported earlier?
Re: mapconv
Posted: 05 Feb 2008, 19:40
by Argh
Also, why use DXT1? I see nothing in the code that prevents us from using DXT3(which would result in better color fidelity, among other things)... and isn't there an argument that has to be passed, to tell it to use the maximum number of mips? I'm not seeing any, but I don't have the source for the TexCompress tool.
GL_COMPRESSED_RGBA_S3TC_DXT3_EXT
Re: mapconv
Posted: 05 Feb 2008, 19:45
by Argh
What happens, if you switch to DXT3, and remove this stuff?
Code: Select all
+
scale_image_cubic(dst + offset, w, h, src, width, height, bpp);
+
+ iluBlurGaussian(5);
Re: mapconv
Posted: 05 Feb 2008, 19:48
by user
Code: Select all
meanThreshold=(int)(2000*compressFactor);
meanDirThreshold=(int)(20000*compressFactor);
borderThreshold=(int)(80000*compressFactor);
this is in my tilehandler.cpp file.
i havent lost it, maybe its a problem with the patch i made.
no texcompress always used that, and i didnt knew spring suports maps using dxt3, and dxt3 compression is really good.
without scale image cubic, the mipmaps wont get rescaled, they will all have the same size, and the ILU blur can be removed.
Re: mapconv
Posted: 05 Feb 2008, 19:51
by user
going to look at svn source, to see if it really suports dxt3,
because at the mapfile.h there is this line:
Code: Select all
int compressionType; //must be 1=dxt1 for now
Re: mapconv
Posted: 05 Feb 2008, 19:52
by Argh
I think that's and old comment- Spring didn't always support all of the DXT levels, before DevIL was used. And, meh, the worst thing is that it just doesn't work and crashes Spring, right?
Re: mapconv
Posted: 05 Feb 2008, 19:59
by user
i once used skyboxes compressed in dxt5, so i think it really does,
and at mapfile.h, it says that maps can have more than 1 smt, and
that tiles have 4 mipmap levels.