Rigging The Box Part Two

This tutorial is the second half of setting up a rigged box using custom user data and Xpresso to control the joints that we set up in part one. I have included a download of The Box with just the joints and vertex weights so you can follow along with the Xpresso and user data walk through. Below is the C.O.F.F.E.E. script which is incredibly basic and repetitive but can be used in a million different scenarios.

Copy from “main()” to the last bracket:

main()
{
if (Input1 == 0)
{
Output1 = Input2;
Output2 = Input4;
Output3 = Input6;
Output4 = Input8;
Output5 = Input10;
Output6 = Input12;
}
if (Input1 == 1)
{
Output1 = Input3;
Output2 = Input5;
Output3 = Input7;
Output4 = Input9;
Output5 = Input11;
Output6 = Input13;
}
}

If you’re not sure what to do with the script, watch the tutorial so you can see where it goes! If you skipped over part one, then go back and give it a shot. If you have any problems or questions, add them in the comments so we can help you out. Enjoy!

Rigging The Box Part One
Download the original The Box model
Download The Box without user data and Xpresso to follow along with this tutorial.

One thought on “Rigging The Box Part Two

  1. JB101

    Thank you again for this part two of the rigging/scripting the box tutorial. It’s been really helpful in understanding how to add the user data and how Xpresso and COFFEE work and I can see this coming in very useful for anything I need to move and restrict to a certain range of movement.

    Best wishes

    Reply

Comment