Frictional Games Forum (read-only)

Full Version: How to change Skybox color over time?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I was wondering if there was a way to change the color of a Skybox over the course of say 30 minutes to simulate a day to night to day effect?
Could you maybe try a box-light? Make the skybox an actual in-game object without illumination, then put a box-light over top to change the color and brightness with scripts. Not something I've done personally, but it's an idea you could experiment with. Kiandra recently pointed out to me that you could use a box-light on window panes to drastically change their color. I've seen effects of a slightly similar nature in "Through The Portal" as well.
(08-21-2013, 02:58 AM)BonesTheRabbit Wrote: [ -> ]Could try a light? Make the skybox an actual in-game object without illumination, then put a boxlight over top to change the color and brightness? Not something I've done personally, but it's an idea you could experiment with.

Yes, there is a fadelightto function and pretty much all I could think of but not sure how I would implement it exactly. How would I turn a .dds to a dae but still keep the Skybox effect?
(08-21-2013, 03:04 AM)GoreGrinder99 Wrote: [ -> ]Yes, there is a fadelightto function and pretty much all I could think of but not sure how I would implement it exactly. How would I turn a .dds to a dae but still keep the Skybox effect?
Unfortunately, I'm not sure how to make a skybox object. If I had a clue, I'd point you in the right direction. Sorry, mate. Best of luck!
(08-21-2013, 03:15 AM)BonesTheRabbit Wrote: [ -> ]
(08-21-2013, 03:04 AM)GoreGrinder99 Wrote: [ -> ]Yes, there is a fadelightto function and pretty much all I could think of but not sure how I would implement it exactly. How would I turn a .dds to a dae but still keep the Skybox effect?
Unfortunately, I'm not sure how to make a skybox object. If I had a clue, I'd point you in the right direction. Sorry, mate. Best of luck!

Actually I'm thinking of reverting back to the image files for the Skybox and use them as primitives for the walls, sky and ground and add specific lights to them for certain effects. Hopefully I can get back soon if it does indeed work. Thanks for the help!!

EDIT-Well it's a matter of figuring out how to convert JPEG to a DAE or MAT file, if it's even possible...
You can try to change a skybox color and texture via scripts:
SetSkyBoxColor(float afR, float afG, float afB, float afA);
SetSkyBoxTexture(string& asTexture);
(08-21-2013, 04:46 AM)Fatalist Wrote: [ -> ]You can try to change a skybox color and texture via scripts:
SetSkyBoxColor(float afR, float afG, float afB, float afA);
SetSkyBoxTexture(string& asTexture);

I wouldn't want to change the texture for this I don't think, unless I'm thinking of it wrong. It does in fact change the, well, texture? I do however want to change the Skybox color but is there a way to set it on a timer to fade colors at a specific pace?
Lest try this:
Code:
void OnStart()
{
AddTimer("", 1800.0f, "Night_start");
}
void Night_start(string &in asTimer)
{
SetSkyBoxColor(0.05, 0.04, 0.3, 1);
AddTimer("night", 1800.0f, "Night_start");
}
Night skybox every 30 min. You can add similar timer for day skybox.
(08-21-2013, 03:58 PM)Fatalist Wrote: [ -> ]Lest try this:
Code:
void OnStart()
{
AddTimer("", 1800.0f, "Night_start");
}
void Night_start(string &in asTimer)
{
SetSkyBoxColor(0.05, 0.04, 0.3, 1);
AddTimer("night", 1800.0f, "Night_start");
}
Night skybox every 30 min. You can add similar timer for day skybox.

I have some night shift lined up for the next few days so I'll get back then, sorry for a delay. If anyone else has any ideas please suggest it!