Live data from Hacker News

Rain and Water Effect Experiments

tympanus.net

11–20 of 33 posts

Re: Rain and Water Effect Experiments

#12
post #4

When I download the source and try to open index.html in Chrome, it doesn't work. "Unhandled promise rejection DOMException: Failed to execute 'texImage2D' on 'WebGLRenderingContext': Tainted canvases may not be loaded." Does anyone know how to get it working? Thanks!

You need to run it from a web server. Open a shell on the root directory and run `python -m SimpleHTTPServer 8888` on it. Browse to `localhost` on 8888.

Why wouldn't (or shouldn't) one be able to make it run standalone?

Re: Rain and Water Effect Experiments

#13
post #4

When I download the source and try to open index.html in Chrome, it doesn't work. "Unhandled promise rejection DOMException: Failed to execute 'texImage2D' on 'WebGLRenderingContext': Tainted canvases may not be loaded." Does anyone know how to get it working? Thanks!

You need to run it from a web server. Open a shell on the root directory and run `python -m SimpleHTTPServer 8888` on it. Browse to `localhost` on 8888.

Thanks, that worked.

Re: Rain and Water Effect Experiments

#14

Earlier quoted context omitted.

You need to run it from a web server. Open a shell on the root directory and run `python -m SimpleHTTPServer 8888` on it. Browse to `localhost` on 8888.

Why wouldn't (or shouldn't) one be able to make it run standalone?

I think it relates to the JavaScript used, and limitations imposed by the web browser.

Re: Rain and Water Effect Experiments

#15

Nice! But the initial drops are too similar to a perfect oval. You can try to make some randomness to the initial shape to make it more realistic. (It's much easier to say this than to make a simple model that looks good.)

I did try that, but weirdly shaped drops looked weird on the animation! I was meaning to add a couple of drops close to each other to mitigate that but had no time for experimenting anymore.

Re: Rain and Water Effect Experiments

#16

I wonder how many slo-mo rain-on-glass videos you guys watched while making this.. Looks very impressive! Something about the large droplets' trails is a bit uncanny valley-ish, I think it's the regularity of distances between the trail spots?

Hah, it rained more than enough here this month, no video was needed.

Re: Rain and Water Effect Experiments

#18

Earlier quoted context omitted.

You need to run it from a web server. Open a shell on the root directory and run `python -m SimpleHTTPServer 8888` on it. Browse to `localhost` on 8888.

Why wouldn't (or shouldn't) one be able to make it run standalone?

It's to do with the browser security model and JavaScript restrictions on file:// paths.

I'm not entirely sure of the class of attack that it prevents, but it's been that way for quite a while now.

Re: Rain and Water Effect Experiments

#20

I wonder how many slo-mo rain-on-glass videos you guys watched while making this.. Looks very impressive! Something about the large droplets' trails is a bit uncanny valley-ish, I think it's the regularity of distances between the trail spots?

> Something about the large droplets' trails is a bit uncanny valley-ish, I think it's the regularity of distances between the trail spots?

Yeah. I think it's due to that, and the low terminal velocity of the droplets.

Still very convincing, IMO. If I wasn't looking for it, I would have just assumed it was a video.

Post reply on HN