Anyone willing to look at a .map and shader files?


(Ifurita) #1

Need some help with lighting. Tried reducing _minlight, Q3Map_Sun, and Q3Map_skylight values. There is no ambient values. No matter what I change, nothing really works.

This is the sky shader


textures/rommels_cache/rommels_sky
{
	qer_editorimage textures/skies/sky_8.tga
	//q3map_skylight 45 3
	q3map_sun 0.3 0.3 0.45 15 35 45
	nocompress
	skyparms - 200 -
	sunshader textures/skies_sd/full_moon2
	surfaceparm noimpact
	surfaceparm nolightmap
	surfaceparm sky
	
	skyparms textures/skies_sd/wurzburg_env/sky 512 -
 
	
	{	fog off
		map textures/skies_sd/goldrush_clouds.tga
		tcMod scale 5 5
		tcMod scroll 0.0015 -0.003
		rgbGen identityLighting
	}


	{	fog off
		map textures/skies/nightsky1.jpg
		tcMod scale 10 10
		blendfunc add
		rgbGen identityLighting
	}

	{
		fog off
		clampmap textures/skies_sd/goldrush_mask.tga
		blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
		tcMod scale 0.956 0.956
		tcMod transform 1 0 0 1 -1 -1
		rgbGen const ( 0.4 0.4 0.4 ) 
	}
}

Ambient = 0
_minlight = 0
_mingridlight = 0
_minvertexlight = 0

What else controls overall lighting?


(Aikon) #2

Well, I don’t know if this is any help, but I thought there was a key for “gamma” changes for a map. _gamma I believe it was.


(Chruker) #3

I don’t know if the keys a case sensitive, but Radiant list the Ambient key as ‘ambient’

Also looking at the raw q3map2 exe I can see there are these keys:
_ambient


(Mean Mr. Mustard) #4

I will not embarass Iffy…he can do that all on his own :wink:

Rest assured the problem is solved and was not the shader (hint: it was all Iffy’s fault :smiley: )


(Ifurita) #5

me hangs head in shame.

/crawls off into dark to find a hole to hide in


(Chruker) #6

Did someone forget to do a light compile?


(Ifurita) #7

nope


(Aikon) #8

Maybe there’s something to do with your batch-file? Like, that you need to put in a special command for it to compile with ambient light. Have you tried lightcompiling other maps, with ambient?


(Adacore) #9

C’mon Iffy - what did you do - you’ve left us all hanging :wink:


(Orange) #10

[JOKE]
I know!

You gave gtkRadiant too much cheese!
You should have listened to the vet.
[/JOKE]

My (real) guess is that you used the wrong shader for your skybox.

And I have 2 questions about the skybox shader:

  1. From what I can see, “fog off” and “fog on” are like q3map_noFog but on a stage basis, am I right?
  2. Why are there two skyparms?
    skyparms - 200 -
    skyparms textures/skies_sd/wurzburg_env/sky 512 -

(Mean Mr. Mustard) #11

Orange is getting closer…

I am not a shader expert (actually I’m more like ‘what is a shader?’ person :wink: ). We just copied the goldrush sky shader from skies.shader and modified the ‘darkness’ of the light emitted. So, I’m unsure that the rest of the shader does…

I’ll take a guess though…is the moon (fullmoon2) placed at by the first skyparm and then the clouds, stars etc all placed by the second skyparm?


(Ifurita) #12

OK, I’ll yield, hopefully it will be a good learning point for others. I made 2 mistakes. 1) I had a legacy shader, ‘rommel_a1.shader’, with values and parameters for our sky textures, but 2) that hid the fact that I didn’t have rommels_cache.shader listed in the shaderlist.txt document. So what ended up happening was that my compiler kept reading off the legacy shader while I was making changes to rommels_cache.shader. Then, when I deleted the legacy shader, it couldn’t find ANY values for the sky lighting, so everything was rendered pitch black.

That’s about it