First, you hire a master puppeteer to engineer a very complicated apparatus of pulleys and fishing wire suspended from an upside down Lazy Susan. Next, you teach a bunch of production interns how to tug on a web of strings in perfectly choreographed succession, and roll the cameras.
Just kidding. You do it in CG.
For real though – How do you fold a box in 3D?
Well, there are a few ways to skin that cat and we have been doing some R&D on it for a product packaging piece we are working on. At first, we experimented with a couple procedural techniques that unfold polygons across a 3D surface. This definitely looked very cool, but we decided to go a more traditional route so we could actually show a product-correct fold.
Solution: The same way you would in real life.
We brought in a CAD drawing of the unfolded box, modeled it, and bound it to a bone rig that had all the right joints in all the right places. Then when it was time to animate, we simply walked ourselves through bending each of the joints until we had a folded box.
One gotcha of doing it this way is that the initial flat model didn’t hold up once it was folded. There was some interpenetration in areas that weren’t acceptable and the surfaces were too flat, so we ended up doing additional modeling on the animated box after it had completed its fold.
Wow, things got a little technical there. Honestly though, it sounds harder than it is and it still ended up being much easier than puppeteering this whole thing together in camera.
We’ll be posting more stuff on this project as it “unfolds” (Sorry, I had to). In the meantime here is a little taste of what’s to come…