• Home
  • Contact
  • Careers
  • Socialize With Us:
  • Send us Mail
  • Follow us on Twitter
  • Join our Facebook Group
  • /
  • Linkedin
  • /
  • Vimeo Videos
  • /
  • Youtube
  • /
  • RSS Feed
  • Search Site

  • About UsAwards & Bio
  • PortfolioOur Latest Work
  • TrainingTips & Tutorials
  • BlogGreat Articles

You are here: Home / 2013 / June

Archive for month: June, 2013

Intro To Unity3D and AR (Augmented Reality)

Category: Industry News, Quick Tips     |     Tags: Augmented Reality, C#, Games, Mobile, Unity3D

Learn Unity 3D & C# – From Basics to Advanced

Unity3D is a powerful suite of tools (Project IDE, Code IDE, run-time) for game development. As always, RivelloMultimediaConsulting.com/unity/ will be the central location for deep articles and tutorials, Facebook.com/RivelloMultimediaConsulting (like us!) will engage the growing RMC+Unity community, and for the latest opinions and cool links follow me at Twitter.com/srivello. There is incredible momentum in the Unity3D product and its community. Here is more information on using Unity3D with Augmented Reality.

Augmented Reality

Augmented reality (AR) is a field of computer science that involves combining the physical world and an interactive, three-dimensional virtual world. I originally wrote a complete demo, source code, and article for my client Adobe – “Augmented Reality With Flash“. Now I’ve updated the information regarding Unity3D. In a future article I may make the full Unity demo source code available. While mainstream audiences are now becoming aware of AR, it is not new. Its background is intertwined with decades of computer science development. Virtual reality (VR), AR’s more familiar counterpart, is the replacement of the user’s physical reality (particularly that which is experienced through sight and hearing) with a computer-generated reality. The idea of a virtual experience is exciting — creating entertaining and educational sensory encounters that do not exist in our everyday lives.

From a consumer standpoint, it seems that AR advances have come out of nowhere to surpass VR advances. The acceleration in AR technology is due to two major factors: First, users are still experiencing reality, so believability is easier to achieve. Adding simple graphics (such as text or simple shapes) and color effects (such as night vision or thermal vision) to reality creates a better user experience. The user is still seeing a mostly familiar world. Second, this more subtle use of computer graphics is less expensive with today’s technology, making it more feasible than VR. Let’s take a look at augmented reality, its current uses, and its future potential.

Practical Uses of AR

The video game industry has released major augmented reality products for more than a decade. The Eye Toy for Sony PlayStation 2 and 3 takes input from an inexpensive video camera and composites the live video feed with CG onto the TV screen. This toy detects the user’s body position in front of the camera as an alternative input method to the typical joystick or gamepad, deepening the user’s immersion into the game world. Detection schemes continue to advance, allowing for more engaging interaction.

There are AR applications outside of console games, including military and consumer products, too. Night-vision goggles and targeting-assistance technology help marksmen in battle, and children’s stories come to life with AR-enhanced books. The uses are vast. With AR-enhanced books, each page of a real-world book is outfitted with a marker — a pattern that is detectable by AR. As the child turns each page, a computer is able to place a virtual 3D animation on top of a physical image printed on paper. While the marker is often an image as in this example, it could also be the user’s face.

Basics of AR

  • Marker Detection – The marker is located by the application. Typically the device webcam is used. The webcam inspects the physical reality near the user to find a predetermined marker (image or the users face).
  • Transform Mapping – The transform (position, rotation, scale) of the marker are interpreted. Move the marker and the transform updates.
  • Rendering – Now the 3D model is updated to rendered to the screen.

Essential Libraries

Because of the growing popularity of AR, many platforms have 3rd party packages (free and premium) to facilitate development. Unity too. While you could create you own system from scratch, it is highly recommended to find the best 3rd party library and use it. Your end product will be higher quality and you will save greatly on time to market. You can choose any one from this list; Unity3D Packages for AR

  • Catchoom
  • D’Fusion*
  • Metaio
  • NyARToolkit (Japanese)
  • ObviousEngine
  • PointCloud
  • SeeingMachine’s FaceAPI
  • Sphero
  • SSTT
  • String* – (Tutorial)
  • Vuphoria* – (Tutorial)
  • Xloudia

*Seem to be popular

Vuforia is the best and free to use. I tried with Metaio, it’s easy to use than Vuforia, but the tracking quality don´t convince me. Vuforia handles the pattern occlusion is robust, and it’s framerates are high, much higher than Metaio and NyARToolkit. – 3rd Party Blog Comment

There are pros and cons to each. In a future article, I may evaluate each of these options. Some of the key differences are cost, ease of use, completeness of documentation, breadth of features, and accuracy (speed) of tracking the marker from the camera and transforming the model. Each package surely has its own workflow and API, however the major concepts are the same. So once we choose a package, we follow this the basic setup.

Developing Augmented Reality

Marker Setup

Figure 1. Marker Image

Figure 1. Marker Image

The marker image is a graphic drawn, printed, and shown to the end application as it runs. Your AR package, with help from the marker data file and parameters file, will detect this shape via webcam. To design a graphic, fit the desired shape within a white square that is centered within a larger black square. Keep your shape simple for best results. Note the sun shape in the graphic. This helps the application detect which way is up for the marker and assists its angle and rotation detection. Your design doesn’t need to have this shape per se, but it should be asymmetrical in some way for best results. Webcam Setup Unity features webcam support. As the application runs and a camera is detected, Unity will show the video onscreen. This functionality may or may not be included in the AR package you choose. AR Package Setup

Figure 2. Marker Detection

Figure 2. Marker Detection

A cornerstone of this project is marker detection. As the marker graphic is detected via webcam, its position, rotation, and scale in the user’s physical space are calculated. This calculation will be used in the next steps. The AR package will search each still-frame of webcam footage for the predefined marker graphic (Pattern object). The detection scheme uses just the latest still-frame of video at any given time. Model Setup

Figure 2. 3D Model Setup

Figure 3. 3D Model Setup

The 3D model is loaded and inserted into the 3D scene, and the view into that scene. Luckily 3D is a strength in Unity and much of this work is all done for you. In the final project, this view is layered on top of the 2D webcam Video object shown earlier so the composite (See Figure 4.) of 2D and 3D will look believable. Repeated Loop: Detect-And-Update

Figure 4. Complete Process

Figure 4. Complete Process

Generally speaking your loopToDetectMarkerAndUpdate3D function will be called 60 times per second. Each frame the latest frame of the webcam footage is grabbed. The AR package runs detection on the frame. If the marker is detected the AR package will update the position, rotation, and scale data. This modifies the 3D model so it appears to be at the same position in the user’s physical space as the marker. The resulting effect is nothing short of amazing for first-time viewers.

Great Slideshow on Unity3D & AR

[slideshare id=13088203&doc=unityar-120526151111-phpapp02]

Want More Video Tutorials?

We are currently creating tons of new training content for Unity3D. [polldaddy poll=7125741]

Unity 3D Best Practices

Category: Industry News, Quick Tips     |     Tags: C#, Debugging, Project Planning, Unity3D

Unity 3D & C#

Unity3D is a powerful suite of tools (Project IDE, Code IDE, run-time) for game development.

As always, RivelloMultimediaConsulting.com/unity/ will be the central location for deep articles and tutorials, Facebook.com/RivelloMultimediaConsulting (like us!) will engage the growing RMC+Unity community, and for the latest opinions and cool links follow me at Twitter.com/srivello.

There is incredible momentum in the Unity3D product and its community.I recently posted “The Best C# Code Naming Conventions” and wanted to expand the discussion on best practices in this post below.

NOTE: I’m still working on this post, but wanted to get feedback on just the parts below. Drop a comment below.

Best Practices

Folder Organization

I created a custom menu option to create default folders.

unity_create_default_menu_v1

I add these folders to a new project (or existing) when it is first created. I put 3rd party packages into the ‘Community Assets’. The ‘Standard Assets’ folder is of course where Unity puts its own packages. I then rename the ‘[Project Name]’ folder to match my current project. Any suggestions?

unity_project_folders_v1

What Do YOU Think?

Have a comment? Please post below. This is a hot topic and I’ll respond promptly over the next month.

Unity3D & C# Training

There are MANY best practices included in my free, HD Video training series on “Unity3D & C#“. Check it out!

vimeo_screenflow_video_thumbnail_UWK_poster_v1

Tag

3D AIR API AS3 AS3.5 AssetStore Augmented Reality Business C# Charity Debugging Design Patterns DevDiary ECS Architecture Experimental Flash Flex Game Design Game Design Prototypes Games GUI HTML5 Java Loom Mobile MVCS Architecture Optimization Project Planning PushButtonEngine ReactiveExtensions Review Robotlegs Smash Testing Unity3D UnityApplicantTest WordPress WordPress Plugin

Brazilean Developers

  • Abendita.com
  • dclick.com.br
  • dm9.com.br
  • Fellyph Cintra
  • IgorCosta.org
  • MonadaSolucoes.com.br
  • PossibleWorldwide.com.br
  • Unit9.com

Developers

  • Adobe Blogs
  • Ben Forta
  • Colin Moock
  • Enrique Duvos
  • Flash Mobile Blog
  • Jess Freeman
  • Kevin Hoyt
  • Lee Brimelow
  • Paul Trani
  • Quasimondo
  • Renaun Erickson
  • Ryan Stewart

Free Assets

  • Free Sounds
  • HasGrafics

HTML5 Games

  • Closure JS Library
  • Eloquent JS Manual
  • Game Framework – CraftyJS
  • Game Framework – EaselJS

Italian Developers

  • alchimedia.com
  • corlan.org/
  • creativesource.it
  • dimix.it
  • fabiobiondi.com
  • gnstudio.com
  • Interpreting-tech.com/bemobile/
  • leonardorisuleo.info
  • lucamascaro.info
  • mart3.org
  • mxml.it
  • nxn.it
  • pirosoft.it
  • Preload.it
  • sonnati.wordpress.com/
  • webgriffe.com

Products

  • Adobe.com
  • Amazon Kindle E-Reader
  • ElectroServer
  • F*CSS
  • Flash Development Toolkit (FDT)
  • O'Reilly PureMVC Book
  • Samsung Galaxy Tablet
  • Unity3D

RMC

  • RMC Consulting

Spanish Developers

  • Flash Adictos
  • HTML Cinqo
  • Tutoriales Flash

Tutorial

  • Active Tuts
  • AS3-to-Unity3D Training Videos
  • Doing 2D in Unity3D
  • Learning C#
  • Unity3D Tutorials

Unity3D Games

  • AS3-to-Unity3D Training Videos
  • Doing 2D in Unity3D
  • Learning C#
  • Matt Eley's Blog
  • Unity3D
  • Unity3D Tools
  • Unity3D Tutorials

Interesting links

Besides are some interesting links for you! Enjoy your stay :)

Latest Portfolio

  • Coins And PlatformsMarch 19, 2014, 6:04 am
  • Paddle SoccerMarch 2, 2014, 9:13 pm
  • Spider StrikeFebruary 21, 2014, 4:19 am
  • Custom Game System APIJuly 8, 2013, 8:05 am

Latest News

  • RMC Primer: Everything Virtual Reality (VR)September 3, 2016, 10:29 am
  • Unity3D Architectures: EntitasJuly 29, 2016, 11:15 pm
  • RMC Primer: Get A Job In Game DevelopmentAugust 19, 2015, 10:18 am
  • Unity UI: Overview – Part 1 of 3December 10, 2014, 9:55 am

Archive

  • September 2016
  • July 2016
  • August 2015
  • December 2014
  • April 2014
  • March 2014
  • February 2014
  • January 2014
  • December 2013
  • October 2013
  • September 2013
  • August 2013
  • July 2013
  • June 2013
  • May 2013
  • December 2012
  • October 2012
  • September 2012
  • July 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • October 2011
  • September 2011
  • August 2011
  • June 2011
  • April 2011
  • March 2011
  • January 2011
  • December 2010
  • October 2010
  • September 2010
  • April 2010
  • March 2010
  • January 2010
  • October 2009
  • August 2009
  • June 2009
  • May 2009
  • April 2009
  • January 2009
  • December 2008
  • November 2008
  • August 2008
  • May 2008
  • April 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • October 2007
  • August 2007
  • May 2007
  • January 2007
  • October 2006
  • April 2006
  • March 1999

© Copyright 2006 - 2023 - Rivello Multimedia Consulting - RMC by Samuel Asher Rivello