Thanks to Captain Disillusion I know how this is done (obvious in hind sight, but cool to learn):
The movement of the marbles is pre-rendered and you can color the marbles in the end result right so at the beginning the distribution looks random, but everything falls perfectly into place.
For those not aware Captain Disillusion is an impressively well produced youtube series mimicking the vibe of 90's kids TV, but for an adult audience. The Captain uses Blender for the 3D effects in his videos, and did a great presentation at the Blender conference last year [0].
I would cache the default animation. You’re doubtlessly getting hammered by folks just running it (like me) to see what it looks like, only to get stuck waiting for a GPU slot to render the same word again and again.
No need to be sorry, believe me I understand how hard it is to build something like this. You are to be applauded for doing something both fun and hard.
Waiting for GPU server slot, there are None
jobs ahead of yours...
with a progress bar not longer even crawling.
From the console:
websocket open app.js:189:14
Got text message: progress: GPU render server received target image... app.js:203:12
Got text message: your ticket is xxx app.js:203:12
Got text message: progress: Waiting for GPU server slot, there is one job ahead of yours... 4 app.js:203:12
Got text message: progress: Waiting for GPU server slot, there are None jobs ahead of yours... 61 app.js:203:12
onclose
I had a feature where if the same client (by IP address) starts another job, their previous jobs are deleted. But after I added secure websockets support by proxying through nginx, all IP addresses from the server's point of view became "127.0.0.1" and every job would just be deleted when a new one came in, because they all had the same IP.
I keep getting countdowns from 8 or 15 to 1 [or partway there], and then "onclose", with the UI saying "Lost connection to server, please try again in a bit". For variety now and then I get a 502 somewhere in websocket setup.
When it is counting down, it takes 100+% CPU.
The sample render looks really cool, though. Nice project; thanks for sharing it.
I think it’s just that the one I got was attention grabbing in the wrong way, enough that it was hard not to interpret it as being somehow significant for the whole site.
I think the whimsy/random thing can work, but putting sexual references in there just makes it feel immature.
Given that comparing multiple previews, the locations of the pieces doesn't change, I'd guess the animation data is saved or reproducible. Given an input text, the text is turned to an image, overlaid, the pieces are colored matching the image/the colors matched to piece IDs, and then the animation is rendered with the colors applied to the pieces from the start.
Seems rather alot of work to put text on candy - can you explain the purpose of it more please?
Presumably it is made with Blender at the back end judging from the random quote generator "Created while running away from a squad of offensive drunk guys who are fans of the black skills of Blender."
UPDATE:
This looks like an interesting thing - I'd like to hear more about it - but I've tried several times to render and it always eventually loses connection to the server.
It looks like it was too early for it to hit the front page of HN, some more scaling testing was needed.
This part of Blender's physics animation is deterministic, so you can get this effect by running the physics animation forward to the last frame; recolor the target candy; then go back to the start again. All Blender functions are exposed by a Python API.
I'd estimate 2-3 weeks of actual rendering and coding, plus 2 years of having "I wonder how you could make a rendering such that..." bugging me at the back of my mind.
The movement of the marbles is pre-rendered and you can color the marbles in the end result right so at the beginning the distribution looks random, but everything falls perfectly into place.