Mothers mapconv no scanlines fixed! DOWNLOAD MAPCONV HERE

Mothers mapconv no scanlines fixed! DOWNLOAD MAPCONV HERE

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

Moderator: Moderators

Post Reply
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Mothers mapconv no scanlines fixed! DOWNLOAD MAPCONV HERE

Post by Beherith »

As you may know, Ive had real trouble using users mapconv, getting very inconsistent results, and even when it succeeded, I got scan lines on it.
So I checked out the old version of mapconv from svn to try and and see where the trouble was. It turns out that mapconv uses an outdated set of parameters for nvdxt, that were hard coded. Unfortunately I was not able to recompile it from the svn source, as several files were missing and it required some funky old boost lib I counldnt get :(

So I tried the next closest thing; I wrote a tiny program that masquerades as nvdxt, and forwards the call to it from mapconv, with setable parameters.

My bit of code is named nvdxt.exe, and I renamed the real nvdxt.exe to nvdxt2.exe. This way, i can forward this call: nvdxt2.exe -file temp\*.bmp -nmips 5 -dxt1 -box -fadeamount 0 . Which results in a complete lack of scanlines. Beware, this is the default line and is set to high quailty, so it will be slower than previous compilings.

Also included is the latest version of nvdia's nvdxt.

Usage:
Download it here from jobjol:

http://spring.jobjol.nl/show_file.php?id=1745

To install, unzip the contents to the dir where you use mapconv.
Then just run your compilation .bat file as normal.
To change nvdxt options, create an nvargs.txt file next to nvdxt, and add the line you want it to use for compiling.
Last edited by Beherith on 23 Jun 2009, 03:39, edited 1 time in total.
BaNa
Posts: 1562
Joined: 09 Sep 2007, 21:05

Re: Mothers mapconv no scanlines fixed!

Post by BaNa »

Gj man, im kind of miffed noone replied to this yet >_>

I may recompile some of my older maps if i can find the sources
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Mothers mapconv no scanlines fixed!

Post by Beherith »

Here is the source code for the wrapper:

Code: Select all

#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
#include <cstring> 

int main(int argc, char* argv[])
{
	//printf("Opening file nvargs.txt");
	bool minimap=false;
	char * buff;
	buff="nvdxt2.exe -file temp\\*.bmp -nmips 5 -dxt1 -box -fadeamount 0";
	if (argc>3) {
		if (strcmp(argv[2],"mini.bmp")==0) minimap=true;
		else{
			FILE * f=fopen("nvargs.txt","r");
			if (f!=NULL) {
				printf("Opened file nvargs.txt, using options set theirin\n");
				buff = new char[255];
				fgets(buff, 250,f);
				fclose(f);
			}
			else{
				printf("Failed to open NVARGS.TXT, using default arguments:\nnvdxt2.exe -file temp\\*.bmp -nmips 5 -dxt1 -box -fadeamount 0\n ");
			
			}
		}
	}else{
		printf("Usage:\n  Rename original nvdxt.exe to nvdxt2.exe and add your nvdxt command line to nvargs.txt \n Default nvargs are:\n  nvdxt2.exe -file temp\*.bmp -nmips 5 -dxt1 -box -fadeamount 0\n");
		return 0;
	}
	printf("Executing:");
	if (minimap== false){
		printf("%s \n",buff);
		system(buff);
	}
	else{ 
		printf("nvdxt2.exe -file mini.bmp -dxt1a");
		system("nvdxt2.exe -file mini.bmp -dxt1a");
	}
	return 0;
}

User avatar
Hoi
Posts: 2917
Joined: 13 May 2008, 16:51

Re: Mothers mapconv no scanlines fixed!

Post by Hoi »

This need to be a sticky.
User avatar
SwiftSpear
Classic Community Lead
Posts: 7287
Joined: 12 Aug 2005, 09:29

Re: Mothers mapconv no scanlines fixed!

Post by SwiftSpear »

ASDFASASEF

Frigging awesome!
User avatar
MidKnight
Posts: 2652
Joined: 10 Sep 2008, 03:11

Re: Mothers mapconv no scanlines fixed!

Post by MidKnight »

Image
(clickity)

Ahem?

I compiled this with your wrapper, but I still have scanlines. Why? :(
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Mothers mapconv no scanlines fixed!

Post by Beherith »

Thats quite odd...
Are you sure you overwrote your old nvdxt.exe with mine?
You can check if its compiling with mine in the output of mapconv.

Try deleting nvargs.txt too.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Mothers mapconv no scanlines fixed!

Post by Beherith »

Ah found the cause of your lines, high compression causes it. Set mapconv compression to <0.5
User avatar
lurker
Posts: 3842
Joined: 08 Jan 2007, 06:13

Re: Mothers mapconv no scanlines fixed!

Post by lurker »

How is that possible? The compression setting shouldn't affect the DDS building, right?
prodigy
Posts: 14
Joined: 19 Apr 2009, 04:58

Re: Mothers mapconv no scanlines fixed!

Post by prodigy »

I don't know what causes the scanlines. But I have never seen them when using my mapconv.

Perhaps you could try my mapdeconv, which decompiles SMF/SMT files, and see if the resulting texture.bmp contains the scanlines for your SMF/SMT.

http://code.google.com/p/mapc/
Kloot
Spring Developer
Posts: 1867
Joined: 08 Oct 2006, 16:58

Re: Mothers mapconv no scanlines fixed!

Post by Kloot »

prodigy wrote:I don't know what causes the scanlines.
They are an artefact of nvdxt itself; Linux builds of the old mother/user mapconv (which by default use mother's own texcompress tool to build the DDS textures) never showed them either, nor did versions of mapconv + texcompress cross-compiled from Linux to Windows. (Whether the lines are due to the parameters passed to nvdxt or a bug is open for debate though.)
Last edited by Kloot on 22 Apr 2009, 11:17, edited 1 time in total.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Mothers mapconv no scanlines fixed!

Post by Beherith »

I think they are an artifact of NVDXT, but can be easily fixed by passing a different set of parameters.
prodigy
Posts: 14
Joined: 19 Apr 2009, 04:58

Re: Mothers mapconv no scanlines fixed!

Post by prodigy »

Kloot wrote:
prodigy wrote:I don't know what causes the scanlines.
They are an artefact of nvdxt itself; Linux builds of the old mother/user mapconv (which by default use mother's own texcompress tool to build the DDS textures) never showed them either, nor did versions of mapconv + texcompress cross-compiled from Linux to Windows. (Whether the lines are due to the parameters passed to nvdxt or a bug is open for debate though.)
OK that would explain why I have never seen the lines with my mapconv which I modified to use libsquish instead of nvdxt/texcompress.

Thanks for the info.

edit: Just found this blog entry by the guy who made the nvidia-texture-tools. What is interesting, perhaps not relevant in this case but something to consider:
NVIDIA used to perform the DXT1 interpolation in 16 bits, and in some hardware, to compensate for the quantization artifacts, introduced some dithering patterns that in some cases even worsened the results.

Modern NVIDIA hardware does not have these problems, but it still doesnÔÇÖt implement the palette evaluation using the exact formula.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Mothers mapconv no scanlines fixed!

Post by smoth »

bump.
User avatar
hunterw
Posts: 1838
Joined: 14 May 2006, 12:22

Re: Mothers mapconv no scanlines fixed!

Post by hunterw »

add this to OP:

http://springrts.com/wiki/Maps:Compiling

i got asked 23523523 questions today bout making your .bat file and compiling and how you cant rename your map wtihout it being pink
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Mothers mapconv no scanlines fixed!

Post by Beherith »

Fixed wiki page to show working link to mapconv.
Post Reply

Return to “Map Creation”