Augmented reality helicopter

July 13th, 2009 by Slav

Augmented reality is slowly becoming perhaps somewhat of a bevel effect/lensflare among the technology enthusiasts, but actually it’s only beginning to creep into consciousness of the “marketing people” (as I call them) so I though it’s high time I joined the ranks and pop my AR cherry. : – )

This demo is based on excellent ar tutorial by Lee Brimelow, you should definitely check it out if you want to play with AR.

One thing I discovered, the marker pickup up by FLARE toolkit can be quite tricky at times and it really helps if you do apply a threshold filter to an input bitmap data.

I added basic flying controls to helicopter and a helipad plane to ground it on the surface..

AR Chopper

Demo was build with Adobe Flash Builder demo, but the most important class extends UIComponent, so should be easily transferable to Flex 3.

You can view the demo here and right click to view the source.

If you don’t have a web cam watch screencast here.

Posted in AS3, Augmented Reality, Flex 4, papervision | 12 Comments »

Integrating Papervision3D into the Adobe Flash Builder Sparks containers architecture.

July 7th, 2009 by Slav

It all started when I decided to try out the new Flex 4 Beta. The aim was to build Collada viewer that loads the dae files from the users’ filesystem / harddrive using new flash 10 FileRef API. What seemed like a pretty straightforward task turned into a Nightmare Lite after I realised I can’t just grab a new BasicView and dump it into a new sparks group container! The problem was, the group container didn’t support rawChildren.addChild(), as it didn’t contain rawChildren property.

After spending couple of hours trying and failing I came upon a working solution :

PV3D in Flex 4

Use UIComponent as a wrapper for a BaseView which is implemented via composition. UIComponent is compatible with Sparks containers and can be added via addElement(); Thankfully UIComponents allows adding BaseView via addChild.. If you need to access a camera, scene, light etc, just use public variables on your UIComponent class to expose them and link them to your baseview camera lights etc.

This simple example utilises camera and materials light color change, but you can expose and change anything you like of course..

It is implemented directly inside of mxml but of course you could still have a group with id (let’s say “scene”) and add the whole component BasicView3D programmatically.

e.g. :

scene.addElement(new BasicView3D);

Check out the sample and right click to view source script and download the entire project.

Posted in AS3, Flex 4, papervision | 14 Comments »

My suggestions for Flash on the Beach 09

February 22nd, 2009 by Slav

 Rather then writing the summary of the FOTB conference experience, as I did the last time, from 2 year ago, this year I decided to write some suggestions, or a wish list of the things I’d like to hear about, and perhaps as well, things I don’t want to hear about.

Perhaps now could be the time the speakers (and organizers) are starting to consider the content of the next Flash on the Beach conference in Brighton..

First I need to say, I do love FOTB. I’ve been to the all of them so far (apart from the very first one) and always stayed throughout complete duration of the conference, which hopefully gives me the right to speak about it from the experience ..

So, here are my suggestions:

More advanced level talks!

Let’s consider the target groups, for a sec here.. I think it’s safe to assume, 70-80% of FOTB visitors are professional flash/flex dudes. Amateurs with little interest in this technology would hardly invest  in rather steep admission price (around 1000 EUR), price of the hotel accommodation for 3 days plus price of transportation , and journey hundreds of kilometers from all around Europe… Yet for such a large group there seems to be a very few sessions aimed at upper intermediate – advanced level.

While it’s fairly easy to get your hands on beginners level video tutorials, Lee Brimelow’s gotoAndLearn website is an excellent source, there’s Lynda.com and Total Training of course, that is not the case with the more advanced stuff.

Anybody can find a tutorial on how to make a rotating cube in PV3D, but there are very few resources on how to integrate papervision in flex to make a custom transitions for example..

FOTB should be a platform for flash gurus to come and share this kind of advanced knowledge…

More focused skill level sessions!

When you looked at the FTOB schedule there are sessions with levels marked as Level : Beginner – Intermediate – Advanced. I have been to quite a lot of those. Unfortunately; what happens there is a speaker starting with the beginner stuff and by the time he gets to the juicy bits everyone came to hear about, he runs out of time. In better cases, they would have about 10 minutes left to cover it, so they would rush through it with hectic tempo, barely scratching the surface.

I am not saying there shouldn’t be a basic level sessions. Last year for example, I had only a vague idea about Red, so the level of the session was perfect for me. This year, if I went to the same session, it would be a wasted time.

I am saying there should be session DEDICATED to a certain skill level. Not trying to cover all skill levels within the breadth of a session. That’s way too short time!

Have a webspace for sessions follow-up

I would suggest that on the official FOTB website, under the session description, would be a place to post comments, or questions for the speakers about the session, and to have a space for speakers to upload a source files. Although after speaker finished his session there’s usually a little space for Q&A what often happens is that speakers barely manage to finish on time so there’s actually a very little time afterwards. Also sometimes speakers promise to upload a source files on their blogs, but more then often they forget to do so…

Some topic suggestions :

Open source packages

We all know and heard about PV3D of course, but there are other interesting projects that deserve an introduction: e.g: FlexLib, AS3Lib, Box2D…, would be interesting if somebody did a brief overview of about 6-10 of the most accomplished open source flash projects , that have been developed for some time now, and are being used by an increasingly larger group of developers.

AS3 Frameworks

Again some top level overview of frameworks, i.e: Pure MVC , Cairngorm, Prana, Mate…their strengths and weaknesses, examples of usage and what their are most suitable for..

OTHERS

– Gumbo, of course, practical sessions for all levels, this would include nuts and bolts of FXG + examples..

– Advanced session about the new Flash plugin 10  text engine (Advanced text layout)

– Advanced session dedicated to new Flash plugin 10 sound capabilities.

– Air 2.0  (I’m hopping by the time of FOTB there will be at least demo version..)

– Advanced practical session on Flash Collaboration Service  (Cocomo)

– Advanced session on Alchemy

– Advanced session on how to use Pixel bender for things other than custom effect (i.e. sound, hyperthreading, 3D computations etc..)

Posted in flash, Flex, papervision, Personal | 1 Comment »

Asteroid for Papervision3D

October 30th, 2008 by Slav

In keeping with the space theme from my previous post (and not wanted to leave Starfield entirely empty) here’s another papervision parametric 3D object/component : Asteroid.  Similarly to Starfield, asteroid is textured with pragmatically generated texture, so no need to look for images, it has configurable surface deformation as well and it’s default form it can be simply created and placed in your 3D scene with this only line of code : scene.addChild(new Asteroid());

asteroid Read the rest of this entry »

Posted in AS3, papervision | 5 Comments »

Starfield for Papervision3D

October 30th, 2008 by Slav

Some PV3D sessions at Flash on the Beach inspired me to play with Papervision3D again and I sort of went for the “space” theme. And there’s certainly no space without stars! Read the rest of this entry »

Posted in AS3, papervision | 5 Comments »

Papervision3D 2.0 Is 3D Web revolution here ? Or not so fast ?

April 6th, 2008 by Slav

One one side you have euphoria of what’s POSSIBLE and on the other side what is REALISTICALLY usable. An all important parameter is the width of the gap between these two sides. After some time spent playing with PV3D I reallised just how deep this gap is.

I found out, that unless you cheat ( a lot ) , there’s no way, you can do a 3D that’s even close to a todays CGI  standard. Among other problems, there’s a very low limit to number of fully shaded (goraud/phong) triangles you can have in a 3D scene before you send you CPU usage soaring.

Notice that even quite big names pv3d based sites (Absolut, Canon, Sony) although using very very, simple geometry aren’t quite smooth on even most powerful PCs. Even on a quad core intel machines you can notice a reaction lag, that distorts the smooth interactivity experience. On a below average machines this kind of sites can quickly become unusable. Read the rest of this entry »

Posted in AS3, papervision | 6 Comments »