Page 1 of 2
Creating layers of clouds?
Posted: Sun Jul 06, 2003 12:54 pm
by Bjarne BZR
Im trying to make the effect of multiple layers of clouds, but I have trouble making a suitable shader...
This is my best try so far:
Code: Select all
textures/sky/vemork_clouds
{
qer_editorimage textures/sky/talonclouds.tga
qer_trans .4
qer_keyword utility
qer_keyword sky
surfaceparm nolightmap
surfaceparm noimpact
surfaceparm sky
{
map textures/sky/talonclouds.tga
blendFunc add
tcMod scroll .05 .03
tcMod scale 1 1
}
}
It creates a scrolling, transparent cloudlayer where I can hardly see the clouds and the brush is visible ( but transparent ) where there are no clouds as well.
The example above is stolen from shaders that ad a scrolling cloud texture to another skytexture ( I guess thats the blendFunc add ). Its not working that well "alone" right now...
What I want:
-The clouds to be a little transparent ( about 80% solid? ).
-The areas of the brush where there are no clouds to be totally invisible.
Posted: Sun Jul 06, 2003 2:00 pm
by Angex
Try looking at the africanights sky texture, that has clouds floating about, and I think they pass over one another, but I never really looked that close.
Posted: Sun Jul 06, 2003 2:07 pm
by Bjarne BZR
I have, and I have no trouble adding a scrolling cloud texture to another texture...
I need to have the clouds as a separate texture that is invisible where there are no clouds, and a little transparent where there are clouds. A bit like a semi transparent fence mask...
Posted: Sun Jul 06, 2003 3:47 pm
by MPowell1944
Using taloncloud as the sky and the scrolling layer isn't a good idea. Use taloncloud for the scrolling layer only. Should be more visible that way.
Posted: Sun Jul 06, 2003 4:54 pm
by jv_map
First of all 'blendfunc add' means additive blending so the output is never darker than the input. Useful for fire and explosions but probably not what you need for clouds (blendfunc blend should do).
I think you have to make a cloud layer texture with an alpha channel for the transparency. I don't think you can make semi-transparent textures in game (only in the editor with qer_trans

).
Posted: Sun Jul 06, 2003 8:01 pm
by rOger
Se if this works for you.
http://www.samurajdata.se/~ra/moh/rasky.pk3
It's just the shader, textures and env.
Posted: Sun Jul 06, 2003 11:05 pm
by Bjarne BZR
rOger... that sky is exelent! Great sky textute!
But... let me explain what I want:
I do NOT want a sky... I want a SEPARATE cloud texture. This texture should only contain the clouds, nothing else.
And jv: I guessed that textures/sky/talonclouds.tga had one of these mysterious alfa channels because it was transparent in the skies it was used on... maby it does not. I really have no idea of how this stuff works.
So my question ( chrystal clear this time I hope ) is:
- How can I produce a standalone cloud texture ( not a sky texure ) that is 100% transparent ( invisible ) where there are no clouds, and with clouds that are transparent ( Say 50% )?
- Can I use textures/sky/talonclouds.tga or must I make a new one with this magical thing called an alfa channel?
- What should the shader look like?
I'm in the dark here people!

Posted: Mon Jul 07, 2003 8:21 am
by rOger
Try the below shader and
this texture
It does contain an alfa channel, but beyond that I have no idea (almost) how it works, but it does.
Code: Select all
textures/ratex/racloud
{
qer_keyword masked
qer_editorimage textures/ratex/cloud.tga
surfaceparm trans
surfaceparm nonsolid
surfaceparm nomarks
surfaceparm noimpact
surfaceparm nolightmap
cull none
{
map textures/ratex/cloud.tga
blendFunc blend
alphaGen dot .7 .7 // alter this to change transparency
depthWrite
tcMod scroll .035 .015
}
}
Or this one for multi layered clouds.
Code: Select all
textures/ratex/racloud
{
qer_keyword masked
qer_editorimage textures/ratex/cloud.tga
surfaceparm trans
surfaceparm nonsolid
surfaceparm nomarks
surfaceparm noimpact
surfaceparm nolightmap
cull none
{
map textures/ratex/cloud.tga
blendFunc blend
alphaGen dot .7 .7
depthWrite
tcMod scroll .035 .015
}
{
map textures/ratex/cloud.tga
blendFunc blend
alphaGen dot .5 .5
depthWrite
tcMod scroll 0.005 0
tcMod scale 2 2
}
}
Posted: Mon Jul 07, 2003 9:16 am
by mohaa_rox
i only knew how to make clouds in 3ds max

Posted: Mon Jul 07, 2003 1:42 pm
by Bjarne BZR
Thanx rOger!
That worked a lot better. I now use this:
Code: Select all
textures/sky/vemork_clouds
{
qer_keyword masked
qer_editorimage textures/ratex/cloud.tga
surfaceparm trans
surfaceparm nonsolid
surfaceparm nomarks
surfaceparm noimpact
surfaceparm nolightmap
cull none
{
map textures/ratex/cloud.tga
blendFunc blend
alphaGen dot 0.7 0.7
depthWrite
tcMod scroll 0.035 0.015
tcMod scale 1 1
}
// {
// map textures/ratex/cloud.tga
// blendFunc blend
// alphaGen dot 0.5 0.5
// depthWrite
// tcMod scroll 0.009 0.004
// tcMod scale 1 1
// }
}
Posted: Mon Jul 07, 2003 1:44 pm
by jv_map
Wow rOger great stuff
A clone of your textures/ratex/racloud shader has just found use as a chopper window

Posted: Mon Jul 07, 2003 2:02 pm
by rOger
I ... ehhh? as a window? on a chopper? This is not during WW2 is it.

Posted: Mon Jul 07, 2003 7:27 pm
by jv_map
No it's for my (flyable) chopper for the modern warfare mod

Posted: Mon Jul 07, 2003 7:29 pm
by rOger
I'm honoured to contribute!
Posted: Tue Jul 08, 2003 12:37 am
by Bjarne BZR
Thought I'd let you see the results:
It does not look spectacular but it is, considering 3 things:
1) It has a distinct 3d effect as you feel the low clouds getting nearer as you climb a hill.
2) It is affected by the farplane and farplane_color settings, blending the sky into the evvironment in a more natural way.
3) The skybox is a skycaulk, but still its not boringly flat...
The approach has one disadvantage that I've run into so far:
You have to hide its edges as they will look ugly if seen. I had to bend the cloudlayer downwasrs to hide it from the player. ( Not a biggie if you are aware of it ).
BIG thanx to you all!
*********edit**********
Just to be clear: the clouds are not IN the skytexture, but a separate brush under it: like this
Code: Select all
--------------- <-Skybox brush
*************** <-Transparent cloud brush
\__/\_/+-<\_/\/ <-Ground ( with a downed ASCII aircraft :D )