Archive for the ‘unity3d’ Category

Tuesday, March 18th, 2014

Well it has happened, Unity announced WebGL exporting.  This was a much needed announcement and our flash man on the inside, UnitZeroOne / Ralph Hauwert of good ol’ Papervision days, helped make it so. Thanks Ralph and Unity team!

This feature is in Unity 5 as a preview just announced but with the impending plugin-pocapyse I am sure it is a major focus at Unity to get to production stage.

The plugin-pocalypse is happening. Both Google Chrome and Mozilla Firefox are taking issue and removing plugin support.  Recently I was a bit worried about web exporting and the player/plugin support as NPAPI is being deprecated in favor of PPAPI in Chrome, so Unity, Silverlight and other NPAPI built plugins would have to be rebuilt in PPAPI (unlikely as Unity already maintains NaCL) or another path. Chrome will not allow NPAPI plugins to run at the end of 2014 and already warn each time you use them. Side note: Flash plugin has been updated to PPAPI and will not go away at the end of the year, Unity player won’t either but it may not work in Chrome without explicitly allowing it or at all, still to be seen however they said they will stop supporting NPAPI December 2014 and all NPAPI plugins will no longer work. Mozilla also is fighting against plugins in favor of standards like WebGL so this entirely solves it for Firefox, for Chrome it will still run but slightly slower so there is a transition period.

Mobile really killed the plugin but it opened up standards that allow WebGL to take over. I am happy to see Unity jump on this and bring a better web export that is in line with the best out there currently with asm.js/WebGL and the performance it can bring.

Unity really does add a tons of value if everything just works in WebGL exporting as 2d in WebGL is very mature with lots of supporting platforms, but 3D and stable engines are still lacking.  (Until of course Three.js rules the world and may when it is easier to use WebGL in native apps for store like this). Let’s hope browser support for asm.js and Firefox native speeds grows, but most Unity games will run without needing it (2d games, simple games that already run well in WebGL performance ranges).  So you can easily see the Unity Player, NaCL exports going away over the next few cycles when WebGL exporting is solid possibly if it isn’t already. Another option is a grace period where Chrome exports need to be NaCL for a while if the WebGL support isn’t ready for primetime by then but from what it looks it may be there (although full support can take some time). The plugin-pocalypse is here but there is a path forward, granted game portals and other sites that host current Unity player content may have alot of work to do this year.

This change couldn’t come soon enough as we had to start thinking about other options for web content, Unity successfully hurdled this one.

There are tons of other great things in Unity 5 (currently up for pre-order) and will be out later this year, but WebGL and “plugin-less” exporting is the driver on this version and we are bought in for the next round.

Unity 5.0 Announced Features

  • The aforementioned “Early Access” to WebGL support meaning no plugins required in compatible browsers
  • 64-bit CPU support
  • Real-Time Global Illumination — the over-simplified version: the lighting system used by games like Battlefield 4 and Eve Online (a system called “Enlighten) for their more advanced lighting tricks is now built into Unity.
  • Light baking previews — Light mapping can take a while because every little tweak required a complete rebake. Light maps can now be previewed in real-time.
  • Unity Cloud — Remember the built-in ad solution that Unity announced around the middle of last year? That’ll launch with Unity 5.
  • New audio system Both more efficient and more powerful. Unity 5.0 has a proper audio mixing board to help developers tweak the way things sound in different in-game environments.
  • Nvidia PhysX 3.3 While Unity has used Nvidia’s physics engine for years, the version built into Unity 4.0 has been outdated for a while now. 5.0 taps PhysX 3.3, which is up to 2x as fast.

Unity 5 will probably be available later in the year and may launch around Q3/Q4, can’t wait to play with the WebGL exporter. Here’s hoping it is solid by the end of the year.

Thursday, July 29th, 2010

Pretty sweet web racing advergame for Disney’s The Sorcerer’s Apprentice by C4RL05, made with Unity. Carlos Ulloa is of course the same dude that made the Unity HelloRacer. He is also famous for starting Papervision3D for Flash but has been doing some amazing work in Unity for more immersive 3D experiences.

The game is another example of how when you need really immersive experiences for advergames or brands, Unity is looking like a great choice. Unity isn’t perfect for many things that Flash is such as video, 2d games, mixing media, mic/cam apps, and data, but for games where 3d is required it seems to be the way to go.

Friday, July 2nd, 2010

Unity is a great and agile company that responded to the iOS4 changes with something very nice, a C++ option to develop with the Unity engine on the iOS. They will implement this if using Mono is barred which so far hasn’t happened.  I have to say I wish this was an option for the Unity Engine all the time and hope they implement it anyways. For now Joachim Ante on the the Unity blog says this:

We continue to be excited about the iPhone, iPod touch and iPod as platform targets for Unity developers. While we don’t think C++ is the best language to write game code , using C++ as a scripting language has memory and performance advantages on low-end devices. This is a great feature to have for developers who want to squeeze the last ounce of memory & performance out of their games.

We still can’t believe Apple will force developers into choosing a specific language for development. And as mentioned, Apple is still approving every Unity-based game we know of. In case the situation changes, rest assured that we are working this Plan B.

We’ll be ready to talk more about this as well as share some time-line information with you soon, while of course waiting to find out if any of this will actually be necessary.

The Unity Plan B is that the C++ engine code that mimics as closely as it can to the Mono .net C# or Javascript code. From the samples on the blog the C++ and Mono (javascript in this case) samples are really similar.

Many current engines are legacy or have lots of bloat, unless you write your own, or maybe even still then. Though this is looking really clean for C++ game engine code, at least in comparison to current industry leaders for indie engines.

It would be a beautiful C++ library to use even if Apple doesn’t require it. Compared to the other indie game engines out this would be a sweet C++ engine for indies and hope they do this no matter. C++ can be written cleanly and with influence from a simplified C#/Javascript engine and clean API it makes for a killer C++ engine that makes sense. Right now native is really attrctive on embedded for some years to come.

A very basic comparison from their blog:

Javascript Sample

function Update(){
    //Spin the object around the world origin
    transform.RotateAround(Vector3.zero, Vector3.up, 20 * Time.deltaTime);
}

C# Sample

using System.Collections;
using UnityEngine;
public class Example  : MonoBehaviour {
    void Update(){
        //Spin the object around the world origin
        transform.RotateAround(Vector3.zero, Vector3.up, 20 * Time.deltaTime);
    }
}

C++ Sample

#include "UnityEngine.h"
class Example : public MonoBehaviour {
public:
    void Update() {
        transform.RotateAround(Vector::zero, Vector3::up, 20 * Time::GetDeltaTime());
    }
};

Things I am wondering…

  • Will this help porting to Android versions if they use the NDK?
  • How much smaller will my app be if I use the C++ version (attractive feature since the mono dlls are pretty big – even though I really dig mono)?
  • Wouldn’t a C++ version be a better base with pluggable scripting in C# if you want? Maybe an option for Lua with a similar API signature for all? Ok maybe over-engineering there…
Wednesday, December 2nd, 2009

If the question is if Unity can do interactives as smooth and stylish as Flash I think you may soon find out.  Carlos Ulloa of Papervision 3D fame has kicked it up a notch in Unity 3D with this interactive very reminiscent of the Ford Focus demo that helped bring in Papervision 3D for flash in style. Gotta say though a mini is much better than a Ford Focus.

Flash is still the leader in web interactives and even marketing interactive 3d, Unity largely replaced Director and tools like it and high-end hardware rendered required interactives and games. This interactive by HelloEnjoy has loads of polygons, unity physics system, lighting, environment mapping, showroom cameras, reflection, skid decals, highly detailed mesh and more.  Just take a peek inside the vehicle and at the rims for the detail that is impossible with the 2000 poly limit of Flash 3D software rendered engines.

Web interactives this heavy aren’t doable in a non hardware rendered player like Flash.  Unity is looking to pretty much own this level of quality in a browser.  I don’t think I have seen another interactive looking this good with Unity 3D.

Unity still is lacking many features that Flash has in support of making interactives for the web such as webcam support, mic support, better video support, better gui system, html support (although flash barely) and a larger install base but Unity could easily take the high-end advertising market in addition to owning highly immersive games that need hardware rendering which it is already doing for web gaming.  It is 2010 soon, most computers have a decent video card.  Put them to use!

Wednesday, December 2nd, 2009

If you are looking to get into Unity 3d coding/creating a book is a good place to start to get the full overview. Recently, the first Unity book has been released by Will Goldstone via Packt Publishing.

The book is written in a simple yet rapid pace but starts out from beginner level 3d introductions and really explores all areas needed to give someone the handrails to start tinkering on their own in the dark of their labs with Unity. The book explores an introduction to 3d (the biggest hurdle for most in moving to unity although it also does 2d), terrrains (terrains aren’t supported in iphone yet keep this in mind if those are your aims), moving players and cameras, collision detection with colliders and rays, working with prefabs, creating HUDs, creating menu screens and working with the the GUI system in Unity (which can be strange for people coming from flash with event based user interfaces), loading/instantiating objects in the 3d world, particle systems, physics and lots of examples and minigames showing off these areas.

The book is alot like Unity itself in that it gets up and running quickly, gives the tools to do some damage and then opens the door to developing with Unity. After you develop longer in a platform you learn how to dig deeper into all these areas including scripting to do lots of what the Unity Editor can do for you but there is so much to take in that a good starting point to catch onto is needed.  Unity Game Development Essentials, the first Unity book, fills that role easily.

I have been using Unity as a hobbyist then at work at a game company starting in 2007 since it started to invade and take over from Director in 2007 ish then infiltrating the Papervision 3D and flash 3D developers, even with that experience this book still did a great job of exploring the tools and is approachable for almost anyone with some basic scripting skills and a desire to make some creative stuff.

Even if you have been doing Unity for a while a book is always good to see techniques and support authors and community members that give back to help others learn. Pick it up! (Amazon) (Packt Publishing)

If you aren’t ready to make the leap to Unity just yet there is also a great book from Paul Tondeur called Papervision Essentials for 3D in Flash, he has also done some projects in Unity to Flash communication.

Saturday, August 8th, 2009

So many cool and useful technologies are unveiled at SIGGRAPH every year, this year at SIGGRAPH 2009 was no different.  Khronos Group, behind the new guidance of OpenGL, OpenGL ES, OpenCL, OpenVG, COLLADA etc, came another big announcement about hardware rendering within the browser.  WebGL is now an official standard being developed at Khronos Group to bring javascript control of OpenGL to browsers… Wow!

Ok so this was officially announced at the GDC in March but limited information, but now it has been slated for an official public standard in early 2010. Shortly after the announcement at the GDC we saw Google o3D appear doing exactly that, controlling OpenGL through Javascript in the browser but it was still largely software/harward hybrid rendered. Google, Mozilla, Opera are part of the companies supporting WebGL which is great for browser support, also NVIDIA, AMD and Ericsson are in on it.

Khronos Details WebGL Initiative to Bring Hardware-Accelerated 3D Graphics to the Internet

JavaScript Binding to OpenGL ES 2.0 for Rich 3D Web Graphics without Browser Plugins;
Wide industry Support from Major Browser Vendors including Google, Mozilla and Opera; Specification will be Available Royalty-free to all Developers

4th August, 2009 – New Orleans, SIGGRAPH 2009 – The Khronos™ Group, today announced more details on its new WebGL™ working group for enabling hardware-accelerated 3D graphics in Web pages without the need for browser plug-ins.  First announced at the Game Developers Conference in March of 2009, the WebGL working group includes many industry leaders such as AMD, Ericsson, Google, Mozilla, NVIDIA and Opera.  The WebGL working group is defining a JavaScript binding to OpenGL® ES 2.0 to enable rich 3D graphics within a browser on any platform supporting the OpenGL or OpenGL ES graphics standards.  The working group is developing the specification to provide content portability across diverse browsers and platforms, including the capability of portable, secure shader programs.  WebGL will be a royalty-free standard developed under the proven Khronos development process, with the target of a first public release in first half of 2010. Khronos warmly welcomes any interested company to become a member and participate in the development of the WebGL specification.

Google released O3D this year and there are great strides in 3d within the browser from game engine wrapper technologies such as instant action technology, gaim theory engine (now owned by id Software and runs Quake  Live, hardware rendered Unity 3D (and Torque 3D coming soon), and Flash software rendered  3d engines Papervision 3D, Away 3D, Sandy (Sandy also released a haXe version that exports a javascript version) and others.  But it looks like the movement is to bring OpenGL to the web as a standard under the name WebGL, this would be great!  There would still be lots of times where plugins are better now and in the near future but the path is a good one. Having a software/hardware rendering hybrid like Google O3D for broad video card support (some of the painful older intel cards), or using a plugin like Unity3D, Torque 3D or wrapper technology for bigger engines is a good idea for the time being. But the future is grand in this area.

I think that Google O3D and OpenGL ES success on iPhone games probably combined to get this in motion.  OpenGL and very basic video cards are now standard in most machines out there.  Unity3D actually published hardware statistics on casual gamers (web-based games) ever so kindly and shows that even though there are some older Intel cards out there, for the most part machines nowadays have a video card capable of supporting at least low-poly 3d and hardware supported 2d rendering in real-time for games, user interfaces and more.

This is exciting news, it appears the movement of the web gaming market is getting much more capable and is accelerating the innovation of hardware accelerating the web.

Thursday, April 30th, 2009

Unity 3D iPhone was updated recently to 1.0.2 and it has been greatly improved in performance and a much more solid 1.0 toolkit.  According to Unity 3D information by up to 50% which means much more room for assets to munch memory for us yay!

I updated to iPhone SDK 3 beta 4 and iPhone OS 3 beta 4 and the latest Unity iPhone and things were much better in perception of speed at least in early testing.  Not sure if it was more from one or the other but the games I am testing/building so far are quicker and the OS feels faster overall.

Get the latest Unity 3d iPhone dev kit (only for Mac OSX obviously since it uses XCode to compile per Apple licensing requirements)

This build fixes many issues and makes some great optimizations for speed as listed here:

New Features and Improvements

  • Reduced memory footprint for uncompressed audio by 50%
  • “Memory usage for textures reduced by 50%. Texture memory is now freed once it has been submitted to OpenGLES on the device. The “Enable Get/SetPixels” flag in the Texture Import Settings lets you disable this feature on a per texture basis in order to access the texture data from a script using GetPixel etc.
  • Improved iPhone script call optimization
  • Removed unused parts of Mono runtime
  • Reduced memory overhead while reading data from disk and slightly improved load times.
  • Support for several predefined splash-screens (portrait/landscape) for Indie version. Just rename one of the splash-screens in the output directory to Default.png
  • Exported audio session activation/deactivation functions to AppController.mm
  • Added Scripting Reference code examples for iPhone specific APIs

Bug Fixes

  • Fixed audio to play correctly after phone call / text message / alarm interruption occurs
  • Fixed compressed audio occasionally refusing to play
  • Fixed AudioSource.PlayOneShot to work correctly with compressed audio
  • Fixed audio to respect Mute switch and background iPod music
  • Fixed Pause function and time property for compressed audio clips
  • Fixed OpenAL memory leak
  • Fixed PhysX memory leaks
  • Fixed Audio and Animation assets leaking while loading new scene
  • Fixed a crash related to playing compressed audio in a sequence
  • Fixed memory leak while updating Mesh geometry data
  • Fixed several small memory leaks in rendering module
  • Fixed asynchronous .NET sockets
  • Fixed .NET threads
  • Fixed cross thread boundary calling to the delegates
  • Fixed UnityEngine.TextEditor stripping
  • Fixed GUI slider stripping
  • Fixed GUI scroll view stripping
  • Fixed IndexOutOfRange exception checking
  • Fixed Boo.Lang.dll stripping
  • Fixed occasional crashes of AOT cross compiler
Tuesday, April 7th, 2009

A quick roadmap was posted by Unity3d.com blog on the immediate future of Unity iPhone.  Currently I am developing two games for the iPhone OS 3.0 and these are welcome updates.  We are really looking forward to items not in the hard version just yet but we are looking forward to terrain support and downloadable content support in iphone sdk 3.0.

 

Unity iPhone 1.0.2. Based on custom builds we’ve been sending to devs in need, this release will address engine memory leaks and fix other outstanding issues:

  • Physics and audio related memory leaks
  • Asset leaks while reloading scenes
  • .NET sockets and threads
  • Compressed audio related issues
  • Stripping away too much of GUI components
  • Occasional crashes in AOT compiler
  • Support for both portrait and landscape splash screens 

Next will be Unity iPhone 1.1. Since the release of 1.0.1 we’ve been working on a number of performance and memory optimizations. Most of the work on 1.1 is finished already and we’re doing an internal bug fixing round before it goes to beta testers too. Along with optimizations this release will include number of important features such as:

  • Binding custom ObjectiveC/C++ functions to C#/Javascript
  • Native on-screen keyboard support and interoperability with Unity GUI
  • Movie playback support
  • Performance optimizations:
    • significant C#/Javascript performance improvements
    • general rendering loop optimizations resulting in less OpenGLES state changes and less CPU work per object
    • number of internal routines were rewritten using VFP coprocessor assembly
    • way much faster mesh skinning utilizing VFP
    • batching small objects, given that they share same material, into single draw call
  • General distribution size optimizations which allows applications below 10Mb
  • Number of significant memory footprint optimizations

 
We don’t have strict versioning past 1.1 yet. Some of the following features will end up in the next big release and some might find a way to sneak into 1.1:

  • Compressed audio streaming directly from disk
  • Support for 3.0 SDK
  • 3.0 downloadable content
  • 3.0 bluetooth networking
  • GPS/Location support
  • Vibration support
  • Post-processing and render-targets support
  • Terrain support
  • Per-pixel DOT3 lighting support for skinned meshes
  • Reduce load times
  • Reduce distribution size even further
  • Improve GarbageCollector collection patterns to reduce spikes
Saturday, March 28th, 2009

 Director 11.5 was quietly released last week at GDC with a few nice upgrades.

  • The sound library is updated to Dolby surround 5.1. 
  • Director 11 now supports ByteArray and binary data handling. 
  • It also states support for Flash 9 swfs. Previously Director 11 did not work well/atall with AS3/Flash 9 swfs which made it nearly useless.
  • Streaming support for audio and video with RTMP (red5, flash media server, etc)
  • Updated video support
  • Bitmap and audio filters for video

I still think Director is on decline unless they open up the development platform, lose Lingo and allow a real IDE to develop with. So frustrating being restrained to that IDE that is not very flexible and cumbersome to extend and code in when you compare it with cutting edge IDEs like Unity3D or open source flash IDEs like FlashDevelop. It has been completely removed from our workflow for some time due to new Flash 2.5D engines such as papervision 3d, away 3d and sandy or for more immersive hardware rendered 3d, unity3d. 

 

Adobe Director version comparison chart
Product features Director 11.5 Director 11 Director MX 2004
Support for 5.1 surround sound Yes No No
Real-time audio mixing Yes No No
Audio effects and DSP filters Yes No No
H.264 MPEG-4, FLV, and F4V video support Yes No No
Streaming support for audio and video with RTMP Yes No No
Ability to apply audio filters on a video Yes No No
Ability to apply bitmap filters on a video Yes No No
Google SketchUp file import Yes No No
Enhanced physics engine with support for dynamic concave rigid bodies Yes No No
ByteArray datatype for binary data handling Yes No No
Multiple undo/redo for text editors Yes No No
Text rendering and performance optimization Yes No No
Cross-domain policy support for Adobe Shockwave® Player Yes No No
Mac OS X Leopard support Yes No No
Unicode support Yes Yes No
Microsoft DirectX 9 support Yes Yes No
Advanced physics engine with included NVIDIA® PhysX™ support Yes Yes No
JavaScript dictionary Yes Yes No
Code snippets Yes Yes No
Bitmap filters Yes Yes No
Microsoft® Windows Vista® support Yes Yes No
Support for Intel® based Macs Yes Yes No
Cross-platform projector publishing Yes Yes Yes
Web publishing with Adobe Shockwave Player Yes Yes Yes
Support for more than 40 video, audio, and image file formats, including SWF Yes Yes Yes
Tuesday, March 24th, 2009

AngryAnt brings us a nice library for pathing and behavior trees in Unity3D with excellent editor integration. Path library I reviewed and is an extremely deep and complete library with autocomplete node collections from colliders, ability to connect different networks and detection from mesh as well as GUI tools using Unity3D editor scripts. The release is solid with documentation, video samples and is very easy to integrate. If you have a need for AI, bots, scripted animations or other madness in your game be sure to check out the pathing library and or the behave library from AngryAnt to implement or research.

Path Features

Specs:

  • Available for unity indie as well as pro licensees
  • Can run in webplayers as well as stand-alone
  • Requires no additional installations

Features:

  • Easy to use editor interface
  • Navmeshes
  • Waypoint networks
  • Cached pathes
  • Distributed processing using coroutines
  • Tag-filtered pathfinding
  • Hierarchal “grid network” pathfinding
  • Auto-recalculate on runtime network changes

Tutorials

I recommend you study the “Editor demo” unity project available on the Path download page. This project will be used in the tutorials below and contains an example Path setup.

Tutorial 1 – The basics

Runtime reference

The Path project comes with a small, but effective runtime API. The following links list the classes herein and their methods / properties.

Path unity package

Path package
The Path package contains all you need to start using the Path editor and run-time components in your project.

Demo unity project

Demo project
The Demo project is a complete unity 2.5 project with Path already added, a sample Path collection set up and example scripts requesting path calculations and following them.

Behave Features

Specs:

  • Available for unity indie as well as pro licensees
  • Can run in webplayers as well as stand-alone
  • Requires no additional installations at runtime

Features:

  • Implements behaviour trees
  • Re-use common behaviour by reference
  • Drag and drop editor interface inside the unity editor
  • Simple connection to character actions via C# interface
  • Designed trees are built to .net assembly code for maximum performance
  • Runtime debugging features
  • Powerful stand-alone editor – including web version

Behave unity package

Behave package
The Behave package contains all you need to start using the Behave editor, compiler and run-time in your project.

Behave 0.3b hotfix

Behave 0.3b hotfix
This hotfix solves a few critical issues with Behave 0.3b and unity 2.5. It’s still quite buggy and I’m working on a more extensive rewrite. Stay tuned.

Demo unity project

Demo project
The Demo project is a complete unity 2.1 project with Behave already added, a sample behaviour tree designed and compiled plus an example script showing how compiled behaviour trees are integrated with unity MonoBehaviour scripts.

Behave builder application

Behave builder
Behave builder is a stand-alone application offering the behaviour tree editors (excluding the compiler) outside the unity editor. It is currently OS X only. This application is also available in an online version – check it out in the “Preview” section of this page.

Example library

CitySimulation.behave
CitySimulation.behave is the library used in the demo project – saved as a Behave builder file. You can use this file directly in the online and offline version of Behave builder or import it to a unity project via the Behave “Assets” menu.