Daggerfall Unity – Cities

The code to import cities is now working, and crikey does it need some improvement. Importing a full city into Unity takes around 10 seconds (compared to less than 1 second in Daggerfall Modelling) and results in a massive scene hierarchy requiring over 5000 draw calls per frame! Obviously this won’t be good enough for a final version. I don’t even have ground planes in yet…

dfunity-city1

The good news is this can be easily improved. Daggerfall Modelling made heavy use of caching, batching, mesh combining, and texture atlasing. I can do the same in Unity to bring those numbers right down. However, I will leave in the ability to import fully atomic scenes in case someone wants to see the native layout without regard to performance. Actually, I think even that can be streamlined. Lots of work to do, but I think I’m on track to finish in a few months as planned.

Edit: I implemented basic caching and mesh combining, and performance is great again. Even the fully atomic scenes load in a few seconds and only require a few hundred draw calls in heavy environments. Unity’s dynamic batching is really awesome. This will get even better once I implement atlasing.

One more thing, the source code is now online. I’ll be updating this every day or so. If you’re really keen you can grab the code and copy it into a Unity project to play with. However if you wait a few days, I’ll create a .unitypackage for download with a manual included.

https://code.google.com/p/daggerfall-unity

 

Posted in Daggerfall Tools for Unity.