Page 1 of 1

[LIGHTING PROBLEM]Problem loading self-made testmap

Posted: 30 Jul 2009, 14:25
by Sindwiller
Hi everybody,

attention, newbie alarm! I've been bored lately so I thoght I'd try out to make a spring map, just for the heck of it. What I did first was to inform myself, using chunks from the three basic map creation tutorials in the wiki for my first steps (#1, #2, #3, awesome progress on the documentation though, the last time I check was maybe a year ago or mroe and there was rarely anything useful for me). Started painting a 513x513 heightmap, tiled a texture onto a 4096x4096 texturemap, painted a few red splats on a 513x513 metalmap, added a few green pixels for geo-vents onto a 512x512 featuremap, created a fully black typemap with the dimensions 256x256, since this map is just for testing purposes, and compiled it using the newest mapconv (I think) with the parameters IceXuick provided in his tutorial, namely

Code: Select all

MapConv -f Features.bmp -i -l -c 0.5 -x 300 -n -150 -o YourMapName.smf -y Typemap.bmp -m Metal.bmp -a Height.bmp -t Texture.bmp
which compiled it without any hassle except that it gave a "missing mini.dds" error and two errors about some 'temp' files missing, however, it shouldn't be fatal, since I read the mini.dds is borked anyway. Copy & pasted the standard .smd file IceXuick provided in the tutorial. Moved the .smf/.smt/.smd to a maps/ folder inside another folder, which I then packed as a .sd7 (.z7 with all the parameters from IceXuick's tutorial). I didn't find a fs.txt, but since I don't have custom features I thought I wouldn't need it anyway. The archive installer provided with the Windows version of Spring installed my pack without giving out an error. While the start positions are kind of borked, SpringLobby lists it in a correct matter. However, both when I try to play the map with SpringLobby and with "Test Spring" running with 'Empty Script', I get this error:

Image

I searched in the forums for it, couldn't find anything though. Any help? :)

Re: Problem loading self-made testmap

Posted: 30 Jul 2009, 14:42
by Beherith
Very good progress so far, but please post the contents of whole SMD file here in a code block, or on pastebin. That should allow us to find the bug.

Re: Problem loading self-made testmap

Posted: 30 Jul 2009, 14:50
by Sindwiller
Of course mate :)

http://pastebin.com/fdc5e353

The only thing I'd reckon I've changed is the MaxMetal parameter to '5'.

EDIT: Argh, this happens when you don't pay attention to the error message... and I'm a "former" (I just don't use it that often anymore) Linux user :P The '--' were the problem. Removed those two lines and Spring bitched about the last line not having a bracket. After having added another bracket, it worked.

Re: [SOLVED]Problem loading self-made testmap

Posted: 30 Jul 2009, 16:47
by ralphie
it tells you right there, line 12 "--" is a problem, I don't know how you could of missed it :P

Re: [SOLVED]Problem loading self-made testmap

Posted: 30 Jul 2009, 17:06
by Sindwiller
ralphie wrote:it tells you right there, line 12 "--" is a problem, I don't know how you could of missed it :P
I read 'testmap.smf' at first *cough* *cough* It's because of the heat ;D

Re: [LIGHTING PROBLEM]Problem loading self-made testmap

Posted: 31 Jul 2009, 11:18
by Sindwiller
Now however I'm encountering another problem :/ The map is absolutely unlit, even when I try to change my SunDir parameters. How come?

Code: Select all

[ATMOSPHERE]
{
	FogColor=0.7 0.7 0.8;
	FogStart=0.2;

	CloudColor=0.9 0.9 0.9;
	SkyColor=0.1 0.15 0.7;

	SunColor=1.0 1.0 1.0;
	CloudDensity=0.55;

	MinWind=5;
	MaxWind=20;
	}
[LIGHT]
{
	SunDir=0.008 0.556 -0.444;
		
	GroundAmbientColor=0.4 0.4 0.4;
	GroundSunColor=0.7 0.7 0.7;

	GroundShadowDensity=0.8;

	UnitAmbientColor=0.3 0.3 0.3;
	UnitSunColor=0.8 0.8 0.8;
	UnitShadowDensity=0.8;
}
Also tried some different compiler options, with the same result.

Code: Select all

mapconv -c 0.5 -x 500 -g geovent.bmp  -n 25 -o testmap.smf -t texturemap.bmp -y typemap.bmp -m metalmap.bmp -a heightmap.bmp -f featuremap.bmp -i -w options.txt -z texcompress 

Re: [LIGHTING PROBLEM]Problem loading self-made testmap

Posted: 31 Jul 2009, 11:31
by Peet
Seems to me you can't have a negative number in the SunDir vector.

Re: [LIGHTING PROBLEM]Problem loading self-made testmap

Posted: 31 Jul 2009, 11:36
by Argh
Nope, that works just fine, Peet. You can even make the sun shine in the "wrong" direction, if you want, and it'll go through the ground.

Other than missing SpecularSunColor, I don't see anything wrong in either section. Show us a screenshot, preferably with a Unit and shadows on, so that it's clear whether it's a problem with the compiler or your settings.

Re: [LIGHTING PROBLEM]Problem loading self-made testmap

Posted: 31 Jul 2009, 13:18
by Sindwiller
Looks like this: http://xs941.xs.to/xs941/09315/screenshotunlit868.jpg

Tried several SunDir vectors and also added SpecularSunColor to the Light section (might be the wrong one though :P). The thing is, the texture map is rendered correctly, however my config doesn't affect lighting at all. Any suggestions?

Re: [LIGHTING PROBLEM]Problem loading self-made testmap

Posted: 31 Jul 2009, 13:43
by Beherith
Oh fuck. You used users mapconv :( Its known to fail without any reason, so I recommend using mothers mapconv fixed version:
http://springrts.com/phpbb/viewtopic.php?f=13&t=17638

Use the following params:

Code: Select all

mapconv -c 0.5 -l -x 500 -n 25 -o testmap.smf -t texturemap.bmp -y typemap.bmp -m metalmap.bmp -a heightmap.bmp -f featuremap.bmp
If the heightmap comes out inverted, use a -i param too.

Just out of curiosity, where did you find that link to users mapconv? Its a great newbie trap.

Re: [LIGHTING PROBLEM]Problem loading self-made testmap

Posted: 31 Jul 2009, 17:07
by Sindwiller
Yes! That was causing the problem, thank you guys! =)
Just out of curiosity, where did you find that link to users mapconv? Its a great newbie trap.
I can't seem to remember but the Wiki has hell a lot of old or dead links or I just happened to have found an old thread or something.

Re: [LIGHTING PROBLEM]Problem loading self-made testmap

Posted: 03 Aug 2009, 12:10
by Forboding Angel
For some unknown reason, negative sun directions will cause some people to crash. It's completely random too, and the cause has never been found.

For an example, see DSD before Icexuick fixed it.

Re: [LIGHTING PROBLEM]Problem loading self-made testmap

Posted: 03 Aug 2009, 12:23
by Beherith
Negative in which direction? Y?

Re: [LIGHTING PROBLEM]Problem loading self-made testmap

Posted: 03 Aug 2009, 22:54
by Argh
Yeah... I've never had any reported crashes with X or Z... and reading the code, I can't see why Y would cause an issue...

Re: [LIGHTING PROBLEM]Problem loading self-made testmap

Posted: 10 Aug 2009, 13:05
by Forboding Angel
Hmm, tbh I can't remember. In my case I believe it was Z. I had 3 or 4 maps continually crashing for some people until I set it to a positive number. Lost of other mappers had the same trouble. Tobi and JC looked high and low to find the bug but it wasn't ever found.

Behe, ahve you used negative sun dirs recently and have you had any reports of crashing? It would be nice to be able to say that over the course of time this bug was put to rest.

Re: [LIGHTING PROBLEM]Problem loading self-made testmap

Posted: 10 Aug 2009, 20:55
by Neddie
I don't remember encountering any crash problems in any of the maps I compiled related to this, and I did things with the light and all sorts of negative values, trying to make it appear like the core of the planet was visible through a partially translucent crust, or flowing lava was on the surface.

Re: [LIGHTING PROBLEM]Problem loading self-made testmap

Posted: 13 Aug 2009, 15:48
by Sindwiller
...and I did things with the light and all sorts of negative values, trying to make it appear like the core of the planet was visible through a partially translucent crust, or flowing lava was on the surface...
A related question: It isn't possible to set up more than one sunlight, right?

Re: [LIGHTING PROBLEM]Problem loading self-made testmap

Posted: 13 Aug 2009, 21:07
by Neddie
Sadly no, though you may be able to use Lua to fake it.