Wednesday, February 17, 2016

Unity 5.3 vs 5.4 beta lighting differences


I've recently tried upgrading my project, The Rise of Dagon, to Unity 5.4 beta 3 and it was such a disaster I lost a complete day of productivity and I had to revert my backups and go back to Unity 5.3.

The biggest problem was Substance support seemed to have gone completely out the window with the normal maps of substances not compiling at all and the metal/specular side of things gone completely through the roof so everything looked 100% shiny/metallic and therefore almost black with shiny reflectivity.

Despite that I did want to see what screenspace reflections might do for my project so I went ahead and gave this another upgrade try this weekend and things went a little bit better.

Substances still do not upgrade correctly - although the normal maps are compiling.  I had to bake the substance texture out and create my own material for the material to work in the game.

While I have not had a chance to really play with screenspace reflection feature yet I did notice some really dramatic (and good) differences in the lighting and shadowing that's going on.(Check out my comparison screenshot at the top.)


The Rise of dagon  uses almost completely real time lighting because the level is built at run time and therefore can not be baked. The reason for this is to eventually permit my players to have a level editor and built their own levels while in game - so they do not have to download Unity and build a level out and bake the lighting themselves.

This image shows more 5.3 lighting problems with the odd rim of light on the floor  where it shouldn't be.


For some reason in 5.3 real time lighting has consistently had problems with drawing good shadows, and spotty results in lighting where things would get washed out .. almost blurry.

In 5.4 beta things are looking really sharp and good - almost exactly the way I would like them to so fortunately this time it was worth the work of upgrading to the beta.

This is particularly fortuitous for me because I'm hoping to start working on my kickstarter video in the next week or so and having really shoddy lighting and shadows was going to be a complete nightmare from my perspective.

I had really hoped the lighting in Unity 5 would be a slam dunk out of the gates but it's been a real roller coaster ride, trying to get some level of consistency  and it seems each .x release has made significant changes - but never really 'getting it right'.  Many of those changes really seemed focused on the GI baked problems - particularly trying to bake lighting can take an exorbitant amount of time!

I had considered a hybrid approach where I would build my levels one way with baked lighting, and permit my customers to build it at runtime and use only realtime lighting but I realized this approach would cause me to let the realtime side of things slide out of sight while I focused on the baked approach.  The fact that baked lighting has been almost impossible to work with made that decision much easier though.

At this point I truly fear Unity won't get lighting 'right' until the 6.x cycle - I'm hoping I can get my game on some build like this 5.4 where it gets it close enough to the look and feel I need and then lock in and finish the game up.