sky shader


(rbh) #1

im trying to make my own sky and shader for my map i have made a sky pic its 256 x 256 jpeg
iv also got a shader (i used a shader file from another map and renamed it)

textures/skies/rbhsky
{
nocompress
qer_editorimage textures/skies/rbhsky.jpeg
q3map_lightrgb 0.98 0.98 1.0
q3map_sun 0.9 1.0 1.0 175 13
q3map_skylight 175 3
q3map_nofog
q3map_lightsubdivide 512
surfaceparm noimpact
surfaceparm nolightmap
surfaceparm nodlight
surfaceparm sky
skyparms - 200 -

    {	
            fog off
	map textures/skies/rbhsky
	tcMod scale 2.5 2.5
	tcMod scroll 0.0500 -0.003
	rgbGen identityLighting
}

}

now i have both the pic and the shader i cant seen to get it working iv tryed dev mapping it with shader in the etmain maps folder and the etmain scripts folder (not at same time) and i have also tryed pk3 ing the map and testing it that way and ideas what im doing wrong ???(apart from being a noob lol)

ps im need the shader to give off a little light is the shader right for this to happen (like kraglejump sky)


(aaa3) #2

sry for posting this lame guess, but have you add ur shader to shaderlist.txt? i cant see anything wrong within ur shader, maybe u should use sunext… and its place is definitely in the scripts dir though… and also just a convention but skies directory isnt an existing one in the main pak? it is not a bad habit to collect all ur textures in one directory, and if u will make more maps, then for each map a subdirectory. eg.: textures/rbh/rbhjumps1/skies, textures/rbh/rbhmegaleetjumps777/skies, et c., like this. or omit rbh and each map an own dir, like textures/rbhmap1/skies. not important just mentioned…

edit - er… oops, at the map command, rbhsky.jpeg ! ;D
edit2 and yes its definitely right for giving off light XD (btw if its important to give only a little light off as u asked for, then its not right =P) (to “give off” light, lol, i love it :D)


(rbh) #3

lol i had to got look but yes it is in the shaderlist

oh no i dont belive it i got this “line 6 is incomplete” error again dam map has been working great since i reinstalled gtk again and now its back


(rbh) #4

the shader is glitching gtk so iv removed it from scripts and shaderlist


(-SSF-Sage) #5

My call:

q3map_sun red green blue intensity degrees elevation

Is line 6. Says imcompatible. Would it miss the value for last one? Would it cause it?

q3map_sun 0.9 1.0 1.0 175 13 missing_x_for_example_45

Also:

qer_editorimage textures/skies/rbhsky.jpeg
and
map textures/skies/rbhsky

to:

qer_editorimage textures/skies/rbhsky.tga
and
map textures/skies/rbhsky.tga

(Diego) #6

Nice catch, Sage. Script and shader posts that are not in CODE format are such a pain to debug.


(aaa3) #7

er… actually jpeg images are also working(i can confirm it), idk he may want to stick with the .jpg extension though…

missing sun parameter - gratz :D… (damn he “forgot” to mention it in his first post - u had help sage ;p)

its so short i dont see it any worser than if it would be in code format… ok with a kilometer long script its not but… :stuck_out_tongue:


anyways, rbh, if still not working, try to remove lines u suspecting, gradually, until u reach the very minimum which is neccessary to ur sky. this may help.


(-SSF-Sage) #8

Well you should always use .tga extension in the shader file even if the picture is jpg/jpeg. Because if it doesn’t find one with .tga it will just autom. search for .jpg next.

Especially that one which didn’t have even extension is bad. Dunno if it crashes because of it or something but it’s not good. I hope that cleared the problem and make it working altho I have my doubts about it. But everything is worth to try. :wink:

Ps. The error said line 6, I went down to line 6 and noticed it missed one value.