A closer look at Unity 3D
We’d be amiss to ignore game authoring tools when looking into emerging and new technology, so it made perfect sense when interactive developer Chris Crum dove into Unity3D. Originally developed solely for Macs, additional platforms have been added throughout the past few years including Windows, web browsers, iPhone and Wii. Chris did his research and hands-on discovery using the PC/Mac development kit.
Living room environment created in Unity3D.
The Basics Unity authoring is accomplished via a versatile IDE (which puts much of the Flash IDE to shame) and through scripts (which is where the big boys go to play). There are three programming language options including a variation of Javascript, C# and Boo (a dialect of Python). All of these are based on the open-sourced Mono framework, which is based on Microsoft’s .NET framework. Unfortunately, the Unity IDE does not include a very good script editor. This wasn’t an oversight by Unity, as they choose not to spend time and resources addressing this but giving users the ability to choose their favorite editor and use it seamlessly. So far, that goal has only partially been achieved, as setting up editors like Visual Studio, for example, can be a nightmare. Luckily, a release is coming most likely within the next month that makes Visual Studio the go-to solution for developers using Windows and programming in C#. Graphics/Performance While Unity’s primarily used for 3D graphics, 2D graphics are more than achievable and are seen in nearly every Unity game in interface overlays and menus. Both OpenGL and DirectX are supported, so yes the user’s GPU is being used to handle the heavy lifting of 3D – no big surprise here. Compared to Flash’s Actionscript, Unity Javascript runs roughly 20 times faster. Asset Importing Unity supports tons of asset types including 3D models, animations, textures, scripts and sounds. 3D applications like Maya, 3ds Max, Cinema 4D, Cheetah3D or Blender all import seamlessly, and Unity will even detect changes to those assets when they are saved. The same is true for Photoshop files. You don’t even have to save textures down to PNG, JPG, etc. Leave them as PSD files to keep the ability to turn layers on/off as adjustments are needed, and Unity will compress the remaining visible layers down into high quality DXT textures. Of course, PSD files are not the only image file type supported; you can also use JPEG, PNG, GIF, BMP, TGA, IFF, PICT and many other image formats. As far as audio is concerned, acceptable file formats are pretty straightforward: if you can play them in QuickTime, you can use them in Unity. This includes AIFF, WAV and MP3 file formats. There are also several video formats supported, including MOV, AVI, ASF, MPG, MPEG and MP4VIDEO, all with configurable bitrates supported. 3D Details Unity has more than 40 built-in shaders, including basics like diffuse and specular but also more advanced options like lightmapped bumped specular, reflective bumped vertex-lit and many more. There are also full-screen image effects like glow, blur, color correction, depth of field, edge detection, and motion blur. No 3D engine would be complete without shadows and lighting, and Unity really shines in both. Lightmaps can be used to bake vertex lights into models while dynamic realtime shadows add the final touch. All types of lighting effects are available for use including spotlights, point-lights, directional lights and lens flares. Other Cool Stuff Unity has networking capabilities right out of the box, putting multiplayer games, state synchronization, remote calls, www functions and .NET socket libraries right at the tips of developers’ fingers. Debugging is very well done; you can roll through 3D scenes, change variables at runtime and see the cause and effect of various combinations. The whole plugin is 4.5 MB download (smaller than Flash Player) and is streamlined to the point where there’s no need to restart your browser or even reload the page. Not So Cool Stuff The web plugin penetration is low compared to Flash, and Chris had a tough time tracking down stats for this. As mentioned, 2D abilities are there but are lacking and may not be amped up for a while. Most examples are in Javascript, not C#, which can deter or slow down some developers. And the decision of which version to use is tricky. The indie version is inexpensive but limited and includes a Unity splash screen, but the professional version can be very expensive. So What? As a company that designs and develops software for the advertising industry, Unity is a good fit for our more spatial/environment-oriented projects like virtual walk-throughs. And it’s definitely worth a look from anyone considering any use of 3D or perspective willing to be an early adopter of a graphically stunning technology (in some ways, not unlike early adopters of Flash Player 10).
Living room environment created in Unity3D.
The Basics Unity authoring is accomplished via a versatile IDE (which puts much of the Flash IDE to shame) and through scripts (which is where the big boys go to play). There are three programming language options including a variation of Javascript, C# and Boo (a dialect of Python). All of these are based on the open-sourced Mono framework, which is based on Microsoft’s .NET framework. Unfortunately, the Unity IDE does not include a very good script editor. This wasn’t an oversight by Unity, as they choose not to spend time and resources addressing this but giving users the ability to choose their favorite editor and use it seamlessly. So far, that goal has only partially been achieved, as setting up editors like Visual Studio, for example, can be a nightmare. Luckily, a release is coming most likely within the next month that makes Visual Studio the go-to solution for developers using Windows and programming in C#. Graphics/Performance While Unity’s primarily used for 3D graphics, 2D graphics are more than achievable and are seen in nearly every Unity game in interface overlays and menus. Both OpenGL and DirectX are supported, so yes the user’s GPU is being used to handle the heavy lifting of 3D – no big surprise here. Compared to Flash’s Actionscript, Unity Javascript runs roughly 20 times faster. Asset Importing Unity supports tons of asset types including 3D models, animations, textures, scripts and sounds. 3D applications like Maya, 3ds Max, Cinema 4D, Cheetah3D or Blender all import seamlessly, and Unity will even detect changes to those assets when they are saved. The same is true for Photoshop files. You don’t even have to save textures down to PNG, JPG, etc. Leave them as PSD files to keep the ability to turn layers on/off as adjustments are needed, and Unity will compress the remaining visible layers down into high quality DXT textures. Of course, PSD files are not the only image file type supported; you can also use JPEG, PNG, GIF, BMP, TGA, IFF, PICT and many other image formats. As far as audio is concerned, acceptable file formats are pretty straightforward: if you can play them in QuickTime, you can use them in Unity. This includes AIFF, WAV and MP3 file formats. There are also several video formats supported, including MOV, AVI, ASF, MPG, MPEG and MP4VIDEO, all with configurable bitrates supported. 3D Details Unity has more than 40 built-in shaders, including basics like diffuse and specular but also more advanced options like lightmapped bumped specular, reflective bumped vertex-lit and many more. There are also full-screen image effects like glow, blur, color correction, depth of field, edge detection, and motion blur. No 3D engine would be complete without shadows and lighting, and Unity really shines in both. Lightmaps can be used to bake vertex lights into models while dynamic realtime shadows add the final touch. All types of lighting effects are available for use including spotlights, point-lights, directional lights and lens flares. Other Cool Stuff Unity has networking capabilities right out of the box, putting multiplayer games, state synchronization, remote calls, www functions and .NET socket libraries right at the tips of developers’ fingers. Debugging is very well done; you can roll through 3D scenes, change variables at runtime and see the cause and effect of various combinations. The whole plugin is 4.5 MB download (smaller than Flash Player) and is streamlined to the point where there’s no need to restart your browser or even reload the page. Not So Cool Stuff The web plugin penetration is low compared to Flash, and Chris had a tough time tracking down stats for this. As mentioned, 2D abilities are there but are lacking and may not be amped up for a while. Most examples are in Javascript, not C#, which can deter or slow down some developers. And the decision of which version to use is tricky. The indie version is inexpensive but limited and includes a Unity splash screen, but the professional version can be very expensive. So What? As a company that designs and develops software for the advertising industry, Unity is a good fit for our more spatial/environment-oriented projects like virtual walk-throughs. And it’s definitely worth a look from anyone considering any use of 3D or perspective willing to be an early adopter of a graphically stunning technology (in some ways, not unlike early adopters of Flash Player 10).
