Researching a replacement for Dynamic shadows

I have recently been really interested in the game Recore, a Unity game that is getting a fair bit of coverage on the Unity Blog about how they do stuff in the game, especially a game that launched in a quite janky fashion (they have patched it since and the 30mins to an hour I have played so far has been pretty fun). Along with some projects I am working on at the moment, this has spurred me on to have a look of graphics cheats to get the same effect, but cheaper, so the game can look stunning, but also run well.

When looking at performance, one of the areas my mates and I have noticed issues is with dynamic shadows in Unity. We have found these can be quite expensive and actually a lot of areas to do with real time lighting can be expensive. With environments you can bake these down into lightmaps which helps, but with characters moving around, this is not quite as easy. As an alternative to unity’s “out of the box” solution, we can use a fancy feature called Projectors.

Before we start, lets do a quick test. I have taken the my JRPG test scene and removed all but one soldier and one hero.


Currently I have one directional light and  that is applying Soft Shadows which is producingthe following performance stats.



Now if I switch the directional light to No Shadows.


You can see the batches, tris and verts have dropped a fair bit.

Before we go on, if you don’t know what the stuff in this window means, you can look at the Unity Docs.

Cool, so we saved some batches, some rendering passes and cut down the number of verts drawn. But we don’t have any shadows.

What about blob shadows? You know little round blobs that are put at the players feet. This was an interesting discovery. The Unity manual actually mentions a built in Standard Assets projector that projects a blob shadow, but for the life of me, I can’t find it anywhere. So I did some digging around the asset store and found this nifty little package. Which is actually a better solution (as blob shadows are a bit cheap right?).

This goes one further and creates a render texture of the target that is projected. If you want to go into more detail, the package comes with full source, but TL:DR it produces the same effect. Here is what our scene looks like with our new solution


Despite my projector placement been not quite perfect…. moving on.

Let’s have a look at the stats:



As you can see, we have less batches and less verts and tris versus Unity’s inbuilt dynamic lighting.

So, on the surface level, it seems that using the render texture projector combo saves us some performance. COOL! We still need to test this further on target devices, but hey, it is a start!

I guess my point here is that whilst Unity’s out of the box stuff is cool, it may not be the most performant, so it is worth having a look at alternative methods… especially when it comes to graphics techniques!

Still Alive!

Hey guys!

Just a quick one to let you know I am still alive. I have been super busy over the past couple of months with buying property, full time job and a lot of game dev on “Project Winter” going on.

I have been dabbling with various technologies and solutions, trying to find the best solution for projects in the future. What I have summed up is unless you have ateam of 1000 odd people, it is dumb to build your own engine, however at the same time never expect what comes out of the box is going to work for you and invest in tools to make the platform you are working on work for you in the right way. In other words, although I have realised I can still do my C++ and MonoGame recently, I will be mostly sticking with Unity. Why? Although I tried Unreal and Cryengine briefly, I find Unity still to be the friendliest tool so far. Most of my time now is going to be spent making my game with my mates (and work of course) but also building on top of Unity and solving problems that we come across everyday.

My end goal is to have a really sweet set of reusable tools and techniques that can be taken across a variety of projects and may be one day build something as ambitous as FFXV in Unity (ambitous and a bit riodiculous I know, but hey, one can dream).

Speaking of which… check out the cool Base Battle Footage again:


The Console game has begun to fragment. And that is bad.

Hello! I know I haven’t been around lately. Things have been very busy with work and buying a flat and all that jazz and I completely forgot about my blog. Terrible.
Anyway, I wanted to talk about a recent development that seems to be coming to the console business. Fragmentation. The 3DS already did it and no one cared, Microsoft talked about it and now it seems like Sony are actually going to do it. If you don’t know what i am talking about, Sony have decided to release the Playstation 4.5. Codename Neo. This is a more powerful PS4 with some interesting developer guidelines. Giantbombs podcast goes into more detail, but the long and short of it is that games can harness the power from the PS4.5 but also have to support the older console. The worry here is that we could get into a Hyrule Warriors 3DS situation, where games are essentially unplayable on the older console. Sony have also said nothing about if the older one will get phased out. They have gone down the PC route with a fixed piece of hardware.
This isn’t bad for consumers. They are fickle creatures who will adapt. This is bad for Sony. They sold 35 million units already to lots of happy customers and have the potential to alienate them very quickly and on top of that, lose business and turn their comeback console into the PS3 or worse the Vita. OK, the latter is pretty drastic, but you get the idea.
So what is bad about fragmenting the console base and going down the PC route.
Well for starters they have gone down the PC route and are now facing a strong competitor. The PC. Lets say they release a hardware revision at the end of 2017. How much are they going to price it for. Another £350? And is there any guarantee they won’t do it again? People are not stupid. Even the dedicated fanboys will clock on to this.
And, in my opinion, at time of writing, the PS4 still lack the “killer app”.
Destiny? Yeah I am sure we will see something similar or at some point even see Destiny itself on PC. Uncharted? A franchise that is getting tired and isn’t exactly a household name that say Halo is. Killzone? Terrible game. God Of War? Have you played Devil May Cry?
You get the idea.
So what is my point. Well my point is you can buy a PC for the same price along with a steam link if you wanted, hook up a controller, fire up big picture mode and have the same experience with the same if not more games. And when that 3 year console revision roles around. You upgrade your pc for £100 or so for a new graphics card and keep on gaming. They stop buying PS4 copies of multi platform games and head to Steam.
The second is the added costs for developers. If TCRs come through saying that devs now have to develop for both PS4 and PS4.5 and they are hard and fast… well the added dev cost could become quite significant, putting a lot of developers off developing for Sony’s console, which then means less titles to purchase.

The rise of PC and mobile gaming is happening and this has the potential to speed it up. Which is a shame, as I have always loved the simplicity of console gaming. I’m hoping in reality that most of the 35 million players will have the same attitude about it as me. Still buy the games to use their old PS4s, and not upgrade. Make it like the New 3DS. Where no one cares, developers still make great games for the hardware they had in the first place and this never happens again.