Giter VIP home page Giter VIP logo

motionbuilder-liveskeleton-plugin's Introduction

MotionBuilder-LiveSkeleton-Plugin

MotionBuilder OpenReality Input Device Plugin for skeleton joint data.

This plugin for Autodesk's MotionBuilder is an input device that connects to a thrift server to retrieve data on skeleton joints for creating the skeleton and animating it in real-time.

At the time of creation of this plugin I was learning about the MotionBuilder API and needed a quick solution for streaming animation data for skeletons of arbitrary topologies. I had a hard time compiling the dependencies and unfortunately wasn't able to compile a debug version of the plugin (catch statements are very broad). The plugin is therefore not the most stable one and you'll probably experience crashes of Motionbuilder when using it “incorrectly”. So I advice against using the plugin for production.

I turned to a RPC (Remote procedure call) framework, because I'm neither an expert in network-programming, nor in C++ programming. I chose thrift, because of its cross-language capabilities, because it can be compiled with VS2012 and because of its license.

Requirements

  • up to MotionBuilder2018: Visual Studio 2012 or its v110 toolset
  • since MotionBuilder2019: Visual Studio 2015 Update 3
  • thrift libraries and its IDL compiler
  • boost libraries
  • some environment variables for use with the provided VS project:
    • MOBU_DIR: Path to MotionBuilder installation folder

    • BOOST_ROOT: Path to your boost folder

    • THRIFT_DIR: Path to your thrift folder

      You may or may not need:

    • OPENSSL_ROOT_DIR: path to openssl folder

    • LIBEVENT_DIR: Path to your thrift libevent folder. I guess you only need it if you want to write a server in C++.

How to use

Start your server. Drag the plugin »LiveSkeleton« from your Asset Browser>Templates>Devices into the scene. You can change the IP Adress for the server and the port, as well as the sample rate in the Setup tab. Hit the Online label. If the plugin successfully connected to your server the red square to the left turns green and you see data streaming in on the Joints tab. If your server was not ready, it sometimes can take up to a minute until MotionBuilder is responding again. From the Model binding dropdown choose Create ... and then hit the Live label.

There are 2 other features in the properties of the device.

  • UseReferenceTransformation: Check this if you want to move the skeleton around by its reference joint.
  • Global Data incoming: Check this if your data stream contains the global/world positions of the joints.

Sample Python Server

To test the plugin I wrote a dummy server in python which streams a bvh file. It works best when you stream the data in world coordinates to avoid rotation errors. Just append the -w flag to the python test_server.py »path-to-bvh-file« command and check Global Data Incoming in the device's properties.

motionbuilder-liveskeleton-plugin's People

Contributors

olafhaag avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.