Page 1 of 1

Adjusting the Sunflare Brightness?

Posted: Tue Feb 21, 2006 10:42 am
by Phantomwarrior
We are building a stage that has a morning sun coming up in the East. The sunflare is perfectly placed on the horizon and is a key element of the battle. As you probably know, Generals throughout the ages have used the sun as a factor in battle for defense and for attack. I would like to be able to tone down the amount of sunflare so that it is more realistic and not so overwhelming. Is there a way to do this? There must be a script command that sets the brightness of the sun. I would appreciate mapping guru help on this one.

Posted: Tue Feb 21, 2006 1:47 pm
by PKM
you need to change the values for sunflare in your entity window ( press "n" in radient while you have any worldspawn brush highlighted.

key : sunflare
value : XXXX XXXX XXXX


example ( battle in the bobcage m3l2)

key : sunflare
value : 4096 -5604 1200

suggest finding and downloading the excel spreadsheet for world_spawn keys and values. if you can't find it i do have a copy.

Posted: Tue Feb 21, 2006 9:02 pm
by Rookie One.pl
Are you certain of that, PKM? I've never seen this sunflare property used. What I did see is suncolor, sundirection and sunflarename.

Dosen't Seem to Reduce Glare?

Posted: Thu Feb 23, 2006 7:05 am
by Phantomwarrior
I haven't spent a lot of time with Sunflare as key and giving it values as suggested, but it didn't seem to reduce glare or brightness?

sunflare

Posted: Thu Feb 23, 2006 9:15 am
by tltrude
I don't see "sunflare" as part of worldspan. As far as I know it is either on or off and brightness can't be changed. Here is a list of sun keys from the worldspawn.cpp file.

"suncolor" color (and intensity) of the sun. Full daylight would be "70 70 70"
"sundiffuse" fraction of the sunlight to make diffuse (default 1)
"sundiffusecolor" color of the diffuse sunlight. Uses the same value scale as suncolor.
"sundirection" direction of the sun in the level
"sunflaredirection" allows you to specify a direction of the sun flare. Defaluts to using the direction specified for the sunlight.
"sunflarename" sets the flare to use for the sun (default is sun)
"skyalpha" initial value of the sky's alpha, defaults to 1

Notice that "sunflarename" defaults to "sun" as the value. This would suggest there are other sunflares you can use, but I have never seen any. If you use "none" as the value the sunflare goes away.

Posted: Thu Feb 23, 2006 2:12 pm
by PKM
why you fellas question me.....

m3l2 Battle in the Bocage

ambientlight
10 10 10
farplane
6200
farplane_color
0.62 0.62 0.61
spawnflags
2
sundiffuse
3
sundirection
315 315 0
sunflare
4096 -5604 1200

sunlight
90 90 90
also used in m5l3 The Bridge

sunflare
-748 1428 1772

i began looking for that part of the script when i had gone into a couple servers using southern france and/or algiers and both had massive bright coronas/halos/sunflares that all but blinded you if you looked in the direction of ths sun/moon.

dammit, now you guys have forced my hand and only you all are to blame for me taking a dump on your lawns. i love you guys but what is , is what is.

Re: sunflare

Posted: Thu Feb 23, 2006 8:09 pm
by Rookie One.pl
Just a little diggression. ;)
tltrude wrote:Notice that "sunflarename" defaults to "sun" as the value. This would suggest there are other sunflares you can use, but I have never seen any. If you use "none" as the value the sunflare goes away.
global/lensflaredefs.txt wrote://-----------------------------------------------------------------------------
// Default, day-time sun flare

begin sun
//dot_min .8
//dot_min .95
//dot_min .78
dot_min .55
flare 1.4 0 textures/sprites/sunflare_main
//flare 1 .15 textures/sprites/sunflare_main
//flare .15 .35 textures/sprites/sunflare_middle
//flare .3 .75 textures/sprites/sunflare_middle
//flare .2 .85 textures/sprites/sunflare_furthest
//flare .1 1 textures/sprites/sunflare_furthest
//fullscale .3
fullscale .6
fullscreen textures/jack/whitefade
fullfade 600
end

Posted: Thu Feb 23, 2006 8:11 pm
by hogleg
Image

name

Posted: Fri Feb 24, 2006 7:11 am
by tltrude
I think Rookie One has found it. I never spotted that text file in global.

Code: Select all

//----------------------------------------------------------------------------- 
// Sun 2 by tltrude, lower numbers than default.

begin sun2
dot_min .8 
//dot_min .95 
//dot_min .78 
//dot_min .55 
flare 1 0 textures/sprites/sunflare_main
//flare 1.4 0 textures/sprites/sunflare_main  
//flare 1 .15 textures/sprites/sunflare_main 
//flare .15 .35 textures/sprites/sunflare_middle 
//flare .3 .75 textures/sprites/sunflare_middle 
//flare .2 .85 textures/sprites/sunflare_furthest 
//flare .1 1 textures/sprites/sunflare_furthest 
fullscale .3 
//fullscale .6 
fullscreen textures/jack/whitefade
fullfade 300 
//fullfade 600 
end
I haven't tested it. The global Lens flare definition file has a second sunflarename, "sunset1" that you can try. And, it says that the "fullscale" value is how bright the screen can get.

Posted: Fri Feb 24, 2006 1:56 pm
by PKM
i demand an apology . it is only your clean lawns that will pay.