Unity3 is released - some thoughts on architectural realtime visualization

The new release of Unity3D is available now. Unity3D is a full game-creation system which you can combine with (almost) any modeling software. You use it as your main game management system, where you import models and textures (assets), create scripts for all interaction and directly assemble game scenes or levels.

It is cross-platform (Windows and OSX) and allows you to make games for Windows, OSX (even if you have the "other" platform only), for a web-browser and with separate licenses for the creation of games for Android, Wii, XBox and iOS (iPhone, iPod Touch or iPad), if I'm not mistaken.

Some thoughts about Unity3D in general

Nice highlights for me:
  • realtime physics
  • prefabs for basic camera navigation
  • easy environment skies
  • directly interact with your game in the Unity editor
  • reasonably straightforward scripting (although I have learned a few things from the Game Development Essentials book as well).
We have used it last year in our CAAD classes to learn (something) about realtime architecture and had reasonably good results importing models from SketchUp and Cinema4D. ArchiCAD models were also attempted, but they passed through Cinema4D as well for best results.

Some thoughts and tips about lights and shadows

There is a free version and a pro-version with more features. For architecture students, the free version is nice, although the pro-version has some better material shaders and support for realtime shadows and occlusion culling. Lightbaking (rendering shadows onto the materials) is quite some process if you're new at it and it took me quite some time to get reasonable results due to some minor Cinema4D limitations, but I documented my process as a screen movie in Vimeo. This was done in Unity 2.x.
Step 1

SKUP2UNITY 5 : Cinema4D Light Baking (1) from Stefan Boeykens on Vimeo.
While the non-free Unity3D Pro has some options for realtime shadows and lighting, it is often quite computationally expensive (takes a lot of CPU cycles for calculations).

The last step(s) are more involved and you can not do this with SketchUp alone... You could use 3ds Max or the LightUp SketchUp plugin or other tools. But as a student you can get a free license for Cinema4D, which can help you with baking the lighting into a texture map. This will render the scene, but instead of showing it on the screen it will be rendered onto a texture map which is wrapped around (a copy of) the model.

Step 1: getting the SketchUp model into Cinema4D (using the FBX file). Set units to Meters in C4D and ensure that all texture maps are properly found. You could rename the textures folder into "tex".

Step 2


SKUP2UNITY 6 : Cinema4D Light Baking (2) from Stefan Boeykens on Vimeo.
Step 2: preparing a Sky, Ambient Occlusion and Global Illumination in Cinema4D. Then start baking the single mesh into an object (include AO and Illuminate and Single Texture). Photoshop file format is fine.

Step 3


SKUP2UNITY 7 : Cinema4D Light Baking (3) from Stefan Boeykens on Vimeo.
Step 3: the baked model is renamed (for clarity in the Unity3D editor) and the model saved. In the background, Unity3D will let Cinema4D generate a proper FBX file for import and load all. Hide the non-baked mesh and only display the baked one. Switch to a Lightmapped Diffuse material and point to the right texture maps for the material.

Beware, there are some minor issues:
* be sure to hide the original mesh in Unity3D
* if you include illumination into the baking process in Cinema4D, be sure to copy the texture map also in the Diffuse channel, to have proper UV-coordinates for the mesh in Unity. Otherwise, you end up with a black mesh.
* Inside Unity3D, hide what you don't need and make sure the correct baked textures are used by the materials.
Release 3 has some support for lightbaking built-in, but as the realtime shadows are not supported in the free version, you would still need a Pro license for full shadow baking (or bake in external rendering software).