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

Discussion for Level editing, modeling, programming, or any of the other technical aspects of Quake
Post Reply
highlanderstl
Posts: 37
Joined: Thu Nov 15, 2007 11:34 pm

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

Post 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?
[color=#FF0000]-- [/color][color=#FF8000]Check[/color] [color=#FFFF00]it[/color] [color=#FF8000]out[/color] [color=#FF0000]-->[/color] [url]http://www.nlnoluck.com/[/url]

MSN: highlanderstl(at)hotmail(dot)com
User avatar
Hipshot
Posts: 1547
Joined: Sun Jan 20, 2002 8:00 am

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

Post 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
	}		
}
Q3Map2 2516 -> http://www.zfight.com/misc/files/q3/q3map_2.5.16_win32_x86.zip
Q3Map2 FS_20g -> http://www.zfight.com/misc/files/q3/q3map2_fs_20g.rar
GtkRadiant 140 -> http://www.zfight.com/misc/files/q3/GtkRadiantSetup-1.4.0-Q3RTCWET.exe
highlanderstl
Posts: 37
Joined: Thu Nov 15, 2007 11:34 pm

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

Post 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.
[color=#FF0000]-- [/color][color=#FF8000]Check[/color] [color=#FFFF00]it[/color] [color=#FF8000]out[/color] [color=#FF0000]-->[/color] [url]http://www.nlnoluck.com/[/url]

MSN: highlanderstl(at)hotmail(dot)com
highlanderstl
Posts: 37
Joined: Thu Nov 15, 2007 11:34 pm

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

Post 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?
[color=#FF0000]-- [/color][color=#FF8000]Check[/color] [color=#FFFF00]it[/color] [color=#FF8000]out[/color] [color=#FF0000]-->[/color] [url]http://www.nlnoluck.com/[/url]

MSN: highlanderstl(at)hotmail(dot)com
obsidian
Posts: 10970
Joined: Mon Feb 04, 2002 8:00 am

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

Post 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.
highlanderstl
Posts: 37
Joined: Thu Nov 15, 2007 11:34 pm

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

Post by highlanderstl »

I was afraid of that, thanks.
[color=#FF0000]-- [/color][color=#FF8000]Check[/color] [color=#FFFF00]it[/color] [color=#FF8000]out[/color] [color=#FF0000]-->[/color] [url]http://www.nlnoluck.com/[/url]

MSN: highlanderstl(at)hotmail(dot)com
Post Reply