Wednesday, June 17, 2015

Time of Day v1.4

Download: https://drive.google.com/file/d/0B08tl8_2TWd1dkd5UWZyU1RmOFk/view?usp=sharing

Changes:
- Combined sun and moon lamps into main blueprint
- Added a sky lamp so GI is no longer necessary, also embedded in blueprint
- Textured moon is now an option
- Compass can now be moved around in the 3D view for better visibility
- Cleaned up settings, removed useless options

Notes:
This version is a lot cleaner than the last one, now all you should need to do is drag and drop the dome into the level, no lamp setup required.  (Make sure you delete any preexisting sun/moon lamps.)

Known issues:
- Textured moon does not go behind clouds

Friday, June 12, 2015

Time of Day: v1.3

This update isn't as polished as I wanted it to be, but it was taking forever to finish so I figured what the heck.

Download from gdrive: https://drive.google.com/file/d/0B08tl8_2TWd1aGtwaTBWZG5xN2s/view?usp=sharing

Changes:
- Fixed bright night sky
- Sun axis can tilt
- New and improved direction functionality with compass
- Misc. fixes

Notes:
- The sun and moon lamps are still separate from the BP, you will need to add them yourself and fix the references in the skydome BP, see the included example map for details.
- If nothing is happening, make sure your lamps are "movable" and the time speed is fast enough to see.
- The first person blueprint example stuff is included in the download, if windows asks if something will be overwritten when you copy it it's probably that.

Monday, June 23, 2014

Time of day blueprint guide

This is a guide on how to use this blueprint: http://gregoryjb.blogspot.com/2014/06/ue4-time-of-day-setup.html

After running the sample map, the first thing you'll notice is that the sun moves waaaay too fast.  To slow down the sun, change the "Time Speed" variable.  Time Speed is a ratio of game-time to real-world-time; e.g., setting it to 24 will make 24 game-hours go by in 1 real-world hour.

With that out of the way, let me go over how to set up this blueprint in your own maps:


Setting this blueprint up in your own maps

- Delete the default skydome;
- Drag-and-drop the day-cycle skydome into your map;
- Set the "Directional Light Actor (Sun)" variable to equal your sun lamp in the map;
- (Optional) Set the "Moon Actor" variable to your moon lamp in the map;
- Set your sun and moon lamps to "movable" and disable static shadows;
- (Recommended) In the World Settings, under "Lightmass," check "Force no precomputed shadows";
- Rebuild lighting.

That's it, you should be good to go!  I highly recommend using this setup with LPV GI, you can find more information on it here: https://wiki.unrealengine.com/Light_Propagation_Volumes_GI


Quick breakdown of the most important properties

Default Hour - The time that we start at when we play the map;

Time Speed - Speed of time in ratio of game-time/real-world-time;

Sun Speed Curve - ADVANCED:  This curve gives you precise control over the movement of the sun vs. the actual time.  For instance, if you wanted to make days last longer, you could use this to slow down the sun for the duration of the day.  Just ignore this property if you don't need such functionality.

Moonlight Intensity - The brightness of the light from your moon actor; note that this must be set here, and not in the moon lamp's settings;

Use Day/Night - Uncheck this if you want to disable the dynamic features of the blueprint;

Display WorldTime - Logs the current time to the screen every frame, uncheck to disable.

Thursday, June 19, 2014

UE4 Time of Day Setup

My blueprint for a fully dynamic day-night cycle setup.  Download here.

Quick setup instructions:

- Extract archive;
- Copy the "Content" folder into your project folder (it should merge with the content folder already there);
- When it asks if you want to merge folders, say yes;
- Launch UnrealEd, and load the project you copied that folder to;
- Go to 'File > Open Level' and choose "TimeOfDayTemplate.umap" (it should be located under \YourProject\Content\Maps);
- Hit simulate, and watch the sun move!

Experiment with the properties in the blueprint.  I've written comments for all of them (I think), so it shouldn't be too hard to figure it out.  Quick tip: If you want to change the speed of time, "Time Speed" is what you're looking for.

For more details and information, see here: http://gregoryjb.blogspot.com/2014/06/time-of-day-blueprint-guide.html

Versions/Updates:

Version 1.2, 6/23/14, http://www.filedropper.com/daycycleskydome12
Added support for a moon;
Improved organization of variables, added new "ToD - Debug" section;
Fixed sun to move from East to West;
Sun's rotation is now calculated from a curve, use this to set sunrise/sunset times;
Added sample map;

Version 1.1, 6/19/14, https://drive.google.com/file/d/0B08tl8_2TWd1RzM3TE01VFlzYzQ/edit?usp=sharing
Changed sun's rotation to be based on time, not vice versa;
Split into multiple functions, for readability;
Various minor improvements;

Tuesday, March 11, 2014

First Blog Post.

Test blog.  Let's see what this does.

This should be an image:
Bold Italic Underlined