This sample receives Open Sound Control (OSC) messages from a UDP socket and applies them to a single bone. This source uses the oscpack library for parsing OSC messages and the Windows Sockets API (WSA) for UDP communication.
-
Get and build the oscpack library
You can download the oscpack library source from oscpack GitHub.
-
Set CMake variables in
CMakeLists.txt# === Environment-specific user configuration === set(PRODUCT_VERSION 2026) set(OSC_PACK_ROOT "C:/oscpack_1_1_0/install") set(MOBU_ROOT "C:/Program Files/Autodesk/MotionBuilder ${PRODUCT_VERSION}")PRODUCT_VERSION: The version of MotionBuilderOSC_PACK_ROOT: The path to the oscpack library root directoryMOBU_ROOT: The path to the MotionBuilder installation directory
-
Build the sample with CMake
cd OSCInputDeviceSample cmake -S . -B build -G "Visual Studio 17 2022"if Release build, run
cmake --build build --config Releaseif Debug build, run
cmake --build build --config DebugOSCInputDeviceSample-<version>-MB<product version>.dllwill be built and copied to theMotionBuilder <product version>/bin/x64/pluginsdirectory. If you need the debug information, please build with debug configuration and manually copy theOSCInputDeviceSample-<version>-MB<product version>.pdbfile to the same directory.
This sample plugin will be built as OSCInputDeviceSample-<version>-MB<product version>.dll (and OSCInputDeviceSample-<version>-MB<product version>.pdb if debug).
Place this file in the MotionBuilder <product version>/bin/x64/plugins directory.
-
This project is licensed under the BSD 3-Clause License. Also includes the MIT-licensed library oscpack (see LICENSE/oscpack/LICENSE.txt)
-
By default, this sample plugin assumes that the message format follows the VMC (Virtual Motion Capture) Protocol.
See the link and OSCInputDeviceSample_socket.cpp for more details.
