X

Hey! We highly recommend you launch this experiment in Google Chrome. It may run slower, or not at all, in other browsers.

Okay, I'll download Google Chrome I'm willing to risk it
X

Report This Experiment

X

Share with a friend

An e-mail has been sent. Thank you for sharing this Experiment!

Close

Back to All

Depth of Field

June 10, 2009
Author:

Mr.doob

http://mrdoob.com
Location:
London, England
Rate Experiment (863 ratings):
1 2 3 4 5  
From the Author:

300 balls form a plane, a cube, a little universe, a sphere and then disappear.

Unfortunately this piece is shy and doesn't want to interact with you yet. But nothing stops you from watching it from any angle.

Technology:

threedoob, jstweener

Comments

By mxb on August 31, 2010

hi.

this thing is amazing!

i wonder how to make the bubble stop going back and forth during the animation!?

can u help me a little?

Reply to this comment
By Baldric on June 13, 2010

In Opera, I'm experiencing a bug, the balls don't changes their size.

This is correctable:

Main.js row 220: particle.container.style['OTransform'] = 'scale( ' + scale + ' )';

to:

Main.js row 220: particle.container.style['OTransform'] = 'scale(' + scale + ')';

Reply to this comment
By mr.doob on June 15, 2010

Changed, thanks! :)

Reply to this comment
By Hans W. on June 08, 2010

To the author of this:

I would like to try this out in IE9, please remove the user agent sniffing and look into why it is centered around the top-left corner in this browser.

Reply to this comment
By mr.doob on June 15, 2010

Investigating...

Reply to this comment
By mike on May 27, 2010

wow !! really amazing .

Reply to this comment
By jonathan on May 05, 2010

lol, my firefox crash~~

Reply to this comment
By leef on March 30, 2010

this has been possible with Flash for...a decade? And this uses more CPU than Flash.... what's the big deal with HTML5 then?

Reply to this comment
By Bob on August 29, 2010

He's not joking...

Reply to this comment
By FamiCube64 on April 14, 2010

This isn't HTML5, it's Javascript. This site is all about promoting a more direct user experience, one where you don't need plugins upon plugins to see what the authors want you to see. Flash can burn in hell.

Reply to this comment
By Mr.doob on March 30, 2010

Haha, good joke! :)

Reply to this comment
By Hanso on March 17, 2010

works even wth the IE9 preview (but there are some issues)

Reply to this comment
By sorrowful on May 13, 2010

may i ask why you are using internet explorer? get a real browser! :p

Reply to this comment
By DaCentaur on March 13, 2010

This is great stuff! I think that the speed is great but as per the comments, a lot of people seem to be experiencing speed issues. I wonder why?

I was quite pleasantly surprised when the entire graphic moves when the mouse is moved. I tried zooming (both with the mouse and the keyboard) and yes it slows down horribly. But when the zoom is reset to normal, it plays well.

BTW, on zooming, I found that the balls seemed to have a real reflection of something. Is that true? It looks bloody good!

Code on!

Reply to this comment
By Jaishankar on March 13, 2010

Awesome experiment, Could it go any faster? Its almost as awesome as CM Punk. I think firefox and IE are like Triple H and John Cena, but chrome is CM Punk, the coolest straight edge browser.

Reply to this comment
By Rishi on March 12, 2010

WOW!!! WOW!!! WOW!!!

Reply to this comment
By Caio on March 09, 2010

just .... insane.!

Reply to this comment
By christos mirampitas on March 26, 2010

goodes

Reply to this comment
By ravens man on February 25, 2010

who really likes this anyway?

Reply to this comment
By HANNAH on February 22, 2010

???? hello

Reply to this comment
By sleepingwoodpecker on February 21, 2010

awesome!! I like it!! it looks like a chemistry experiment~~

Reply to this comment
By ... on February 13, 2010

Not too best. It moves by itself.

Reply to this comment
By eva on February 07, 2010

Mr. doob, 60fps introduced me to here. And you basically changed my life/perceptions.

Reply to this comment
By Jeye91 on February 05, 2010

WOW, that was amazing

Reply to this comment
By jayant on January 31, 2010

make it fast

Reply to this comment
By argjend on January 28, 2010

ju-[pershendetje-te-gjthve-mir-se-arthne-nga-zemra-te-dj-argjedn

Reply to this comment
By FamiCube64 on January 27, 2010

Works beautifully on Opera 10.50.

Reply to this comment
By Plazzmex on February 13, 2010

Try it in google chrome and you will see that it doesn't work s it should ! the balls becoming bigger and smaller and in opera they are just the same size. (Or maybe google chrome doesn't show it as it should ?)

Reply to this comment
By Nicholas on January 22, 2010

How do you do an experiment?

Reply to this comment
By michael on January 20, 2010

VERRRRRY Slow

Reply to this comment
By Shaik Dawood on December 10, 2009

simply amazing, mind blowing

Reply to this comment
By Rudie on December 30, 2009

Absolutely, positively, most certainly the most impressive and beautiful Chrome Experiment :) The not being able to interact makes it all the better I think.

Reply to this comment
By Joe on February 03, 2010

srsly

Reply to this comment
By Piyush on November 25, 2009

m seeing d future .....whats itz gonna be...

loved it thoroughly..

keep rocking guys.

Reply to this comment
By Leatherargento on January 06, 2010

I agree. It's like those 1980s Nickelodeon station identification animations (ations), and that Escher with Sphere self-portrait, and [i]Phantasm[/i], and Buckyballs. I hope somewhere down the road this is a screensaver that reflects whatever is in the user's webcam's field in each of the balls. That would be the Computerized Future that had my late-80s tween nerdette self lost in a reverie.

Reply to this comment
By statquo112w on November 12, 2009

cool? how did you add depth of field?

Reply to this comment
By Mr.doob on December 05, 2009

Hot!

Reply to this comment
By Mr.Doob on October 22, 2009

smelllly

Reply to this comment
By Mr.doob on November 03, 2009

...

Reply to this comment
By joker400 on October 18, 2009

it's Awesome experiment

Reply to this comment
By marco on October 13, 2009

Hi, congratulation.. very cool. How to write for some plane with movieassetmaterial intercative (mc)?

ex. http://www.openspaces.it/2009/

thanks

Reply to this comment
By BUCK MARTIN on December 29, 2009

beautiful

Reply to this comment
By maykel on October 07, 2009

incredible!!! the magic of javascript just amazing

Reply to this comment
By Karthik K L V on October 07, 2009

Wow its Very Nice..cool ..How can i d/w it

Reply to this comment
By Bob Dole on October 30, 2009

What does "d/w" stand for?

Reply to this comment
By Mr.doob on November 03, 2009

Download I think.

Reply to this comment
By Link on December 16, 2009

no thats d/l

Reply to this comment
By webworker on October 07, 2009

Interested in what web worker threads can do here.

Reply to this comment
By Megha on October 07, 2009

I love it :)

Reply to this comment
By mr. groovy on September 30, 2009

mr. groovy thinks mr. doob is very koolsville!

Reply to this comment
By Guy With No Life on September 29, 2009

THIS IS SOO COOOOL.

ALMOST AS COOL AS BEING A VIRGIN AT 45 YEARS OLD JUST LIKE MR.DOOOB

Reply to this comment
By Valik on October 02, 2009

Says the guy trolling on here... lets see you achieve anything half as complex as this

Reply to this comment
By lolcake on September 29, 2009

MR DOOB R TEH DUDE

Reply to this comment
By chrelad on September 26, 2009

Can you add the tag to this so it works with Google Chrome Frame? Thanks :)

Reply to this comment
By Mr.doob on September 26, 2009

Done :)

Reply to this comment
By jsuper8 on September 24, 2009

this is amazing!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

Reply to this comment
By omer on September 24, 2009

perfect you won

Reply to this comment
By Smorg on September 18, 2009

Is it possible to do threading with this? Even more complex things could be done faster if it could be parallelized.

Reply to this comment
By Smorg on September 18, 2009

Heh, actually I get the best performance of all in Konqueror using khtml. It seems to distribute load to all 8 of my i7 cores (with smp/HT). It renders slightly differently, a bit blurrier.

I tested webkit in konqueror and aurora, both of which performed the worst.

Chromium made it look smooth but ran single-threadded.

Reply to this comment
By beau on September 12, 2009

Very good idia

Reply to this comment
By Bman on September 10, 2009

Very impressive. your flash version is impressive as well, though the blur effect seems to be exaggerated. Your javascript version 'looks' cleaner.

I noticed a lag issue with page zooming on Google Chrome. ( Ctrl + Mouse Scroll, for those that are wondering how to zoom a webpage that is essentially a dialog box. )

You wrote, "... Something to do with the resizing of elements and the bilinear(?) filter".

This seems to echo that claim.

Reply to this comment
By Bman on September 10, 2009

It's important to note that if you set the zoom back to the default state, it runs smoothly again.

Reply to this comment
By JajaBinks on September 09, 2009

(:

Reply to this comment
By eRiC on September 07, 2009

lol! :D seemed to work fastest on Opera 10 ^^

but really nice thingy anyway!

Reply to this comment
By Ben on September 03, 2009

Very cool. It would be even cooler if it could scrape from a webcam and display it as a reflection on the mirror balls. Not sure if this is at all possible.

Reply to this comment
By Kyle on September 27, 2009

This may be possible by adapting the code from the 'wrap to sphere' plugin/feature in the GIMP, plus add rotation effects.

Reply to this comment
By Thomas Sr. on September 01, 2009

Nice application and consistent motion of grapghics. Would like to possaibly work on future projects with you

Reply to this comment
By gabe on August 31, 2009

Interesting! it will be more depth challenging if there were different color balls with some fluorescent colors for different depth perception and shape concepts

Reply to this comment
By qwertyuioplkjhgfdsazxcvbnm,m on August 30, 2009

need to add

Reply to this comment
By SirBacheL on August 30, 2009

I like it!

Reply to this comment
By mona on August 29, 2009

nice .....yaar...

Reply to this comment
By sumanta on August 28, 2009

yes

Reply to this comment
By Joe on August 27, 2009

Really amazing.

Reply to this comment
By Ashley R on August 27, 2009

Brilliant piece of work. Love it.

Reply to this comment
By Zaeem Mirza on August 26, 2009

Woooooooooooooo! Neat work!

Reply to this comment
By blondu on August 23, 2009

niceeeee

it moves your world :)

Reply to this comment
By over3dsky on August 22, 2009

actrully ,opera is more smoothly

Reply to this comment
By NIMISH KANT on August 21, 2009

awesome man. this is called new generation pc things.

Reply to this comment
By Alen Mujezinovic on August 20, 2009

Awesome. Google Chrome beats my old firefox by lengths on this one. :)

Reply to this comment
By Onlye on August 20, 2009

MSIE8= No Go.....JS Error

Y am i not surprised ;(

Reply to this comment
By IZZO on August 19, 2009

This is kick ass... Now only if i could use this as a screen saver.

Reply to this comment
By Doug Vought on August 16, 2009

This would be amazing if it utilized webcams to create a kind of reflection.

Reply to this comment
By Adi Rat on August 15, 2009

Congradulations, the experiment looks amazing.

Reply to this comment
By BlackStar on August 15, 2009

Opera 10b3 runs this more smoothly than Chrome 3.0.197.11! :p

Reply to this comment
By Slstrc on August 14, 2009

Pretty cool. Although with my PM 1,5 GHz, 512 Mb the only browser which doesn't give me slideshow is Opera Beta 3. It renders whole expirement smoothly.

Perhaps something to do with SVG rendering speed?

Reply to this comment
By thomas leonard on August 14, 2009

On my old laptop looked great, Chrome and Mr doob really put on a show.

Tech of Mr doob makes Chrome Shine!

Reply to this comment
By Sasidhar on August 14, 2009

Sweet !

Awesomely done.

Reply to this comment
By TONY on August 13, 2009

COOL! Need a dozen more moves and a random loop

Reply to this comment
By Daniel Taylor on August 11, 2009

great experiment! whered u get your sphere images?

Reply to this comment
By Mr.doob on August 12, 2009

The original sprite comes from this amazing photo:

http://green.colorize.net/bubbles2.jpg

Taken by Marcus Wallinder:

http://green.colorize.net/

Reply to this comment
By ashly huemoeller on August 10, 2009

this is so fucking cool

Reply to this comment
By dt8 on August 12, 2009

Great comment. You obviously have a deep grasp of the language.

Reply to this comment
By M.O.S.E.S. on August 07, 2009

QUESTION: HOW CAN I DOWNLOAD SOME OF THESE GOOGLE CHROME APPLICATIONS?

PLEASE REPLY: THANK YOU!

Reply to this comment
By yinnerv on August 06, 2009

Mr doob,

I'm not reading source code yet but I think you did mimic DoF (= blur effect on each balls) by swapping static png file.

So I think you know well, that there are some flaws in CSS3 to implement rich interfaces like this example, using JavaScript.

1. There is no blur filter so we have to prepare static image file using Photoshop to express blur / DoF.

2. "background-image" is not transition(able) property. In other word we cannot do simple cross-fading. So if we want to swap image A to image B smoothly, in generally we need to write JavaScript code that will create multiple element for each effect.

Lacking blur filter and limited ability of transition effect is boundary made by Apple I feel, and that is currently not tiny issue for me when I try writing rich and web-compatible interface which fully produced dynamically from Javascript code.

If possible I hope Mr doob to help escalating this issue with this beautiful & excellent demo.

Reply to this comment
By Mr.doob on August 06, 2009

Background-image is scrollable tho... ;)

http://mrdoob.com/projects/chromeexperiments/depth_of_field/files/spriteBlur.png

Reply to this comment
By yinnerv on August 06, 2009

Thanks & I checked the demo again.

Scrolling single background-image would be best way when we should change state of image instantly (your comment reminded me this point thanks). But it is difficult to specify transition effect like cross-fade between the change.. isn't it?

For instance property for example below assumes to specify transition type & properties for backgroun-image exclusively:

-webkit-background-image-transition: morph 0.3s linear;

or

-webkit-background-image-transition: fade 0.3s linear;

Transition specified here takes effect when scroll or change of image source happens. Maybe this example is flawed as specification but anyway I feel need browsers to support animation between the change of background-image.. (Blur effect is another issue to be discussed separately.)

Reply to this comment
By EQJY on August 04, 2009

Hey, I know this might seem dumb, but I love the look of this experiment and I would love to have it as a screen saver. Sometimes I just leave it on, full screen, when I have company, it looks amazing.

Reply to this comment
By Ascenderman on July 29, 2009

I just started programming (using python). How can I understand the structure of the code for this experiment?

Reply to this comment
By Mr.doob on July 30, 2009

I don't understand the question.

Reply to this comment
By robbie schmelzer on July 25, 2009

stunning, thanks

Reply to this comment
By Mindcat on July 19, 2009

Great demo! But, this reminds me a more cool demo written by Flash. Check it out!

http://www.adobe.com/jp/events/cs3_web_edition_tour/page6.html

You can increase the number of balls by clicking the [+] button.

Reply to this comment
By Mr.doob on July 19, 2009

Only difference is that your demo renders on little window, while this on is fullscreen.

Yeah, I knew Roxik's demo already, it came out at the same time (I think after) the flash version of this experiment last year. I've even decompiled it to see how it worked, and that's how I saw the limitations.

Reply to this comment
By Mindcat on July 20, 2009

Thanx Mr.doob. Actually, I don't like a closed and vendor intrinsic application like a Flash. Hoping HTML5+JavaScript could overcome Flash some day. I appreciate your great work !

Reply to this comment
By Ed on July 17, 2009

Why, what's happening next year?

Reply to this comment
By Neekee B. on July 17, 2009

Cool! I cant wait till next year...

Reply to this comment
By Bob Bobson on July 17, 2009

Depth-of-field via JavaScript?! Wow.

Reply to this comment
By Peter on July 13, 2009

Hi! Its peter. It is so cool.

Reply to this comment
By Takeyat on July 12, 2009

This is amazing. I really like it. The way the balls are moving is very natural and beautiful. Thank you, Mr. Boob.

Reply to this comment
By Takeyat on July 12, 2009

I am very sorry, Mr. doob. I made a misspelling of your name in above comment. I thank you once again. Your work is very interesting.

Reply to this comment
By Mr.doob on July 12, 2009

Don't worry, it happens all the time.

Reply to this comment
By Supersoul on July 11, 2009

It's the BORG!

Reply to this comment
By nikhil patel on July 11, 2009

very well designed as per user as well as engineer perspective. It's very difficult for a common engineer to do it.

Reply to this comment
By balagopalan on July 09, 2009

google is goog

Reply to this comment
By coka-kola.ru on July 09, 2009

this is very interesting amazing experimental show!

Reply to this comment
By Bran. on July 07, 2009

its ok, it could use a depth perception add in, so a 3-D like feel, but not too strong

Reply to this comment
By Hunnter on July 03, 2009

AH, i knew this looked familiar!

I saw the Flash version of this the other day there.

Flash version still beats this, but this alone is pretty damn good, JS has came a long way.

Reply to this comment
By Jordan123 on July 11, 2009

What was the flash one's URL?

Reply to this comment
By Mr.doob on July 18, 2009

http://mrdoob.com/lab/pv3d/dof/07/

Reply to this comment
By thiyagu on July 02, 2009

very good one

Reply to this comment
By praveen verma on July 01, 2009

its good & fantastic i like it

Reply to this comment
By Sven on July 01, 2009

Really amazing, it runs smooth under windows with chrome. Very impressing demonstration, thank you!

Reply to this comment
By adam on June 29, 2009

this is more slow than flash on My MacPro 2009 :/

Reply to this comment
By Mr.doob on June 29, 2009

Yes, for some reason on MacOS this runs super slow. It runs fine in Windows/Linux tho. No idea what it can be. Something to do with the resizing of elements and the bilinear(?) filter?

Reply to this comment
By xero / the.fontvir.us on June 26, 2009

sick as always!

Reply to this comment
By James on June 28, 2009

It's MINT!!!!

Reply to this comment
By vczilla on June 25, 2009

Pretty amazing stuff. On the Mac Opera 10.00 Beta is the only browser I tried (I tried Safari 4,Firefox 3.5,Chrome and Opera) where the rendering isn't choppy.

Reply to this comment
By Anomynous Person of DOOM on June 24, 2009

Pretty shiny... I wanna touch it....

Reply to this comment
By Michael on June 22, 2009

shiny

Reply to this comment
By mohammad on June 22, 2009

great thanks google

Reply to this comment
By Sa on June 18, 2009

Would be interesting of the reflection on the balls would be taken live from our webcams.

Reply to this comment
By Mr.doob on June 18, 2009

With... javascript?

Reply to this comment
By Arc on July 14, 2009

The future or whatever it looked like.

Reply to this comment
By Arc on July 14, 2009

Damn thing chopped my comment without warning...

video src="camera://" is supposed to go between "future .... or"

Reply to this comment
By moss on June 16, 2009

thats dope .....I digg

Reply to this comment
By Java Fun!!! on June 15, 2009

I don't understand the point of this.....

Reply to this comment
By kev on June 19, 2009

Are you stupid?

Btw. great demonstration. One of my favorites.

Reply to this comment
By Pavlicko on June 15, 2009

MrDoob,

longtime fan, brother. Love what you did - looks like Javascript is gaining some ground on Flash. Flash still blows it away in terms of performance though. Great work, all the same.

Reply to this comment
By Vlad on June 14, 2009

I am still amazed at what you can do with javascript... Excellent work

Reply to this comment
By joe on June 16, 2009

totally!!

Reply to this comment
By Mahbub on June 14, 2009

grrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr8

Reply to this comment
By Ephilei on June 14, 2009

Does any engine run this well? Safari 4 and Chrome 3 on the Mac are both pretty choppy.

Reply to this comment
By ktopera on August 18, 2009

Runs great in Opera v10 for Mac.

Nicely done, MrDoob. (Wonder why IE doesn't work here? DOH!)

Reply to this comment
By Mike on June 13, 2009

Its broken in firefox 3.5 RC1... i submitted a report...

..but it does look awesome (in chrome & Firefox)

Reply to this comment
By rich on June 12, 2009

There are instances where blurry balls display above clear balls, which throws off the whole effect. Otherwise, its an amazing experiment, top notch.

Reply to this comment
By Mr.doob on June 13, 2009

http://www.shortcourses.com/images/b5ch1/aperture.jpg

Reply to this comment
By blizzard on June 12, 2009

Now that is what I call an excellent post, thanks...

Reply to this comment
By Anonymous on June 12, 2009

Very well done, Mr. Doob.

A suggestion for interactivity:

Allow the user to shake the browser (as with your older experiments) in order to jitter the structure of the bubbles, or introduce a "click to explode" feature that has limited range.

Otherwise, you could have an old-fashioned cursor chaser option.

I really like your work.

Reply to this comment
By SlattsJ on June 11, 2009

Hey, what you have so far looks great. I think once you have the interactive piece in it, it will be incredible. Very realistic. I stumbled onto the experiment section a couple of days ago and have been addicted ever since. :) Will be looking out for you next version... real good stuff.

Reply to this comment
By Mr.doob on June 11, 2009

Well, first thing is to optimise it and improve the code so it works on Firefox and Opera (forget about IE). Then I'll think how can I introduce interactivity. I'm a bit lost to be honest...

Reply to this comment
By cvsinpa on June 11, 2009

What is the reflection on each ball of?

Reply to this comment
By Mr.doob on June 11, 2009

The original sprite comes from this amazing photo:

http://green.colorize.net/bubbles2.jpg

Taken by Marcus Wallinder:

http://green.colorize.net/

Reply to this comment
By Skel 09 on June 10, 2009

Awwwwwwwwwwwwwwwwwwwwwwww ya foolz first post................pretty awesome experiment!

Reply to this comment

Add a comment

All fields are required to prevent spam.