This zip download contains two files. The first is the source code for the Time of Day Cycle light which has the name "DominantDirectionalLightTimeOfDay.uc". The second is a test map that has the light placed in it for you to try in the UDK Editor.
The purpose of this DirectionalLight was to create an easily placeable and easy to use system that could simulate the entire Time of Day (Day/Night) cycle on its own in UDK, requiring only a few settings from the developers making development easier for them.
Information:
This download contains two files. The first is the source code for the Time of Day Cycle light which has the name "DominantDirectionalLightTimeOfDay.uc". The second is a test map that has the light placed in it for you to try in the UDK Editor.
The purpose of this Directional Light was to create an easily placeable and easy to use system that could simulate the entire Time of Day (Day/Night) cycle on its own in UDK, requiring only a few settings from the developers making development easier for them.
This code was developed by Sohair Tayyab Butt and you can get in contact with me through the following:
> Email ID: (Email ID hidden because of the spam I've started receiving recently. You can find my email ID in the description present at the top of the source code file.)
> IndieDB URL: Indiedb.com
You are allowed to use and modify this code for all personal, non-commercial and/or commercial projects. If you do, my only request is that you do not remove this description also present at the top of the code file and give me credit for this piece of code in your project. Thank you!
Installation Notes:
To install this, copy the uc file into (UDK Installation)\Development\Src\Engine\Classes and then run the Editor. You will receive a message telling you that the scripts need to be rebuilt. Press Yes and the script will be compiled. After that, you're ready to use DominantDirectionalLightTimeOfDay! You can find it in the Content Browser, Actor Classes tab underneath Lights->DirectionalLights. To use the timeofdaytest map, copy it in to (UDK Installation)\UDKGame\Content\Maps.
I will soon be uploading an article that describes, in detail, the usage of this light actor in the UDK Editor.
Feedback and bug reports are both welcome and encouraged. Thanks!
Thank you for this, really helpful.
You're welcome! Check back for the article I'll upload soon explaining the in-Editor usage. Feedback is very welcome.
Thank a lot! I was searching for a Day / Night Placeable class for my learning of Unreal Script;)
I want to add a texture when the light touch the skybox, with my 'starting idea' i want to see the moon on night in place of the simple "light"
It goes take me a bit of research in the codes. Thank you again!
You're welcome! I think for what you want to do, you'll also need to modify the sky materials, especially the Night one which this code uses by default. I'm not an expert on materials but the texture that appears where the light hits the dome will probably need to be replaced by a Moon texture instead. I'll look more into this, if I can, and get back to you if I find something.
This comment is currently awaiting admin approval, join now to view.
Thanks for submitting your work. I don't seem to be able to get it working though. I've added the class to my src/mygame folder, and added the map file. I load up the map fine, but the light never seems to change.
Are there other steps required to get it working?
You're welcome. Add the code to \Src\Engine\Classes. Then, once you start the editor, it will tell you that the scripts need to be recompiled. Press Yes to do that.
Ok great. Now it's working, although would be nice to be able to add to my game folder rather than Engine.
May I ask, are there params to allow me to adjust the colors for moonlight? I'd like to put a bluish filter over it.
Great work though. Thanks :)
You're welcome! :)
Actually, you could add it to your game folder too but you'll have to add your game folder's name to an ini file (don't exactly remembet which. Will tell you later) for the unrealscript compiler to detect and then compile it.
Yes, you can adjust the light colors. You can adjust loads of things. Double click the light placed in the map and a properties window will pop up. That's where you make your changes. Here: Moddb.com
Under both Bloom Colors and Light Colors drop downs, the second values correspond to night time. You can also hover over the properties to get a description of them.
Yeah, here it is. Open UDKGame\Config\DefaultEngine.ini and add your folder name at the end of this:
[UnrealEd.EditorEngine]
+EditPackages=UTGame
+EditPackages=UTGameContent
+EditPackages=<your game name>
Amazing!! Help me a lot!!!! tks
No problem. You're welcome! :)
Hi, i pasted the .uc file in D:\UDK\UDK-2014-08\Development\Src\Engine\Classes folder, but when i starting the editor nothing to happen. i mean the editor doesn't ask to me the scripts rebuilt question, and i can't find the .uc file in the actor classes.
i am a begginer in udk, sry if it is a noob question, and sry for my english too.
thanks a lot!
Hi, Dharaan! Sorry for the late reply and no need to apologize.
This is exactly where you are supposed to copy the .uc file and it is odd that the editor hasn't asked you to recompile the scripts.
If the problem is still there then, could you please send me a PM (or email me) with the screenshots of exactly what you've done? I might be able to identify the issue that way.
Im having the same issue as Dharaan, Is there any way of fixing this? Thanks.
Sorry for replying so late. If you're checking back on this comment, email me or send me a Private Message here with your problem and the exact steps that you took while adding this to your UDK.
This comment is currently awaiting admin approval, join now to view.