Fbrelation: A library for creating MotionBuilder relation constraints

Hello! I thought I’d share a library that I wrote for MotionBuilder as a personal exercise. It’s a declarative language for defining relation constraints. Here’s a video that shows how it’s used:

//youtu.be/ukS68Fa8F10

Source: https://github.com/awforsythe/fbrelation
Documentation: http://awforsythe.com/fbrelation/

In a nutshell: I got really tired of creating relation constraints with the MotionBuilder API, so I wrote a library that turns this…


linear_interpolate
{
    a    [input="Number"]
    b    [input="Number"]
    t    [input="Number"]

    sub  [group="Number", type="Subtract (a - b)"]
    mult [group="Number", type="Multiply (a x b)"]
    add  [group="Number", type="Add (a + b)"]

    r    [output="Number"]

              b -> sub.a   # b - a
              a -> sub.b

     sub.Result -> mult.a  # (b - a) * t
              t -> mult.b

              a -> add.a   # a + ((b - a) * t)
    mult.Result -> add.b

     add.Result -> r
}

…into this:

If you’re thinking, “just import the constraint from an FBX file, dummy,” you have a decent point. But then you have no sense of fun, either.

1 Like