Without a Shadow of a Doubt

Without A Shadow of Doubt Recently, Unity made real time shadows based on a single directional light part of the free edition of Unity. I have taken full advantage of this and the screenshot you see here shows real time shadows in action, being cast and received by every piece of junk! It took some doing, but I finally got this to perform really well together just a few minutes ago.

What frame rate advances I had made in the last couple of weeks were instantly devoured by real-time shadows, and I had come to the point where my script code could not be tuned to much greater effect, as I was already running at an average of 600 microseconds per frame according to my poor man’s profiling. It had always bothered me that there wasn’t any sort of occlusion culling going on, even though the house environment is nearly perfect for it. However, occlusion culling of moving/movable objects is part of the Unity Pro feature set.

Really, though, I don’t have that many distinct view volumes in my scene, and it was pretty easy to put together some rudimentary occlusion culling of junk, since the rooms already had knowledge of the junk inside them and I already do “physics occlusion culling” by removing rigidbodies from junk not in the same room. Wow, what a difference it made! I can now turn up the shadows full-blast on a compiled build, and the framerate rarely drops below below 100fps.

Buttery Smooth Framerate This means I now have even more performance room for Material Based Shading when it arrives in Unity 5. I also implemented performance settings controls so that runtime tweaking in a built version is now possible.

I’m nearly finished with my big refactoring, I’m right up against the point where I need to temporarily break a lot of stuff to continue. Once I get past that hurdle, I’ll see what is still needed to make this game ready for the Greenlight process and Alpha release in general.