Game Development Community

TGEDayNight Released!

by Prairie Games · in Technical Issues · 12/05/2002 (9:01 am) · 143 replies

Here is the Day and Night Cycle stuff as featured here.

*** Sorry, over the years we've lost this file. Please foward to Support@PrairieGames.com, thank you.
The source is available: HERE!

This is in GNU patch format... read the docs...

EDIT: I added the 2 TMU support for the interiors, get it from the link above :)

EDIT 2: Fixed a small problem with the horizon and made Sunrise/Sunset/Clouds much more dynamic/vibrant, highly recommended... the source is available from the link above or down below in the thread


Cheers,
-Joshua Ritter
Prairie Gamesm Inc.
#121
12/21/2003 (3:32 pm)
Sky* sky = (Sky*)Sim::findObject("Sky"); doesnt work on the client, only on the server.

By defining "static Sky* mSky;" and following the same methods used to include the fxSun you can get all this working great on the client, how ever Im not sure of the fall backs of doing it this way.

Or you can do it James's way in next post.
#122
12/21/2003 (3:47 pm)
Sam,

Try this inline function i made :

inline Sky *getSky()
{
	if (<Insert Appropriate Check to test if this is a client>)	// Client
		return gClientSceneGraph->getCurrentSky();
	else					// Server
		return (Sky*)Sim::findObject("Sky");
}


(Replace the appropriate code in the if statement to check if you are client side or not. e.g in hobb's daynight code, i have "DaylightCycle::mSun != NULL")

Then get the sky via :

Sky* sky = getSky();

Let me know if it works.
#123
12/22/2003 (2:47 pm)
Patched against the new HEAD w/ a little trial and error, but had it up and running in under 15 minutes.

Problem is, I think I missed the fix (if any) for the interior lighting issue.

I saw a suggestion that it might be light objects in the interior, so I removed them all. Same result.

What was the fix for this, or where is the place to start digging for an answer?
#124
12/23/2003 (12:09 am)
Sorry that i don't know how to apply the patch to the current TGE with TortoiseCVS, can someone give me a hand? Thanks!
#125
12/23/2003 (12:59 am)
Read through this page.

For any problems read my posts above, as from Dec 05, 2003 10:46 CET for example.

I hope this get's you started.
#126
12/23/2003 (4:49 am)
Bryce,

If your interiors are too bright, try relighting your mission with different levels of ambient light.
#127
12/23/2003 (2:10 pm)
Oddly enough that works.... Which made me think... TGEDayNight simply isn't modifying the ambient light of interiors.

In the end I managed to shoehorn matching ambient light levels. Shadows still aren't casting right, but I'm not so saavy as to tackle that just yet.

No promises, but I'll try to take some time and retrace my steps over the holiday and post the changes.
#128
12/23/2003 (6:15 pm)
Marco Meier,

I have downloaded the patch.exe and perform the patch, however, the following appear during the patch at command prompt:

C:\Torque>patch -p1 < TGE-DayNight-05122003.patch
patching file 'engine/environment/atgeDayNight.cc'
Assertion failed: hunk, file patch.c, line 321

This application has requested the Runtime to terminate it in an unusual way.
Please contact the application's support team for more information.

Any idea? ~_~ Thx!!
#129
12/24/2003 (7:59 am)
@Samme:
That patch command shouldn't fail on atgeDayNight.cc since it is actually creating that file. I know the patch file I generated does apply fine with GNU patch but I don't know for other hybrids. Where does your patch executable come from?

Vincent
#130
12/24/2003 (7:36 pm)
Vincent,

I have downloaded the patch from the page introducted by Macro(GNU tools).
I have also tried the WinCVS's patch, but still fail.

Samme
#131
12/25/2003 (12:13 pm)
Is anyone having fog volume problems after applying this?
#132
12/25/2003 (8:09 pm)
I can patch now. I think it is the problem of my XP's language setting.
I required to change to non-Chinese setting in order to patch.
Moreover, I also find the same problem with QuARK, it cannot work in Chinese environment.

However, after I can view the day/night effect, I found the tree are still bright even in night mode, is it the problem of the texture setting?

Thanks.
#133
05/03/2005 (4:44 am)
Can anyone help me to find the source code of the TGEDaynight. I think the link stated above is not working at present.

Any other link from where I can download the source.

Thanks
#134
05/03/2005 (4:49 am)
Search the resources.
#135
05/03/2005 (5:06 am)
Try this.

Not sure if its exactly what you want but....

http://tork.beffy.de/_tutorials/Environmental/daynight/day_and_night.php
#136
05/03/2005 (5:09 am)
Probally the best resource for this is:
Day night cycles with seasons
#137
05/03/2005 (5:22 am)
@Chris, I have checked the resources they are also refering to the same dead link :

http://www.actionrpg.com/twiki/bin/view.cgi/Main/TorqueDayNight
#138
05/03/2005 (10:19 am)
Jatinder,

The resource I pointed to is still there. Try it.
#139
05/04/2005 (3:21 am)
@Dan
I have implemented the same resource but facing some problems. The water bodies in my mission tend to glow at night as well as the brightness of the mission has decreased.

Any pointers.

Thanks.
#140
05/16/2006 (9:32 am)
Just wanted to know if i can still get the files, the link seems to be broken.