Face tracking + 3D Scene, Laughing Man, DOF Tunel and more...

March 16th 2009

Seems like I was inspired these days. I've been done quite a bunch of experiments. Probably the most interesting is this one:

Face tracking + 3D



As you probably know, the guys at squidder found out earlier this week a openCV port to as3 on the amazing (but unknown) spark project. Yesterday, Quasimondo did his magic and optimised the code quite a bit.

So after an exciting few hours I ended up doing what always wanted to try, face tracking + 3D. It's a bit glitchy, and unfortunately had to remove the z position (based on size of the rectangle) because it was super random that way. I think it kind of works and has potential.

Here it's a video of it in case you don't have webcam:



Btw, does the 3d scene sound familiar? It's yet another thing I always wanted to do, the Final Cut Server Identity in realtime.

There is a mouse-driven version here (remember to use the mouse-wheel for zoom).

Grab the sources for this one.

Laughing Man

But the first thing was a bit more simple. If you have seen the series Ghost in the Shell Stand Alone Complex you'll love this one. Long story short, on the series there is a hacker which is able to hack, not only into computers, but into broadcasts and even cybernetic eyes, so when he is hacking one person it can make all the observers view this icon instead. You can get a glimpse with this video. Anyway, it kind of looks like this:



Sources available too.

DOF Tunel

This one comes from this demo. You'll see a tube part which has DOF. The trick is the usual, a lot of sprites with different levels of blur. Although they are using OpenGL and it goes much smoother and looks much nicer, but I tried to replicate it with my engine just for the sake of testing it. Once the effect was done I started to play with parameters and sprites, and found out that the tunnel was nicer from outside. Ended up with this:





and more...

http://mrdoob.com/lab/actionscript/threedoob/tunneldof/03/
http://mrdoob.com/lab/actionscript/threedoob/tunneldof/04/
http://mrdoob.com/lab/actionscript/threedoob/tunneldof/05/

http://mrdoob.com/lab/actionscript/threedoob/glassballs/01/
http://mrdoob.com/lab/actionscript/threedoob/glassballs/02/
http://mrdoob.com/lab/actionscript/threedoob/glassballs/03/


34 comments written so far...

Wow this is all great stuff! I've been keeping my eye on squidder and did you know that Speedok just posted a Dof Flash demo? http://www.nabble.com/PaperVision-X-dof-demo-tp22528176p22528176.html
March 16th 2009
gordee
sick as usual! the laughing man is classic! i was thinking about doing somthing similar with augmented reality, so scratch that! LOL! but the DOF is my the best. i gotta say my fav is tunnel 3.
March 16th 2009
xero / fontvir.us
great work, tks for sharing, must take a look to the Marilena Class and try myself some of this "Face Detection"

Joao Goncalves
twitter/joaopapin
March 16th 2009
João Gonçalves
My favorite is tunnel04 - it looks so organic, almost as if it was alive, some sort of coral reef creature :)
March 16th 2009
bartekd
The blue tunnel! :D
silky and looks cool !!!!!!

I remember of this kind of particles/sprites. Was a more or less formal paper by CurlyBrace / Kewlers , in demo We Cell.

cool inspiration days .btw.
March 16th 2009
JaK
Here is my experiment with your code: http://blog.arturoparacuellos.com/?p=218
Thank you for your "inspiration" :-)
March 17th 2009
Arturo Paracuellos
Dont work the app http://mrdoob.com/lab/threedoob/finalcut/
just show the animation but not the webcam
March 23rd 2009
Javier Patiño
Si, ese no tiene lo de la webcam, el que tu buscas es este:
http://mrdoob.com/lab/webcam/face_driven_3d/
March 23rd 2009
mr.doob
If your webcam doesn't work (my firewire iSight didn't work for any of the face tracking stuff) get into the CameraBitmap class and change the getCamera line:

__cam = Camera.getCamera(); //( String( index ) );

You can see I've commented out the old call with a parameter and just made a vanilla call to getCamera().
March 25th 2009
BakedBeing
QuickCam Pro 9000 not working on your demo will try your getCamera method. Hope it works cos this is really f cool.

And, what does jaja mean cos all the latino ut addicts say it.

Its not quite j Lee but to think this has made its way to actionscript, mindblowing!

Cool share!

This open source thing is the revolution.

I think your Che.

My latino homies, lolx
March 27th 2009
saul
Thank you for examples.

But i have an comment:
My FP10 (10,0,12,36) throws some errors on most of examples. Its probably because of a fp10 "bug"
~ in latest builds of FP10 – stage property of root Sprite class sometimes is NULL and it apear only after Event addedToStage. So, this examples probably needs some fp10-init-hacks
April 30th 2009
Peko
Hi! I've downloaded the Laughing Man source code, but i can't manage to compile it. I can see what it does with the swf that comes with it, but it's impossible to compile and i don't know what i'm doing wrong.

I've the 3 .as (Main, Screen and LaughinMan) and neither of those can be saved as a .fla or .swf

I'd appreciate very much if you can help me
September 21st 2009
fran
Hi mrdoo, can you share Sources code of Face tracking + 3D. I need for a project at university.
December 16th 2009
Marcos Renato BRuno
On this same post there is a link that specifically links you to the sources.
December 16th 2009
mr.doob
hi mr doob. excelent job. but the link to the sources results in a 'forbidden' page, is it possible for a noncommercial app [aka, just playing around] to get access to your sorces?

thanx
June 4th 2010
rolando
%20AND%201=1
August 30th 2010
anonymous
%20AND%201=2
August 30th 2010
anonymous
AND 1=1/*
August 30th 2010
anonymous
' AND '1'='1
August 30th 2010
anonymous
' AND '1'='2
August 30th 2010
anonymous
' AND 1=1/*
August 30th 2010
anonymous
' AND 1=2/*
August 30th 2010
anonymous
AND 1=1/*
August 30th 2010
anonymous
AND 1=2/*
August 30th 2010
anonymous
ORDER BY 1/*
August 30th 2010
anonymous
ORDER BY 1/*
August 30th 2010
anonymous
-666 UNION ALL SELECT 0x585858535441525444554D50585858/*
August 30th 2010
anonymous
-666 UNION ALL SELECT null,0x585858535441525444554D50585858/*
August 30th 2010
anonymous
' AND 1=1/*
August 30th 2010
anonymous
' AND 1=2/*
August 30th 2010
anonymous
' ORDER BY 1/*
August 30th 2010
anonymous
' ORDER BY 1/*
August 30th 2010
anonymous
mkl543' UNION ALL SELECT 0x585858535441525444554D50585858/*
August 30th 2010
anonymous
mkl543' UNION ALL SELECT null,0x585858535441525444554D50585858/*
August 30th 2010
anonymous

Have your say!

Name:

Website:

Comment:

Some of the projects that I worked on.



Some of the HTML5 and Actionscript experiments I've done.