Animated Textures....Stars

If you're looking for mapping help or you reckon you're a mapping guru, post your questions / solutions here

Moderator: Moderators

Post Reply
User avatar
Cbielak
Lance Corporal
Posts: 21
Joined: Sun Jul 01, 2007 7:43 pm

Animated Textures....Stars

Post 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.

Code: Select all

I bought bateries, but it said "batteries not included" so i had to buy them again.
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

clouds

Post 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.
Tom Trude,

Image
User avatar
Cbielak
Lance Corporal
Posts: 21
Joined: Sun Jul 01, 2007 7:43 pm

Post 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?

Code: Select all

I bought bateries, but it said "batteries not included" so i had to buy them again.
Image
User avatar
tltrude
Chuck Norris
Posts: 4774
Joined: Sun Jul 07, 2002 4:03 am
Location: Oklahoma, USA
Contact:

Alpha

Post 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.
Tom Trude,

Image
User avatar
wacko
Field Marshal
Posts: 2085
Joined: Fri Jul 05, 2002 8:42 pm
Location: Germany

Post 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
	}
}
Post Reply