Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to change Skybox color over time?
GoreGrinder99 Offline
Member

Posts: 166
Threads: 47
Joined: Feb 2013
Reputation: 1
#1
How to change Skybox color over time?

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?

-Grind to the Gore-
(This post was last modified: 08-27-2013, 12:23 PM by GoreGrinder99.)
08-21-2013, 02:52 AM
Find
BonesTheRabbit Offline
Member

Posts: 68
Threads: 20
Joined: Feb 2012
Reputation: 2
#2
RE: How to change Skybox color over time?

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.
(This post was last modified: 08-21-2013, 03:07 AM by BonesTheRabbit.)
08-21-2013, 02:58 AM
Find
GoreGrinder99 Offline
Member

Posts: 166
Threads: 47
Joined: Feb 2013
Reputation: 1
#3
RE: How to change Skybox color over time?

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

-Grind to the Gore-
08-21-2013, 03:04 AM
Find
BonesTheRabbit Offline
Member

Posts: 68
Threads: 20
Joined: Feb 2012
Reputation: 2
#4
RE: How to change Skybox color over time?

(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
Find
GoreGrinder99 Offline
Member

Posts: 166
Threads: 47
Joined: Feb 2013
Reputation: 1
#5
RE: How to change Skybox color over time?

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

-Grind to the Gore-
(This post was last modified: 08-21-2013, 03:47 AM by GoreGrinder99.)
08-21-2013, 03:22 AM
Find
Fatalist Offline
Member

Posts: 122
Threads: 8
Joined: Dec 2012
Reputation: 8
#6
RE: How to change Skybox color over time?

You can try to change a skybox color and texture via scripts:
SetSkyBoxColor(float afR, float afG, float afB, float afA);
SetSkyBoxTexture(string& asTexture);

(This post was last modified: 08-21-2013, 04:46 AM by Fatalist.)
08-21-2013, 04:46 AM
Find
GoreGrinder99 Offline
Member

Posts: 166
Threads: 47
Joined: Feb 2013
Reputation: 1
#7
RE: How to change Skybox color over time?

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

-Grind to the Gore-
08-21-2013, 04:56 AM
Find
Fatalist Offline
Member

Posts: 122
Threads: 8
Joined: Dec 2012
Reputation: 8
#8
RE: How to change Skybox color over time?

Lest try this:
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
Find
GoreGrinder99 Offline
Member

Posts: 166
Threads: 47
Joined: Feb 2013
Reputation: 1
#9
RE: How to change Skybox color over time?

(08-21-2013, 03:58 PM)Fatalist Wrote: Lest try this:
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!

-Grind to the Gore-
(This post was last modified: 08-21-2013, 09:46 PM by GoreGrinder99.)
08-21-2013, 08:58 PM
Find




Users browsing this thread: 1 Guest(s)