Game Development Community

dev|Pro Game Development Curriculum

Day and Night System

by Matt Vitelli · 05/14/2008 (6:17 pm) · 12 comments

For the past few months, I've been actively pursuing terrain and skybox code to allow dynamic day and night cycles. Day and night cycles are important, especially in sandbox games. Currently, I've been getting some impressive results that are fairly inexpensive. Currently the code requires the use of a specific art pipeline. In time I plan on making the system completely automatic so developers are able to drop levels in and automatically generate the necessary media for the level. In the future, I also plan on having a per-surface detail mapping system allowing users to add as much detail as necessary to the scene. It would also be spiffy to implement a layers system similar to Id's tech 5.


Adam Beer has been extremely helpful in his testing, feedback, ideas, and thoughts. Below is a video he created using the new terrain and sky updates:

www.box.net/shared/xa4pvflcsc

Here is a YouTube video demonstrating the skybox system.

Here is a YouTube video demonstrating the terrain shadowing updates.


i63.photobucket.com/albums/h138/eternaldark112/terrshadow1.png
i63.photobucket.com/albums/h138/eternaldark112/terrshadow2.png
i63.photobucket.com/albums/h138/eternaldark112/terrshadow3.png
i63.photobucket.com/albums/h138/eternaldark112/terrShadows4.png

#1
05/14/2008 (6:37 pm)
Awesome. I hope this will be a resource or in the next update :) I'd love day/night cycle & layered textures for terrain.
#2
05/14/2008 (6:40 pm)
This look great what type of terrain are you using ?
#3
05/14/2008 (6:43 pm)
This is using Legacy. However, this could easily be ported to Atlas2 in a matter of minutes.
#4
05/14/2008 (6:51 pm)
I'm constantly impressed with what people do with Torque. Kudos Matt and Adam.
#5
05/14/2008 (7:42 pm)
So...pretty...

Very cool stuff guys...can't wait to see more!
#6
05/14/2008 (10:55 pm)
Very very nice!
#7
05/15/2008 (12:21 am)
Awesome Matt! I would love to play with this once it's done. Keep up the exceptional work, and thanks!
#8
05/15/2008 (5:11 am)
Very cool Matt, I know lots of people are going to look forward to this as a resource.
#9
05/15/2008 (2:27 pm)
Nice!!
#10
07/29/2008 (7:49 am)
Amazing work. Any updates you could share with us? I'm eagerly awaiting a way to get it, even if I have to pay!
#11
07/29/2008 (8:25 am)
Hi Jason, it's really problematic. I've used every technique I can think of to get the shaders re enabled in 1.72, but with no luck. The sky is rendered first on the draw list, so perhaps the problem lies there. It's definitely on my todo list though, and any successful changes I make I'll definitely update.
#12
07/08/2009 (2:54 am)
Is there a way to obtain this, and if not, are you going to release it?