7 ms·
Show HN: Make a video of any word forming out of candy
- solarkraft 7y agoThanks 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.
- perspective1 7y agoAh, the whole work backwards trick.
- theclaw 7y agoFor 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]. The type of effect used to create these candy words is covered in the "Marble Sorting Machine" video https://www.youtube.com/watch?v=em-pVICrnqM https://www.youtube.com/watch?v=em-pVICrnqM [0] https://www.youtube.com/watch?v=1qSTcxt2t74 https://www.youtube.com/watch?v=1qSTcxt2t74
- flippyhead 7y agoVery nice! I've just made a birthday "card" out of it ;)
- huhtenberg 7y agoNicely done, but getting stuck at 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
- bemmu 7y agoThanks, took me a while to find the issue. 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.
- uranium 7y agoI 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.
- huhtenberg 7y agoCheers, thanks a bunch.
- BrentOzar 7y agoI 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.
- kumarm 7y agoYes. 90% of people are going to render Hello without changing text.
- notelonmusk 7y agoClick on "example animation" to get this https://www.youtube.com/watch?v=AyWqcY_oyo4 https://www.youtube.com/watch?v=AyWqcY_oyo4
- BrentOzar 7y agoRight, but that doesn't solve the UX problem. If you try to render hello, it should just go to that video.
- deleted 7y ago[deleted]
- bemmu 7y agoThanks, I added that in.
- remram 7y ago> there are None jobs ahead of yours... Sounds like I'll be getting it soon then :)
- gabcoh 7y agoThis is really well done. I was wondering if it is open source or if it ever may become open source? I would love to see how it all comes together.
- detaro 7y agoGiven 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.
- paulproteus 7y agoI might have broken it by adding an emoji heart ️ into my message! If so, apologies.
- paulproteus 7y agoI removed the emoji heart and rendered the message successfully. :) Thanks! The recipient was happy to get it.
- tobr 7y ago“Designed while making love to a bunch of old men”, what is that supposed to mean? Edit: I guess it’s some kind of frivolous random quote generator. Confusing and awkward.
- joshmn 7y agoProbably just humor for the sake of being humorous.
- radeklew 7y agoThe nerve of some people!
- bemmu 7y agoYes, it's a random byline generator. I had fun with it while making this, getting a new byline every time I tested the site. I replaced it with a real byline now.
- tobr 7y agoI 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.
- jackewiehose 7y agoHa, I got something about making love with monkeys and thought that sentence was lost in translation. > getting a new byline every time I tested the site. Did you make sure that it is new every time? I'd say a simple timestamp would be a better choice.
- joshmn 7y agoSuper cool. How's it work?
- flaque 7y agoI love that not only does it work with emoji, but it gets the colors of the emoji correct.
- Chris_Chambers 7y agoI’m confused by all of the positive feedback here. This doesn’t work at all. Even the cached default render for “HELLO” that the creator claims to have implemented in the past hour (which would be incredibly simple to implement and difficult to mess up) doesn’t work. People unable to access this site need to stop being “polite” and just post their honest negative feedback. Then everyone else can see the negative feedback in the comments and they’ll know not to waste their time waiting for something to load that will never load.
- andrewstuart 7y agoHow does this work behind the scenes? 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.
- tomcam 7y ago> can you explain the purpose of it more please? Look carefully at the bottom line of the home page and all will be revealed
- PavlovsCat 7y agoI have no clue how it works, but I know how I'd do it: 1. render the animation a bunch of blobs falling and coming to rest, once 2. save a mask for the pixels each blob occupies on each particular frame 3. note the position of each blob in the final image. 4. pick a color for each of the blobs according to their position in the final image and the text (or image) you you want to display on the blobs 5. go through all frames of the animation and color each blob
- andrewstuart 7y agoFrom "There are 16 jobs ahead of yours", to (eventually) "There is 1 job ahead of yours" To "Lost connection to server, please try again in a bit." Ouch.
- bemmu 7y agoI'm sorry. I was running out of memory on the queue server, so had to restart the server many times while fixing it. Instead of caching all the render results in memory, they are now being served from disk instead, which should solve the issue.
- andrewstuart 7y ago>> I'm sorry. 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.
- jmkd 7y agoSuper excited to see results but reporting same issue just now...
- jmkd 7y agoAnd fixed, thank you this is great fun! Font choice possible?
- AstroJetson 7y agoI got it to work and my grand child liked the "Haunted M&M's" that make their name Thanks!
- sixothree 7y agoThat was fun. Thanks for sharing.
- mattmaroon 7y agoHow long did that take you to make, ballpark?
- bemmu 7y agoI'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.
- Marshall222 7y agoI'm a video maker and this is very cool! Good job
- WheelsAtLarge 7y agoVery cool. It would be nice, if you could add a behind the scenes page on how you did it.
- ggggtez 7y agoI'd say it's nearly guaranteed to be just a ray tracer. You can even see gray candies on the borders of the letters, due to anti-aliasing.
- mappu 7y agoThis 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.
- Pfhreak 7y agoPretty fun doing this with unusual unicode characters, like the various emojis.
- GistNoesis 7y agoHave you looked at the possibility of doing it client-side ?