fredag den 2. september 2016

Forefront 7: Unity technologies and lighting

This post will be about the Unity engine itself, and more specifically the upgrade to Unity 5 which occured a little over a year ago. A key aspect of software development is keeping up to date with the newest the engine has to offer, and so this post is about that new version and which aspects I could add to my game.

Unity 5 introduced Real-time global illumination, which means that, rather than stopping when it hits a surface, light will bounce around, illuminating corners and faces that would not normally have been lit. (https://blogs.unity3d.com/2014/09/18/global-illumination-in-unity-5/)
I watched some tutorials on how to set it up, and after adjusting the settings a bit, it mostly involved setting the object in question to 'Static', in the Unity inspector. Global Illumination brings a much higher degree of realism to games, and while this additional realism is not crucial in a 2D/3D cartoonish game like mine, it does make a noticeable difference in the feel of a scene, and, to me, makes it possible for the scene and the game to achieve and entirely different feel, and thus also, to introduce a different mood, something vastly important.

Here is an example of a scene without, and with Global Illumination added (in this example, whether or not the objects were set to 'Static'):


Can you spot the difference?
The picture above is with 'static' set to off, and below is with 'static' set to on.
The entire level feels much more lighthearted with this setting on I feel, and this with only static surfaces - when it comes to changing lighting circumstances, like a day--night cycle, or a bonfire, it is even more effective

While I didn't have time to introduce it in this version of the game, I have several ideas for scenes involving extraordinary lighting - the pirate main character could enter a temple where the light wuld bounce off surfaces and studded gems, or venture under a tree and light up the dark underbelly of the jungle with a torch. Even something like stalagtites and an underground lake would be possible, possibly easy, and very cool.

Update: 

Another thing coming soon (in Beta right now, which you can actually download if you want to), is upgrades, amongst others, to the Particle System! The particles can now be set to emit light onto surrounding surfaces, and a parameter of noise can also be added! These additions are wonderful, as explosions and the like will get much more realistic and easy, and the noise parameter ensures I don't have to program it myself!
Case in point - I have made a little bonfire for the game with a flickering light, but it involves several different objects and scripts, and even a Wind Zone, which I havent used before - much easier to just do it in the Particle System editor. I won't upgrade my project at this stage, but I can't wait to tinker with it!

Till next!

Sources:
Unity Technologies Blog. 2016. Get the Unity 5.5 beta now – Unity Blog. [ONLINE] Available at: https://blogs.unity3d.com/2016/08/30/get-the-unity-5-5-beta-now/. [Accessed 02 September 2016].



Ingen kommentarer:

Send en kommentar