• Editor
  • Advanced 2.5D box rig

Hi forum,

I've been trying to rig a cube to give a 3D-like effect by following the tips on the Spine website, but while I’ve managed to get a convincing deformation of the "base," I can't seem to transfer that deformation to the overlapping parts of the design I want to animate.

For example, this is the base of the box, and it deforms the way I want:

But the final composition with all the parts of the box looks like this:

And I want parts like the light panels or the corner decorations to properly follow the corners when the box is deformed. I'm doing everything with a single bone to control the perspective (the edge closest to the "camera" is fixed to one bone, and all other vertices have gradually shared weights between that fixed bone and the controller).

I've managed to get the upper corner elements to follow the correct positions during deformation using transform constraints, but the elements on the cube’s surfaces (like the light panels, the book icon, or the bottom-left protrusion) don’t deform or move properly, neither with direct weighting nor with transform constraints.

Can anyone help me with this rig? I have no experience with vertex weighting on hard-surface meshes—it’s so much easier to deform characters than boxes!

Thanks in advance!

    Related Discussions
    ...

    To achieve a 3D-like effect for your cube in Spine, you can use a combination of bones, weights, and constraints to ensure that all parts of the cube deform correctly. For the elements on the cube's surfaces, such as light panels and decorations, you can try the following approach:

    1. Bone Setup: Ensure that you have a sufficient number of bones to control the deformation of each face of the cube. Each face should have its own set of bones to allow for independent control.

    2. Weighting: Assign weights to the vertices of the mesh so that they are influenced by the appropriate bones. For hard-surface meshes, it's crucial to have precise control over the weights to maintain the structure of the cube during deformation.

    3. Transform Constraints: Use transform constraints to ensure that elements like the light panels and decorations follow the movement and rotation of the cube's faces. You can set up constraints to maintain the relative position and orientation of these elements to the cube's surface.

    4. Mesh Deformation: For elements that need to deform with the cube, ensure that their vertices are weighted to the same bones that control the cube's deformation. This will allow them to move and deform in sync with the cube.

    5. Testing and Iteration: Test the rig by animating the cube and observing how the elements behave. Adjust the weights and constraints as needed to achieve the desired effect.

    By carefully setting up your bones, weights, and constraints, you should be able to achieve a convincing 3D-like effect for your cube with all elements moving and deforming correctly.

    Yimec Are you aiming for a full 360-degree rotation, or would a slight angle adjustment be enough to give it a three-dimensional appearance? It would be helpful if you could share some images showing the pose when the control bone is moved, so we can better understand your progress and where you're running into issues.

      Misaki I only want some perspective deformation. Here is a gif of what I achieved so far (which is enough for what I want):

      I hope this is helpful.

      Thank you @Misaki !

        Yimec Thank you for sharing your assumptions on how it should be moved!

        You may have already tried this, and I'm not sure if it will be helpful, but I think the easiest way to create a 2.5D box is to create a template box and attach other boxes to it using the "weld" tool. It would be best to create a placeholder with multiple nested boxes and then weld the actual parts onto them.
        If you are not familiar with weld, please refer to the following video:

        I created a simple Spine project to convey this concept:

        box.zip
        29kB

        The project contains the following skeleton:

        The difficult thing about your box case is that there are many bumps and uneven areas on the box. When trying to determine the appropriate weigh for each part, it can be a little confusing, so I think it would be a good idea to create a box with overlapping parts from the outermost part to the innermost part as a standard for the weight, test the desired movement there, and then weld the parts together.

        I tested a workflow where I first created the boxes and then welded the star symbols, and it seemed to work well, so I hope this can be of some help.

        Hi there @Misaki !

        In the end, using the example you sent me—plus a bit of my own logic, which might not be perfect but did the trick—I managed it with transform constraints. I put a bone on each corner of the box and used them as “anchors” for other bones that depend on them, each with its own transform constraint. I may have over-complicated things, but for what I needed, it worked!

        Thanks so much for your reply, and sorry it took me a while to answer. I’d been researching as much as I could to sort this out; it should have been something simple, but it definitely wasn’t!

          Yimec I'm glad you found a good solution! It may be easy in the case of a box with a flat surface, but I think it will undoubtedly be difficult in cases like yours, where there are many irregularities and mixed curved contours. Anyway, thanks for getting back to us!