Hacker News new | past | comments | ask | show | jobs | submit login
Jellyfish Simulation using Javascript, WebGL (chrysaora.com)
118 points by TamDenholm on April 20, 2011 | hide | past | favorite | 48 comments



I tried to run it in Firefox 4.0 and Chrome 10.0.648.204, but in both cases it returned an alert with the message, "This website requires WebGL. Try running Chrome 9+ or Firefox 4+".


Do you have WinXP? I think WebGL is disabled by default in XP because of instability (at least in Chrome).


I just ran it on Chrome 10.0.648.205 on Ubuntu 10.10 and I get the same error.


I don't think any browser supports WebGL on Ubuntu yet.

edit: On Ubuntu, first close all chrome windows. Then start chrome with the command-line option "--ignore-gpu-blacklist" and it works.


I think that might have something to do with the underlying GPU capabilities of your computer, happened to me as well with Chrome 12!


Your browser is not checking your graphics card.

It's an error in the version detection.


This is why we should be checking for capabilities/features and not version. And part of this is reporting the correct, helpful error message when the capability isn't there, and not just say they have the wrong version.

I still have this problem with 64 bit flash on Linux, which adobe has decided to use a different format version string for.


It is checking for capabilities and not version: try { gl = canvas.getContext( "experimental-webgl") ; gl.viewportWidth = docWidth; gl.viewportHeight = docHeight; } catch(e) { } if (!gl) { alert("This website requires WebGL. Try running Chrome 9+ or Firefox 4+"); }


Yep, it's not the Chrome version. It works fine for me using Chrome 10.0.648.204.


I'm trying with FF4 and Chrome 11 with a GeForce 9600 GT and it still gives me the error message.


GPU acceleration is off by default in Chrome 10 on Windows XP.

It worked for me when I started Chrome with: chrome.exe --enable-webgl --ignore-gpu-blacklist


Works great here on Firefox 4, so maybe a problem with your graphics card drivers? Do any other WebGL demos work?


I had to go to about:config and force WebGL enabled on Firefox 4 on XP with a Geforce 8800GT.


Mozilla maintains a wiki on blocked video drivers and how to force enable them for each os/platform.

https://wiki.mozilla.org/Blocklisting/Blocked_Graphics_Drive...


Performance is heavily bound by the GPU on my system - Chrome goes from sucking up 60% of my CPU down to just 7% when I launch the demo(OK, I've got crappy Intel integrated graphics, but still). I consider that to be a good demonstration that JavaScript performance is now capable of driving detailed 3D scenes.


Looks really cool! Not having much experience with oceans, it's a little weird to see the jellyfish swimming sideways; I'm assuming they mostly swim "up"?


If they only swam up they would soon run out of sea!


:) I was assuming sort of an up-and-sideways kind of up, and maybe they sink down when they hit the top and go up-and-sideways again. Jellyfish just don't seem like the right-angles-to-the-surface sort of swimmers to me, but like I say, I have no experience with jellyfish, not even seeing them on nature shows.


As someone who has swam through jellyfish, they totally swim sideways.


which is usually exactly what they do. Go to Boston Harbor in the summer.


sigh

Running @ 45fps on a computer that runs Crysis 2 @ 60 FPS on extreme settings. Performance of WebGL is still abysmal and unusable it seems.


Which I can argue is pretty good for beta software, with very little heavy commercial use driving performance down. I also highly doubt the chrome/firefox team has enough resources allocated to truly make webgl a high performance thing yet. Regardless this is still faster then using canvas directly.


Don't go to a movie theater. They call it "moving pictures" when they sell you the ticket, but it is only 24 frames per second, and the individual frames don't move. Bogus.


Movies have motion blur which smooths out the judders of a low framerate


In addition, human eye can detect flicker better in a bright room, vs a dark one. That's why movies can get away with 24 fps, and not something higher.

That said, you don't need 60fps to enjoy what you're watching unless you're playing games.


This is not very optimized app. There is a lot of overdraw for the volumetric effect and jellyfish transparency which kills the performance most of all. Also, animations are done in vertex shader on a high poly geometry and the shader itself could be much more efficient in doing that.

Im sure you cant run Crysis 2 in WebGL but you can still squeeze out a lot of performance out of it. Im excited to see what other people are going to make with it.


My first thought was rate limiting, I tweaked the settings for speed and still capped out at 50fps.


Counterpoint:

I get 30 FPS on a machine with an Intel E2180 @2GHz processor and a GeForce 8400 GS...

Chrome 10 on WinXP 32bit.


Honestly, this is the first time I've ever caught myself saying "Wow!" out-loud when visiting a website.

But, I think there is some issue with the framerate reporting. It was indicating between 40 and 60fps on my machine, but performance was fairly choppy.


Using Chrome 11.0.696.50 beta here. It took a while to setup in that I got a partial skybox and a few jellyfish popping up and then a few more and then a few more after that. I thought the camera or scene was changing because it was so jarring. Once setup though, it works pretty well.

I get 8-9fps with the default settings. Reducing the count of Jellyfish to 5 gave me closer to 20fps. Reducing it to 1 and turning off Skybox and Particles gave me about 40fps, but didn't look nearly as cool.

Very nice demo.


Surprisingly it works fine in Ubuntu with Chrome 10. I'm glad Chrome development progresses on Linux evenly with Mac and Windows as compared to Skype which lags behind.


With Skype, Windows is in the lead, with Mac trailing a ways behind, and Linux even further behind. Though with the reception of the latest Skype version for Mac, maybe it's a good thing that Linux is lagging behind.


This is really good, it would be good if there was a way to use these kind of things as screen savers. There are so many good browser visualizations!


Very cool. I got about 50 FPS on a VMWare Fusion virtual machine. Granted it had my two virtual CPUs up around 90% usage, but still impressive.


looks beautiful in chrome 10


It's telling me I'm getting ~15 fps but it looks more like 2 fps to me. MBP, Chrome 10.

EDIT: restarted Chrome, it's working much better now.


Impressive despite the performance issues - I got OK FPS but it tended to stutter. I'm using a cheapie GPU though.


Can someone post a screen shot for those of us whom it's not working?


You can check the author's blog, he has a few videos on how he made it, in particular one where he uses a kinect interface: http://blog.aleksandarrodic.com/?p=60

I'm running firefox 4 (linux ubuntu 64bit) and it works fine.


http://i.imgur.com/r7SVE.png

It's all moving very smoothly and realistically for me on Chrome 12. You can also move your mouse to move around. Cool stuff.



Neato. I want to see a game made out of this.


Holy crap this is cool!


How long did it take you to create this?


2 weeks for the first demo: http://aleksandarrodic.com/p/jellyfish/

Then about two months for the rest of the stuff


this is impressive.


+1 for webgl :)


Very shiny and pretty, but dear god I could hardly type in skype, it was printing out characters at a pace of 0.3/second.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: