7 ms·
HTML5 Fluid Simulation in WebGL
- reedlaw 12y agoChromium: "WebGL is not supported" Firefox: laggy on UtlraLow settings I've wanted to get behind WebGL for so long but if it can't work as well as the OpenGL ES running on my phone then I will just have to wait and see if it gets any better.
- anon4 12y agoRuns perfectly well on an AMD FX 8350 with 32GB RAM and a top-line nVidia graphics card!
- aceperry 12y agoAwesome, I wish I had a system like that! Doesn't seem to run on my chromebook though. :-(
- imwill 12y agoWorks pretty good with the latest Chrome here.
- nazgob 12y agoWorks fine in latest FF. Retina MBP.
- mhandley 12y agoThat odd - it works fluidly (!) on High setting on my mid 2010 Mac Mini running 10.10 and using Firefox 33, and pretty well on Ultra High setting.
- reedlaw 12y agoI get about 2-3 FPS on Firefox 33 for Linux. Could be the Nouveau driver. The Nvidia driver slows down Firefox so I can't switch back.
- ccozan 12y agoHow would a kernel driver slow down a browser? And nvidia runs incredibly smooth on Linux, even on older hardware.
- reedlaw 12y agoBeats me. I've filed issues with both Firefox[1] and Gnome[2]. 1. https://bugzilla.mozilla.org/show_bug.cgi?id=1065236 https://bugzilla.mozilla.org/show_bug.cgi?id=1065236 2. https://bugzilla.gnome.org/show_bug.cgi?id=736669 https://bugzilla.gnome.org/show_bug.cgi?id=736669
- the_gipsy 12y agoWorks fine on my Chromium, 34.0.1847.116
- reedlaw 12y agoI'm on 38.0.2125.104 64-bit Linux. The alert now says "WebGL is not supported on this device :(" so maybe it's a Linux thing.
- therealunreal 12y agoWorks fine with Firefox on GNU/Linux with just an AMD Kaveri APU (and the free drivers).
- rawland 12y agoGreat stuff! Kudos to George Corney (haxiomic), the creator! Chromium 38.0.2071.0 (279972) works fine in whatever setting on a medium sized machine.
- lucaspiller 12y agoPrevious discussion from 37 days ago: https://news.ycombinator.com/item?id=8325700 https://news.ycombinator.com/item?id=8325700
- sandmanxc 12y agoThese things make me genuinely happy.
- evilliam 12y agoMe too. Especially as it's Haxe (Actionscript 3) rendering out to JS / HTML I'm hoping this goes more mainstream
- nikentic 12y agoTells me "WebGL is not supported" on MBP Yosemite - Latest chrome version.
- haxiomic 12y agoStrange! I'll look into this, what about safari?
- M4v3R 12y agoFor me, it works even smoother on Safari 8.0/Yosemite on 13" rMBP 2013.
- lukeholder 12y agoI'm on a retina MBP, Yosemite, latest chrome, and it works amazingly for me.
- adamors 12y agoMake sure "Use hardware acceleration when available" is enabled in Chrome.
- KhalilK 12y agoThough it looks awesome, It's spamming my console with WebGL errors: [.WebGLRenderingContext]GL ERROR :GL_INVALID_FRAMEBUFFER_OPERATION : glDrawArrays: framebuffer incomplete (clear) [.WebGLRenderingContext]GL ERROR :GL_INVALID_FRAMEBUFFER_OPERATION : glDrawArrays: framebuffer incomplete (check) WebGL: too many errors, no more errors will be reported to the console for this context.
- haxiomic 12y agoI'm not getting these, what's the browser?
- KhalilK 12y agoChrome V38.0.2125.104 on 64-bit Ubuntu 14.04
- laurencei 12y agoI'm on the exact same Chrome version, but on Windows 7 - no issues here.
- exDM69 12y agoThe difference is the OpenGL implementation. On Windows, Chrome uses the ANGLE middleware to implement WebGL. It's a layer that implements the OpenGL ES 2 API on top of Direct3D 9. That solves quite a lot of driver quality issues (at the cost of some overhead). So the question is, which GPU/driver was being used on Linux.
- exDM69 12y agoWhat GPU/driver are you using? This looks like either a driver bug or some unsupported combination of pixel formats. Unfortunately, WebGL doesn't solve these compatibility issues that are inherent to OpenGL and running on a wide variety of hardware and drivers.
- 12y ago
- dochtman 12y agoIt doesn't seem to do anything for me with Firefox Nightly/Yosemite on my recent rMBP. Nothing in the console, either.
- raverbashing 12y agoDid you click and drag?
- jwandborg 12y agoCan't see on my Z2. No touch event listeners.
- bipin-nag 12y agoVery cool, even Ultra High with max iterations works smoothly.
- bshimmin 12y agoBeautiful. I also find this a good test of Apple's bold claims about the speed increase in the latest version of Safari - and, true to what they say, it does seem smoother in Safari, at ultra-high, than in Chrome.
- B5geek 12y agoThis is amazing, thank-you. I would love to see the addition/option of adding static geometric shapes. In other words this would make for an awesome wind-tunnel simulator.
- haxiomic 12y agoThis has been a common request, so I'm definitely going to be adding these features in
- deleted 12y ago[deleted]
- phkahler 12y agoIs this fake physics or real? How deep is the fluid, what methods are used etc... Looks really neat.
- haxiomic 12y agoIt's solving the incompressible form of the Navier-Stokes equations, it's very barebones however - I've left out diffusion for example. It's possible to reduce the grid size and increase the solver iterations to have a more physically accurate simulation, but to go down that route I think there are a lot of algorithmic improvements that should be made
- sokrates 12y agoAs a complete physics noob, can I mod this to work in 3D? I.e. model a concave rigid body shape, and have the fluid flow around it?
- haxiomic 12y agoThe mathematics generalizes to 3D quite easily, but the way the webgl pipeline is used in this case doesn't. It'd be easier I think to start from scratch. I recommend reading through the GPU Gem's article on the topic with code samples http://http.developer.nvidia.com/GPUGems3/gpugems3_ch30.html http://http.developer.nvidia.com/GPUGems3/gpugems3_ch30.html although the physics is discussed, you don't need to follow it deeply to implement it
- hardwaresofton 12y agoThis is really trippy/amazing looking. I love it.