Page 1 of 1

Custom skybox (env) - add clouds by shader???

Posted: Sun Nov 18, 2007 5:37 am
by highlanderstl
Hi all,

I have a custom skybox. I'm currently using env/xnight2.

Here is the shader:

textures/skies/xnight2_xian_dm4
{
surfaceparm noimpact
surfaceparm nolightmap
qer_editorimage textures/skies/xnight2_up.tga
q3map_sun 1 1 1 80 -41 58
q3map_surfacelight 50
skyparms env/xnight2 - -
}

What I would like to do is add a layer of clouds to the sky. Cloud texture (dimclouds.jpg)

First, I tried altering the shader, but never could get it to work.

Second, I tried adding a second layer across the sky with a cloud shader; however, it will never line-up perfectly and you see the edges.
Image

The ideal outcome I would like to have this sky with far/high layer clouds going across the entire sky (top and sides) without seems and doing it with the sky shader.

Is this doable?

Re: Custom skybox (env) - add clouds by shader???

Posted: Sun Nov 18, 2007 1:28 pm
by Hipshot
Rewrite the below to fit your needs, it has two cloud layers mapped under a environment map.
Of Course there will be seams, in the bottom of the sky. To remedy this you could skip one layer and add a alpha mask to blend the one left cloud layer with the bottom of the sky. Or you can work this in into the sky portal.

Code: Select all

textures/hipshot_m7_sky/prodm6sky
{
	qer_editorimage textures/hipshot_dm6_sky/env/dm6_up.tga
	q3map_lightmapFilterRadius 0 32
	q3map_sunExt 1 .9 .5 300 -150 60 2 32
	q3map_lightimage textures/hipshot_m7_sky/blue.jpg
	q3map_skyLight 80 6
	q3map_noFog
	q3map_globalTexture
	surfaceparm sky
	surfaceparm noimpact
	surfaceparm nolightmap
	skyparms textures/hipshot_m7_sky/far 500 -
	nopicmip
	{
		map textures/hipshot_m7_sky/clouds.tga
		tcMod scroll 0.0150 -0.0050
		tcmod scale 5 5
		blendFunc blend
		rgbGen identityLighting
	}
	{
		map textures/hipshot_m7_sky/clouds2.tga
		tcMod scroll 0.03 -0.02
		blendFunc blend
		tcmod scale 3 3
		rgbGen identityLighting
	}		
}

Re: Custom skybox (env) - add clouds by shader???

Posted: Sun Nov 18, 2007 3:08 pm
by highlanderstl
thanks for the info. My real issue was that I was calling the shader -
textures/skies/xnight2_xian_dm4 and since that one already exist. It was always using that one, not the one I was editing. So when I just renamed it, it worked. Bah, I'm such a noob when it comes to shaders and skyboxes.

Thanks, again.

Re: Custom skybox (env) - add clouds by shader???

Posted: Tue Dec 04, 2007 2:29 am
by highlanderstl
If I only altered 1 of the 6 sides of the env, is there anyway I can just included that 1 sided in my pk3 file and use the other 5 sides from the pak1.pk3 file?

Re: Custom skybox (env) - add clouds by shader???

Posted: Tue Dec 04, 2007 6:08 am
by obsidian
No, because the shader only references the base name of the textures. If you modify one you need to modify the name, hence you'll need to include a fresh copy of the other 5 textures, renamed to suit.

Re: Custom skybox (env) - add clouds by shader???

Posted: Tue Dec 04, 2007 7:22 pm
by highlanderstl
I was afraid of that, thanks.