18

Augmented reality in_flash_tran_trong_thanh

Embed Size (px)

DESCRIPTION

Presentation in Flash Camp Hanoi 27/11http://flashcamphanoi.com.vn

Citation preview

Page 1: Augmented reality in_flash_tran_trong_thanh
Page 2: Augmented reality in_flash_tran_trong_thanh

Who Am I?

Trần Trọng Thanh3 years working with Flash / Flex / Air

Pyramid Consulting (HCM city)

VNFX: ttt_conan

Twitter: @trongthanh

Email: [email protected]

Page 3: Augmented reality in_flash_tran_trong_thanh

Augmented RealityIn Flash(Tương tác bổ sung trong Flash)

Trần Trọng Thanh

11/2010

Insert Logo HereInsert Logo Here

Page 4: Augmented reality in_flash_tran_trong_thanh

© 2010 Thanh Tran - [email protected]

Content

1. What is Augmented Reality? (5')2. AR in Flash: FLARToolKit (2')3. Making a Hello World demo (10')4. Using animated 3D objects (5')5. Creating custom marker (10')6. Multiple markers (5')7. Inspiring real applications (3')8. Conclusion (5')

Page 5: Augmented reality in_flash_tran_trong_thanh

© 2010 Thanh Tran - [email protected]

What is Augmented Reality?

• live view of reality which is augmented (bổ sung) with computer-generated elements: sound, graphics

• advanced AR uses computer vision and object recognition

• the surrounding of the user becomes interactive and digitally usable.

• AR frameworks for Flash: FLARToolKit, FLARE*

Page 6: Augmented reality in_flash_tran_trong_thanh

© 2010 Thanh Tran - [email protected]

FLARToolKit

• ARToolKit (C/C++) → NyARToolKit (Java) → FLARToolKit

• Ported by Saqoosha/Libspark.org (2008)

• Recognize real-world monochrome (đơn sắc) markers

• You have to draw your own 3D graphics (with Papervision3D / Away3D / Sandy / Alternativa3D)

• License: GPL or Commercial

Page 7: Augmented reality in_flash_tran_trong_thanh

© 2010 Thanh Tran - [email protected]

Hello FLARToolKit: Build your first demo

• Download or check out source of FLARToolKit at: http://www.libspark.org/wiki/saqoosha/FLARToolKit/en

• Create new AS3 Project (with FlashDevelop)

• Copy libraries and example from FLARToolKit source folder:- FLARToolKit\libs\Papervision3D\src- FLARToolKit\libs\NyARToolKitAS3\src- FLARToolKit\src → org → copy all- FLARToolKit\src → examples → copy only: ARAppBase.as, PV3DARApp.as, FLARToolKitExample_PV3D.as- data/camera_para.dat, data/flarlogo.pat

Page 8: Augmented reality in_flash_tran_trong_thanh

© 2010 Thanh Tran - [email protected]

Hello FLARToolKit: Build your first demo

• Start Flash CS*

• Create a new ActionScript 3 FLA

• Set source path to: lib, src (default source folder of FlashDevelop)

• Set stage size to 640x480

• Set document class as: FLARToolKitExample_PV3D

• Run the demo

(See Simple Cube demo & Earth Collada demo)

Page 9: Augmented reality in_flash_tran_trong_thanh

© 2010 Thanh Tran - [email protected]

Hello FLARToolKit: Build your first demo

• Note: marker's local 3D coordinates (các trục tọa độ của marker)

Image courtesy of Shaqoo.sh

Page 11: Augmented reality in_flash_tran_trong_thanh

© 2010 Thanh Tran - [email protected]

Create your own marker

• Online marker maker: http://flash.tarotaro.org/ar/MGO2.swf

• Marker:

• Monochrome

• Low resolution (4x4 - 64x64)

• Marker percentage:

25% 50% 25%

Page 12: Augmented reality in_flash_tran_trong_thanh

© 2010 Thanh Tran - [email protected]

Multiple markers

• Copy FLARTK_Example_Multiple_SimpleCube_PV3D.as from FLARToolKit source code

• Correct path to camera_para.dat, flarlogo.pat, L.pat

• Setting up and build this application similar to first demo(see multiple picture planes demo)

Page 13: Augmented reality in_flash_tran_trong_thanh

© 2010 Thanh Tran - [email protected]

Inspiring real applications

Earth Structure Book: http://www.youtube.com/watch?v=1RuZY1NfJ3k

Augmented Reality Tower Defense v0.2 for Nokia N95: http://www.youtube.com/watch?v=zyWVH6jkDHg

Page 14: Augmented reality in_flash_tran_trong_thanh

© 2010 Thanh Tran - [email protected]

Conclusion

• Pros:

• On the web = everywhere, no installation

• Flash is a rich interactive platform

• Free and open source

• Cons:

• Low processing power

• Low 3D quality

Page 15: Augmented reality in_flash_tran_trong_thanh

© 2010 Thanh Tran - [email protected]

Conclusion

• Knowledge of 3D frameworks and 3D programming is key

• Improve performance with Alchemy port

• Combine with other techniques: motion detection, object recognition...

• Limitation is your creativity

Page 16: Augmented reality in_flash_tran_trong_thanh

© 2010 Thanh Tran - [email protected]

Questions & Answers

Page 17: Augmented reality in_flash_tran_trong_thanh

© 2010 Thanh Tran - [email protected]

Links and references

• Demo source: http://thanhtran-sources.googlecode.com/svn/trunk/training/AR_in_Flash/ardemos.zip

• FLARToolKit: http://www.libspark.org/wiki/saqoosha/FLARToolKit/en

• FLARE*: http://www.imagination.at/en/?Products:Augmented_Reality_for_Flash

• Wiki about AR: http://en.wikipedia.org/wiki/Augmented_reality

• ATOMIC Web Authoring Tool: http://www.sologicolibre.org/projects/atomicweb/en/

• Marker maker: http://flash.tarotaro.org/blog/2009/07/12/mgo2/

• FLARToolKit Starterkit: http://saqoo.sh/a/flartoolkit/start-up-guide?lang=en

• FLARManager: http://words.transmote.com/wp/flarmanager/

• Quake 2 models used in Megaman demo: http://www.noderunner.net/~llin/old/models.html

Page 18: Augmented reality in_flash_tran_trong_thanh

© 2010 Thanh Tran - [email protected]

Thank you