Post news RSS Move to Unity 5

The last couple of months have seen quite a bit of upheaval for Lumo, the biggest of which has been the move to Unity 5...

Posted by on

I wasn't intending to move to Unity 5, but the lack of support for Unity 4.3 going forward kinda pushed me into it. If I want future console ports then I'll have to be on the engine Unity provide for those platforms.

For the most part, the transition was pretty painless. None of my code needed updating, but a few of the packages bought from the Asset Store needed a fair amount of work. All of these were written in Javascript (ugh), and Unity's auto updater didn't seem to touch them. :(

The biggest effort has been in the lighting and materials. For speed, I've moved to Unity 5's deferred lighting model, whereas before I was in Unty 4's deferred with lighting pre-pass. This drops a whole render pass (yay) so should be faster on most machines. I also pulled out the old colour correction post process and replaced it with something that I hope is more compatible with consoles like the Vita (which doesn't support 3D textures), and added proper tonemapping. This had some knock ons:

- Each of the four zones had to be re-lit and colour graded
- All of the materials had to be moved from legacy specular to the new standard shaders
- I no longer have old-school distance based fog, which affected the mine cart and crystal maze
- Transparent materials seem to lose a lot of specular from their normal maps, and of course, ordering can be an issue.

I'm not using Unity's GI at all - my skybox is dark and I have two "suns": one for each of the back walls in a room, each of which is a different colour - and I'm still not baking any of my lighting. I know I could probably get some speed back with the latter, but I've never been able to get the same look, so I limit the number of lights and keep them realtime.

TBH, the lack of GI isn't really an issue for Lumo. I did do a quick test, but it required brand new materials for EVERYTHING and the end result picked up far too much of the skybox for what I wanted. It's a bit of work to get things looking matt while still having pronounced bumps, and tbh, I really can't be bothered at this point. It's not looking significantly better. Maybe for a sequel.

In all, it's taken a few weeks to sort all this out. And a couple of transitions where I fade the screen to white still mess with the Adaptive Reinhard tonemapper, which ducks white to grey, but I've found a couple of little hacks to get past it... :)

This week I've basically finished up the work by sorting out the transparent materials (water, bubbles, moving platforms, ice, etc.). I've had to go back to Unity's built-in water as my old shader lost a lot in the move to Unity 5, but I've simplified what they provided, made it a bit faster in HQ, and the result is almost as nice as what I had before. I still miss being able to colourise the normal map on the surface (so all the yellow highlights are missing) but it's looking OK.

Here're a couple of screenies:

April Update

April Update

So, was it worth losing a month to this? Not sure atm. For what I'm doing Unity 5's not really providing any significant improvements, but it's nice to know that I'll pick up bug fixes and hopefully be able to ease Lumo's transition onto some other platforms in the future :)

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.