Showing posts with label unity3d. Show all posts
Showing posts with label unity3d. Show all posts

Tuesday, December 18, 2012

On map Augmented Reality with Vuforia + Unity

I have been doing some more development with Android, using a different (and easier) renderer this time than the still nascent OpenSceneGraph port, with a bit of Augmented Reality thrown in via Vuforia.Which basically functions as an OpenCV port with image orientation recognition thrown in optimized for Qualcomm's Snapdragon SoC. The feature detection and texture packing is annoyingly performed at the Qualcomm site, I guess they want to keep track of images over which features are detected and prevent inappropriate use by script kiddies. From the looks of FastCV, the features are either MSER or Harris corners.
I already have Android dev kits going so the fun bit was in importing our nice models into Unity and sending the package over to the device. Textured models seem to import best into Unity via Blender, after a bit of copying around of textures and forcing association with the right materials.
Setting up the scene in Unity is fairly straight forward, the Vuforia SDK delegated to Unity for rendering and simply attaches a handler to the Camera. The visible object is automatically centred in the scene so the camera to target geometry is irrelevant in this case. However lighting is not, so a bit of tweaking in lights is necessary for a nice model render. Switch all the materials to diffuse/mobile to load the appropriate shaders in GLES2. Add an LODGroup node if the model is getting too big, though I was able to render some 100,000 triangle models.
When all is set the tracking can begin. I lined up the model to our orthoimagery, the screenshot does not do it justice. It is really cool watching a 3D object stick out of your screen. Everybody at work is very used to viewing things in stereo, but multi-perspective 3D still has a wow-factor.

Tuesday, August 23, 2011

Week of fun Hardware - Octocopter, Extruder, Kinect Poetry and MIDI 2 Life

Last week was an amazing overload of gadgets (with some flying to Canberra and hanging out at a bar with E-Tax release manager thrown in). First highlight was the Octocopter at UTAS - it is indeed a massive beast with 8kg border line payload, paltry 5 minute endurance, but it gets the kit off the ground. I also saw some of the amazing work Arko has been doing with Bundler, PMVS and Meshlab.

 The night before I went to Canberra, there was a Sound2Lights show in the Long Gallery with lots of cool gadgets. Including the aforementioned Rep-rap extruder printing out music (Joseph) , a Kinect you had to do a weird dance to get to put words in place (and possibly rhyme and form poetry - Aaron) and of course Nick's game of life with music controlling organisms rendered in Unity 3D.

Thursday early in the morning I flew off to Canberra to help deploy Australia wide terrain, but that is another story.

Thursday, July 21, 2011

Getting some fish into WorldWind

Last few days I have gone back to biological data, well animal tracks. CSIRO has put together a very nice oceantracks website using the amazing Indie game engine - Unity 3D (amazing in every way except running on Linux). It runs on Android, so with some effort on GL-ES front it can be made to work on Linux.



Talking about multi-platform game engines the other impressive one is Ardor3D,  not that OGRE or Irrilicht are bad. It is just easier to get going without getting platform specific binaries or needing to set up a large tool-chain. It is also easier to maintain the Java based game engine on top of JOGL and LWJGL instead of maintaining JNI bindings to a C++ engine (especially if your bindings are outside the source tree) . The other large draw from Ardor is the JOGL based rendering which lets us share the GLContext between Ardor and WorldWind, as I have done in jaxb-collada (lots of thanks to the original Ardor hack post and improvements from niccastel and brujito). Some pretty famous use-cases have picked Ardor up as their rendering engine including the Mars rover project, I hope to catch up with them in a few weeks. May be the local guys down here in Hobart will adopt it as a mission control system for the SLOCUM Gliders.


There are some altitude setting bugs in the Ardor3D+WorldWind code , and the animations key-frames are not enabled, but the models load nicely and will look great with some more water surface shaders and actual track data.

WorldWind_Tuna