Creating a sky


(Ramm) #1

Hi, me again

I’m having the following problem:
I’m creating a map named home. So I have the following structure for my map:

/maps
/scripts
/textures
|-- home

I created a sky (home_sky.tga) and placed it in the folder /textures/home. But now I’m stuck, I have absolutely no idea how to create that shader. I looked at the tutorials, but I didn’t manage to make a descent shader.

I placed the file home.shader in the folder /scripts but he never shows it like he has to (he shows the orange stuff). Could someone help me out?

this is what i used:


{
   surfaceParm nolightmap
   surfaceParm noimpact
   surfaceParm sky

   qer_editorimage textures/home/home_sky.tga

   skyParms env/space - -
}


(FireFly) #2

You need to add the line ‘home.shader’ to your shaderlist: it’s in ETmain/scripts/shaderlist.txt


(Ramm) #3

Now he shows everything very blurry. He stretches my sky when I move etc…


(EB) #4

post some pics of the image before compile and after compile


(Ramm) #5

Because I thought that it might be of a wrong image, I used the file fueldump_clouds.tga (placed it in my textures-folder). I made a box round my complete map to make sure that there would be no leak, and then I applied the texture fueldump_clouds.tga to it. In Radiant he shows it like this:

The shaderfile (scripts/home.shader) is home.shader and contains this:


textures/home/fueldump_clouds
{
   surfaceParm nolightmap
   surfaceParm noimpact
   surfaceParm sky

   qer_editorimage textures/home/fueldump_clouds.tga

   skyParms env/space - -
}

I added a line to the shaderlist.txt-file:


home

and then i get this:


(Detoeni) #6

textures/my_map/sky //texture path:“my_map” must be in shaderlist.txt
{
nocompress
qer_editorimage textures/skies_sd/siwa_mask.tga //texture seen in editor

q3map_sunExt 0.75 0.70 0.6 150 90 35 2 8		// http://shaderlab.com/q3map2/shader_manual/ch3.html#sunExt
q3map_lightmapFilterRadius 0 32			// http://shaderlab.com/q3map2/shader_manual/ch3.html#lightmapfilterradius
q3map_skyLight 80 3					// http://shaderlab.com/q3map2/shader_manual/ch3.html#skylight

sunshader textures/skies_sd/siwasunbright		// projects sun image in the right place

surfaceparm noimpact					//read the manual http://shaderlab.com/q3map2/shader_manual/contents.html
surfaceparm nolightmap					//dito
surfaceparm nodlight					//dito
surfaceparm sky						//dito

skyparms textures/skies_sd/wurzburg_env/sky 512 -	//environent box (6 textures used as back ground)

{	fog off
	map textures/my_map/sky.tga	//cloud layer texture
	tcMod scale 2.5 2.5		//read the manual http://shaderlab.com/q3map2/shader_manual/contents.html
	tcMod scroll 0.0015 -0.003	//dito
	rgbGen identityLighting		//dito
}

{
	fog off
	clampmap textures/skies_sd/siwa_mask.tga	//this layer is used as a mask to fad the cloud layer with back ground
	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 ) 
}

}


(Ramm) #7

:’( no change. Can I post my .pk3 here so someone can have a look at it?


(Detoeni) #8

The above is intended as an example illistrating what bits do what, whats more it does work, all you got to do set the paths up right and edit to suit your needs (ie, the very very basic stuff).


(Ramm) #9

I did that, but there’s no change in it. So I decided to download an existing sky. The file contains env, scripts, textures. I place them in my etmain, add “nightball” to my shaderlist.txt

It must have been something I done or something I misunderstood, so I think i will have to take a good look at all that information about skies etc…

In the meanwhile I took the easiest solution and downloaded a skybox from nightball. So thanks everyone, and you’ll hear from me again, when I give it another try to create my own sky :smiley:


(EB) #10

so u can -half-way- learn anyways:
You have no image for the shader/game to use in-game…the “qer_editorimage textures/home/fueldump_clouds.tga” is used for in-editor viewing only…there aren’t any lines to detail any image for in-game use.
To make your shader understand an image for your sky shader, put very simply, you could add " implicitMap - " to the last line of the shader.
I must warn you prior to sending u off with that info. that is strictly for how your shader is arranged as posted above…do not change the header name with the use of that term.

There is alot more to learn for making a sky completely suitable…Deteoni has given you enough to follow up on…
-Cheers