Change brightness of sky

Posted By: PadMalcom

Change brightness of sky - 05/17/13 16:58

I use a sky cube in my level. When I start a rain effect I want to reduce the brightness of the sky. How can I do this?

Thanks for the answers laugh
Posted By: Uhrwerk

Re: Change brightness of sky - 05/17/13 17:19

This should give you what you need:

http://www.conitec.net/beta/asky_cube_level.htm
Posted By: sivan

Re: Change brightness of sky - 05/18/13 08:33

you can use sky entity alpha, if you set a proper sky colour (I recommend a nearly similar as fog colour), this blending makes sky less sharp too, so ideal for this purpose. mtl_sky does not affect all kinds of skies, as I remember sky cube is the one that is excluded only as it is drawn by the engine as 4 sprites (causing the border artifacts that you can lower by using a proper sky colour).

advertisement: of course, you can test it in real-time in my editor easily, just note the values (or use its sky system to handle easily 2 sky domes a sky cube or a sky model) laugh
Posted By: 3run

Re: Change brightness of sky - 05/19/13 07:41

Originally Posted By: Uhrwerk
This should give you what you need:

http://www.conitec.net/beta/asky_cube_level.htm
Could you please go a little bit more into details? Cause, manual doesn't describe it well.
Posted By: Wiseguy

Re: Change brightness of sky - 05/19/13 08:15

@3run: What the manual doesn't tell you, is that this is a pointer to an ENTITY. Basically it's a pointer to the ENTITY the engine uses to render the sky, so changing the parameters of the ENTITY will change the rendered sky.
Posted By: oliver2s

Re: Change brightness of sky - 05/19/13 11:32

Set the "LIGHT" flag of the skycube and adjust the brightness via red,green,blue parameters:

Code:
ENTITY* skycube =
{
	layer=2; type="sky_abend+6.tga"; flags2=SKY|CUBE|SHOW;

	//Brightness of Sky:
	red=20;green=20;blue=20;
}

Posted By: Uhrwerk

Re: Change brightness of sky - 05/19/13 15:22

If you're just up to changing the brightness the ambient parameter should do as well.
Posted By: oliver2s

Re: Change brightness of sky - 05/19/13 15:28

Originally Posted By: Uhrwerk
If you're just up to changing the brightness the ambient parameter should do as well.


No, this doesn't work. But as an alternative the material ambient can be changed. By default its "mtl_sky", but you can also assign any custom material.

EDIT: btw, the LIGHT flag isn't neccessary for changing red,green,blue as I wrote in my prevoius post.
Posted By: 3run

Re: Change brightness of sky - 05/19/13 16:28

Originally Posted By: Uhrwerk
If you're just up to changing the brightness the ambient parameter should do as well.
You mean something like this? If yes, it doesn't work for me..
Code:
SkyCubeEnt.ambient = 100;

Posted By: Uhrwerk

Re: Change brightness of sky - 05/19/13 17:12

Yes, oliver2s already corrected me. My bad. Sorry for the confusion.
Posted By: PadMalcom

Re: Change brightness of sky - 05/29/13 10:59

Hey guys, thanks! I worked with red, green, blue so far but for thunder strikes I want to color the skies entirely in white. Sadly, working with mtl_sky has absolutely no effect (Which is weired, mtl_terrain and mtl_model work as expected).

So I guess I'll have to add another sky layer to achieve lightning.
Posted By: oliver2s

Re: Change brightness of sky - 05/29/13 11:20

mtl_sky(.emissive_...) affects the color of the sky only when red,green,blue is lower than 255. And the opposite way, red,green,blue only make changes when mtl_sky.emissive_... is lower than 255.

So it seems the light formular is simply mtl_sky.emissive_...+[sky].red/green/blue, with the maximum of 255 for sure.

The only (fast) way I see to make the sky completly white is to use a shader. Making a another sky layer is very framerate unfriendly.
Posted By: sivan

Re: Change brightness of sky - 05/29/13 11:45

strange, I just tested, and I can set ambient and emissive for a sky cube by mat_sky, thus can achieve a totally white sky, without touching entity rgb.
only dome and cylinder are not affected by it.
Posted By: PadMalcom

Re: Change brightness of sky - 05/29/13 12:15

I didn't try emissive yet and will do now. Thanks for testing.
© 2024 lite-C Forums