Author Topic: day/night alternating skies  (Read 2744 times)

Cobo

  • Autococker
  • Posts: 1362
day/night alternating skies
« on: October 16, 2005, 06:19:05 PM »
i think it would be prety cool to have like maps with a sky that changes from day to night, and from night to day each round or maybe to change slowly while time passes.
wouldnt it be cool?  :D

Zelda

  • PGP
  • Posts: 20
Re: day/night alternating skies
« Reply #1 on: October 16, 2005, 07:18:59 PM »
And rain, and snow, and thunder, lightning, tornadoes, volcanoes, earthquakes and big chunky pieces of meteors!  :D

Yes, that would be the day, cool as icecream.

Eiii

  • Autococker
  • Posts: 4595
Re: day/night alternating skies
« Reply #2 on: October 16, 2005, 11:20:04 PM »
Actually, I really like the day/night idea. The sun could be completely different from the sky, and the sky could have sunsets and stuff.

* eiii is excited.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: day/night alternating skies
« Reply #3 on: October 17, 2005, 11:41:55 AM »
Two problems:  The skies are pre-rendered, and the lightmaps are pre-calculated.  Each takes several minutes, and sometimes more than an hour to complete.  It would not be possible to do these in realtime.  Not with current hardware, and not at the same quality they have now.

Also, maps only last a few minutes anyway, so it's not like it would change from day to night in that period of time.

Cobo

  • Autococker
  • Posts: 1362
Re: day/night alternating skies
« Reply #4 on: October 17, 2005, 05:00:42 PM »
well it doesnt has to be like a 24 hour cycle :P
it can be like each day/night could last a minute, or just one round day and other round night!
:)

Eiii

  • Autococker
  • Posts: 4595
Re: day/night alternating skies
« Reply #5 on: October 17, 2005, 05:12:31 PM »
Hmmm... I didn't think about the light.

This solution is a horrendous waste of time, and require changes to the mapformat/compiler, but it could do four light render passes (sunrise, noon, sunset, midnight) ano have them fade between...

Way too hard, but an idea nonetheless.

BSoD

  • Stingray
  • Posts: 51
Re: day/night alternating skies
« Reply #6 on: October 18, 2005, 02:47:51 PM »
Variable for Darkness_Factor, set to 0 for noon and -XX for Midnight. Use these values and change the sky picture depending on time of day, with an int that stores the current time. If int >4 (aka full cycle done) int = 0 (aka noon again) and with each round int++. Then use the Darkness_Factor to decrease the brightness of the light, therefore making it seem darker..

Though I'm not sure if you can do that easily with the lights, since users make maps and add light origins..

Edit:
And the pre-rendered sky type thing, have 4 pre-rendered switching ones and for dark maps have a var that means "Dont change light" (Possibly)

IronFist

  • Autococker
  • Posts: 1304
_
« Reply #7 on: October 18, 2005, 04:14:05 PM »
Post removed
« Last Edit: July 25, 2010, 11:08:32 PM by IronFist »

BSoD

  • Stingray
  • Posts: 51
Re: day/night alternating skies
« Reply #8 on: October 18, 2005, 04:49:36 PM »
Lighting transitions wouldnt be choppy because there could be 2 ways to do it:

1. Slowly decrement current light untill new light value is reached
2. Change light between round, with big jumps in time. 3 rounds per Time change (or so).

Eiii

  • Autococker
  • Posts: 4595
Re: day/night alternating skies
« Reply #9 on: October 18, 2005, 05:05:02 PM »
The first wouldn't be that bad, but it would be impossible to code.

BSoD

  • Stingray
  • Posts: 51
Re: day/night alternating skies
« Reply #10 on: October 18, 2005, 05:14:52 PM »
Code: [Select]
int light_value_subtract=40; //Example for how dark to make it
for(int i=0; i<light_value_subtract; i++)
{
      current_light_value--;
      //Some sort of waiting here (sleep type timer class)
}

Or if its Light values that make a huge difference from 2 to 1, use decimels in the for loop.

Eiii

  • Autococker
  • Posts: 4595
Re: day/night alternating skies
« Reply #11 on: October 18, 2005, 05:34:13 PM »
It's not that simple. Ask jits.

jitspoe

  • Administrator
  • Autococker
  • Posts: 18802
Re: day/night alternating skies
« Reply #12 on: October 18, 2005, 06:11:24 PM »
It would be possible in something like doom3 where the lighting is realtime (and slow), but Paintball2 uses precalculated lightmaps.  They're textures.  I mean, I could do something cheesy like make the whole lightmap darker, but I don't think it would look very good,  And does it add much to the game?  It just makes things gradually harder and harder to see.

BSoD

  • Stingray
  • Posts: 51
Re: day/night alternating skies
« Reply #13 on: October 18, 2005, 06:21:12 PM »
It would be possible in something like doom3 where the lighting is realtime (and slow), but Paintball2 uses precalculated lightmaps.  They're textures.  I mean, I could do something cheesy like make the whole lightmap darker, but I don't think it would look very good,  And does it add much to the game?  It just makes things gradually harder and harder to see.

Ah n/m then, I was thinking the light were realtime or.. well something different then textures.