[LIGHTING PROBLEM]Problem loading self-made testmap

[LIGHTING PROBLEM]Problem loading self-made testmap

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

Moderator: Moderators

Post Reply
User avatar
Sindwiller
Posts: 46
Joined: 30 Jul 2009, 14:01

[LIGHTING PROBLEM]Problem loading self-made testmap

Post 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? :)
Last edited by Sindwiller on 31 Jul 2009, 11:16, edited 2 times in total.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: Problem loading self-made testmap

Post 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.
User avatar
Sindwiller
Posts: 46
Joined: 30 Jul 2009, 14:01

Re: Problem loading self-made testmap

Post 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.
User avatar
ralphie
Posts: 426
Joined: 08 Jan 2007, 08:39

Re: [SOLVED]Problem loading self-made testmap

Post by ralphie »

it tells you right there, line 12 "--" is a problem, I don't know how you could of missed it :P
User avatar
Sindwiller
Posts: 46
Joined: 30 Jul 2009, 14:01

Re: [SOLVED]Problem loading self-made testmap

Post 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
User avatar
Sindwiller
Posts: 46
Joined: 30 Jul 2009, 14:01

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

Post 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 
User avatar
Peet
Malcontent
Posts: 4384
Joined: 27 Feb 2006, 22:04

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

Post by Peet »

Seems to me you can't have a negative number in the SunDir vector.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

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

Post 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.
User avatar
Sindwiller
Posts: 46
Joined: 30 Jul 2009, 14:01

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

Post 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?
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

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

Post 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.
User avatar
Sindwiller
Posts: 46
Joined: 30 Jul 2009, 14:01

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

Post 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.
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

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

Post 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.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

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

Post by Beherith »

Negative in which direction? Y?
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

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

Post 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...
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

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

Post 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.
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

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

Post 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.
User avatar
Sindwiller
Posts: 46
Joined: 30 Jul 2009, 14:01

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

Post 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?
User avatar
Neddie
Community Lead
Posts: 9406
Joined: 10 Apr 2006, 05:05

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

Post by Neddie »

Sadly no, though you may be able to use Lua to fake it.
Post Reply

Return to “Map Creation”