mapconv - Page 5

mapconv

Discuss maps & map creation - from concept to execution to the ever elusive release.

Moderator: Moderators

Post Reply
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: mapconv

Post 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,
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: mapconv

Post 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.
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: mapconv

Post 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.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: mapconv

Post by Argh »

Great! :-)
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: mapconv

Post by user »

here is version 0.8:

http://www.unknown-files.net/spring/4038/mapconv08/#

-b -r -u are no more needed.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: mapconv

Post by Argh »

Sweet, I'll test it immediately.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: mapconv

Post 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:

Image

:| 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...
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: mapconv

Post 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.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: mapconv

Post 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...
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: mapconv

Post 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.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: mapconv

Post by Argh »

I don't have texcompress-nogui.cpp, is it in Spring somewhere?
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: mapconv

Post by user »

get the patch from page 4, and i mean texcompress nogui.cpp
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: mapconv

Post 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.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: mapconv

Post 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?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: mapconv

Post 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
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: mapconv

Post 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);
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: mapconv

Post 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.
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: mapconv

Post 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
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Re: mapconv

Post 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?
user
Posts: 452
Joined: 22 Jan 2008, 16:33

Re: mapconv

Post 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.
Post Reply

Return to “Map Creation”