Page 1 of 1
Animated Textures....Stars
Posted: Sun Sep 09, 2007 2:29 am
by Cbielak
Hi, im trying to make a sky where the stars can be seen blinking. I already made my sky using terragen but i was wondering how to make the stars blink somehow.
clouds
Posted: Sun Sep 09, 2007 8:11 am
by tltrude
Some of the sky shaders have moving cloud layers. So if you made moving black clouds, maybe they would make the stars blink.
Code: Select all
textures/sky/africanight
{
qer_keyword utility
qer_keyword sky
surfaceparm nolightmap
surfaceparm noimpact
surfaceparm sky
skyParms env/mohnight1 512 -
{
map textures/sky/talonclouds.tga
blendFunc add
tcMod scroll .005 .003
tcMod scale 3 2
}
}
The one above is from the main/scripts/sky.shader file in pak0.
Posted: Sun Sep 09, 2007 3:30 pm
by Cbielak
K i tried changing the clouds to look black but when i play my map, the clouds are transparent! Then treid using a diferend shade of black but you can still see the stars. I dont think this will work so is ther another way to make the stars blink?
Alpha
Posted: Sun Sep 09, 2007 7:10 pm
by tltrude
How transparent the cloud layer is, is controled by the alpha channel of the image. The alpha channel is like a mask, making some parts see-through and some parts solid. In most cases, the alpha layer is black and white (like with windows), but shades of gray allow for degrees of transparency.
Posted: Wed Sep 12, 2007 9:32 pm
by wacko
The shader u were using is
Code: Select all
{
qer_keyword utility
qer_keyword sky
surfaceparm nolightmap
surfaceparm noimpact
surfaceparm sky
skyParms env/mohnight1 512 -
{
map textures/sky/talonclouds.tga
blendFunc add
tcMod scroll .005 .003
tcMod scale 3 2
}
}
the image talonclouds is just a jpeg having no alpha channel.
So u either will have to make a new tga-image having one and change the command
blendfunc add to
blendfunc blend or keep using a jpg and change the command to
blendfunc filter.
Staying with the mohnight1 images for the sky though wont result in sth nice. Also talonclouds will have to be changed to sth less cloudy and rather spotted to get that twinkling effect.
Another approach could be to make some jpegs of the stars in different "twinkling states" and use sth like
Code: Select all
{
qer_keyword utility
qer_keyword sky
surfaceparm nolightmap
surfaceparm noimpact
surfaceparm sky
skyParms env/mohnight1 512 -
{
animmap 1 textures/twinkle/stars1.tga textures/twinkle/stars2.tga textures/twinkle/stars3.tga textures/twinkle/stars4.tga
blendFunc add
tcMod scale 10 10
}
}