generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Using fog while having 'day' and 'night'.

Previous Thread :: Next Thread 
Shobobo99 is not online. Shobobo99
Joined: 30 Dec 2008
Total Posts: 5754
31 Mar 2012 07:37 PM
I was thinking of adding a bit more atmosphere to my game, so I decided to make the fog thicker (make it noticable) and make the day pass into night and back into day.

I ran into a problem however, since at night the fog was still bright even though everything else was dark.

I then decided to make the fog cycle evenly from darker to brighter then to darker. However, light throughout the day does not evenly shift from bright to dark and then to bright again. The major differences are when the sun sets or rises.

What would be a good formula for changing the fog darkness/brightness based on the time of day then? It cannot be linear. I know of the lighting methods such as GetSunDirection, but not on how to use them in this situation.
Report Abuse
xSIXxStorage is not online. xSIXxStorage
Joined: 22 Aug 2010
Total Posts: 1811
31 Mar 2012 07:43 PM
they really need to make fog cover the sky box, then this effect will look decent.
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
31 Mar 2012 07:44 PM
Very much agreed.

~I happen to speak fluent Pokémon.
Report Abuse
JulienDethurens is not online. JulienDethurens
Joined: 11 Jun 2009
Total Posts: 11046
31 Mar 2012 07:56 PM
I ran into the same problem, and, since I am a perfectionnist and I refuse to "guess" the color and to not use the _EXACT RIGHT COLOR_, I decided to just either not use fog, either not make the day and night cycle.
Report Abuse
Derpster5oo is not online. Derpster5oo
Joined: 15 Oct 2011
Total Posts: 430
31 Mar 2012 07:57 PM
@Julien

I imagine you have OCD.
Report Abuse
1Ra is not online. 1Ra
Joined: 02 May 2010
Total Posts: 2400
31 Mar 2012 09:01 PM
They need to make fog local.
Report Abuse
Ozzypig is not online. Ozzypig
Joined: 27 Mar 2008
Total Posts: 4906
31 Mar 2012 09:26 PM
I a day/night script a while ago but never released it. It tweened between colors to respect day, night, dawn and dusk.

If there's sufficient interest I'll upload it to ROBLOX.
Report Abuse
JulienDethurens is not online. JulienDethurens
Joined: 11 Jun 2009
Total Posts: 11046
31 Mar 2012 09:43 PM
Unless you found a way to know the _EXACT COLOR_ of the sky, then I have no interest in it.

This is why the admins need to add a GetSkyColor method.
Report Abuse
nate890 is not online. nate890
Joined: 22 Nov 2008
Total Posts: 21686
31 Mar 2012 09:50 PM
"Unless you found a way to know the _EXACT COLOR_ of the sky, then I have no interest in it."

Well, manually you can do it by opening a paint program, and by using the clone colour tool you can get the exact RBG of the colour.

But that's manually D:'
Report Abuse
LPGhatguy is not online. LPGhatguy
Forum Moderator
Joined: 27 Jun 2008
Total Posts: 4725
31 Mar 2012 09:51 PM
@nate890
But if we sample the colors at the sky's lightest, the sky's darkest, and the extremes of the sunset/sunrise we should be able to just lerp around with it.
Report Abuse
1Ra is not online. 1Ra
Joined: 02 May 2010
Total Posts: 2400
31 Mar 2012 09:53 PM
^
then put it all in an array like this:
FogColors = {
     ["12:00:00"] = color3.new(0,0,0),
     ["12:30:00"] = color3.new(0,0,0)
 etc...
}

Report Abuse
Radioaktiivinen is not online. Radioaktiivinen
Joined: 25 Apr 2009
Total Posts: 18629
01 Apr 2012 05:37 AM
Check out my last cit yof robloxia or whatever it was, i replaced the sky with a huge billboard to be able to set its color as the same as the fog.

It also has a sun. :3
Report Abuse
lordmerick is not online. lordmerick
Joined: 01 Nov 2010
Total Posts: 15213
01 Apr 2012 07:10 AM
Check the Inside of the script, Look closely or add a skybox.

Can't do it then leave it.

☭ You are what you eat, Sorry Already was a cookie ☭
Report Abuse
booing is not online. booing
Joined: 04 May 2009
Total Posts: 6594
01 Apr 2012 01:31 PM
^
........................................................
>Can't do it then leave it.
>C&Ger
>Primary group
>Acting like this is your forum.
GOBWEY. Never, ever, ever come back. I will pass down your name in shame to my children and their children, and then tell them to pass it down recursively.
Report Abuse
Shobobo99 is not online. Shobobo99
Joined: 30 Dec 2008
Total Posts: 5754
01 Apr 2012 01:38 PM
Okay here is how I decided to do it. Julien isn't going to like it lol.

I'm just using the grayscale here.
I just made the brightness the same throughout the day, and the darkness the same during the night.

During sun set and sun rise is when the brightness/darkness shifts to the next phase. This lasts about 90 minutes, or in real time 90 seconds.

I also made the fog creep closer and thicker during the transition to night, and become thinner and farther away during the transition to day.
Report Abuse
Shobobo99 is not online. Shobobo99
Joined: 30 Dec 2008
Total Posts: 5754
01 Apr 2012 01:39 PM
Ah, I forgot about the lighting's Brightness property which may confuse people. By 'Brightness' or 'Darkness' I refer to the color of the fog from white to black.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image