Writing a q3map2 sky-shader.... major differences ?


(stil) #1

After finally sorting out some texture issues with my terrian, I rendered some lighting with this sky shader.


textures/pacificsky/pac_sky
{
	nocompress
	qer_editorimage textures/skies/sky_5.tga
	q3map_lightimage textures/skies/n_blue2.tga
	surfaceparm noimpact
	surfaceparm nolightmap
	surfaceparm sky
	q3map_globaltexture
	q3map_lightsubdivide 2048 
	q3map_sun	0.274632 0.274632 0.39 64 260 65
	q3map_surfacelight 60
	//q3map_lightrgb .1 0.1 0.5
	skyparms full 200 -


//	fogvars ( .1 .1 .18 ) .00005
//	skyfogvars ( .23 .23 .24 ) .1

	
	{
		map textures/skies/newclouds2.tga
	//	tcMod scroll 0.005 0.0005
		tcMod scale 16.0 16.0
		depthWrite
	}
}

(modified mp_beach sky)

I rendered with -fast -super 2 and -filter …and I ended up with really nasty shadows. They’re blocky, and show dramatic shade differences around the edges of polygons. Very ugly to say the least. I’m wondering if there is anything in the shader that might cause something like that ?


(stil) #2

Pics…

http://www.angelfire.com/indie/stil/pics2.html


(ydnar) #3

Deep breath…

  • remove the q3map_lightmapSampleSize directive from your sky shader (see your other thread, where I repeat this)

  • get rid of the q3map_lightImage directive or replace it with a path to an image that exactly matches the color you want from your sky (not sun, sky)

  • lose the q3map_lightSubdivide and q3map_surfaceLight

  • replace with q3map_skyLight 60 3 (or 60 4 or 5, depending on whether it’s a final or test compile, never go higher than 5 though)

  • skyParms"full" is invalid shaderspeak. Yes, all the RTCW skies have it, they’re wrong. Replace with skyParms - 200 -

  • nuke the q3map_lightRGB faff. in fact, lose every line starting with // because those lines are commented out and do nothing

  • if you want scrolling clouds, always put the tcMod scroll last after any scales or whatever

  • depthWrite is pointless, lose it

  • I noticed your map is called “pacific.” you should change all your shader/texture paths to be prefixed with “textures/stil_pacific/” instead of the generic (and collision-prone) “textures/pacific/” or “textures/pacificsky/”.

  • recompile

  • don’t use -filter on the compile options with lightmapped terrain. use -samples 2 or -samples 3 instead, for adaptive antialiasing. -filter doesn’t work too well with lightmapped terrain chunks.

y


(system) #4

Thx ydnar this post is very usefull to me. I will put this hints into my FAQ. :slight_smile:


(stil) #5

Thank you, this is much appreciated, ydnar.


(stil) #6

Thank you, this is much appreciated, ydnar.


(stil) #7

Thank you, your help is very much appreciated, ydnar.


(stil) #8

Thank you, your help is very much appreciated, ydnar.


(stil) #9

lol… ok, when I got a script error trying to post, I guess I should have checked the thread :>


(stil) #10

General Error

Could not find email template file topic_notify