7 comments

  • skinfaxi 13 hours ago
    This is cool! I think it would be interesting to expand the language of the world. Right now the interaction with the bell or door is limited (basically binary). Even with binary it would be cool to say ring the bell three times or play shave and a haircut and then a mechanical device that could generate that frequency would be created (for ex a simplistic one would be to skip every other ring for ringing the bell). I guess that would require the world/the objects to account for interactions over some recording period.
    • bhaprayan 13 hours ago
      Thanks! Great idea, I hadn’t realized the interaction is binary. It would be cool to allow for "continuous" inputs too. The world would have to account for interactions over a recording period right.

      Behind the scenes, I’ve tried to make the audio production realistic, so there’s some acoustic modeling going on (eg echoes, attenuation of sound, etc). But yes you could imagine having the input forces be continuous and having the mechanism trying to figure out how to reproduce the sound exactly.

      • skinfaxi 7 hours ago
        I love this idea of declarative modeling of the world because it seems to me to be the way that we as humans do it. I think the hard part about declarative is understanding intent beyond simple interactions. The current limited framing limits the expression one is capable of in the world but of course these are all tradeoffs.
  • pshc 12 hours ago
    The Incredible Machine vibes.
    • bhaprayan 12 hours ago
      Embarrassed I'm just finding out about this, very cool! Neat that they simulated air pressure too. I should try that, would be fun to influence the texture of the sound.
      • SeanAnderson 11 hours ago
        woah lol. I 100% assumed you used it as inspiration for your software.
        • bhaprayan 11 hours ago
          Haha it sort of came out before I was born, otherwise I definitely would have! I think I'll take a leaf out of their book and expose a mode to make the simulation deterministic. I'm using a PRNG right now to make the mechanism selection more "creative", but I could see determinism being an interesting experience.
  • donalddominko 11 hours ago
    This is actually very interesting idea you had. I watched the demo and played with it and I am looking for a link to repo - I would like to know how did you implement the system achieving the outcome.
    • bhaprayan 10 hours ago
      Happy to open source, the code is a little messy right now, so I’ll clean it up and post a link in a few days!

      High level:

      I’m using ThreeJS for the rendering and Rapier (https://rapier.rs/) for simulating bodies, joints, collisions, forces, etc. The mechanism is solved for using a simple heuristic search (eg constraints, etc that you introduce in the scene) and then run through Rapier to find a configuration that works, though there are definitely more sophisticated ways to do this. The audio is based off a sound pack which I tried to make physically realistic so impacts are panned relative to the camera, with compression and a small generated reverb.

  • insiderprint 9 hours ago
    This is fancinating!
    • bhaprayan 9 hours ago
      Thanks, happy to hear you liked it!
  • jdw64 13 hours ago
    It seems people think alike. Something that inspired me in the past also had a similar implementation.

    [1]https://www.microsoft.com/en-us/research/publication/motion-...

    • bhaprayan 12 hours ago
      That was cool! Watched the demo video, didn't go through the paper yet. I'm running a simple heuristic to test for candidate solutions and running them through Rapier (https://rapier.rs), but simulated annealing to efficiently search the configuration space would be a nice extension.
      • jdw64 12 hours ago
        Your work is wonderful, too.
        • bhaprayan 12 hours ago
          Thanks, appreciate it!
  • mcphage 12 hours ago
    Disney's research lab did something along these lines some years ago for making a point follow a path. You draw a path, and it generates the linkages required to match that path as closely as possible. They've had a lot of follow-up work since, but I remember this video for it: https://youtu.be/DfznnKUwywQ?si=F-5NZxKu4hP_mand
    • bhaprayan 10 hours ago
      Really neat demo! I skimmed through the paper and it looks like they’re using a precomputed database to find an assembly that matches the motion (presumably as a seed to instantiate the solver). That’s definitely more efficient than what I have right now (though perhaps less versatile). I like that they manufactured a few of the characters using 3D printing! That was definitely on my mind, really happy to see they did it.

      Some of the mechanisms (belt drives etc) might be a little tricky with 3D printers, but would be very cool to see the mechanism tangibly realized.

  • hilde574 11 hours ago
    [flagged]