NeuraRig is a high-performance C++20 library dedicated to Neural Inverse Kinematics (NIK) and procedural character animation. It leverages deep learning to solve complex skeletal constraints in real-time, providing fluid and natural motion for characters in interactive environments.
The system demonstrates the learning process of the Forward Kinematics (FK) and Inverse Kinematics (IK) hybrid loop, ensuring skeletal integrity and natural joint rotations during locomotion.
NeuraRig is currently in an intensive development and research stage.
Current Progress:
- Core Neural Engine: Integration with LibTorch for high-performance inference.
- Hybrid FK-IK Solver: Specialized logic to maintain bone length and skeletal hierarchy.
- Temporal Smoothing: Implementation of EMA and acceleration loss to eliminate jitter.
- Multi-Candidate Scoring: Real-time selection of the best pose from multiple neural predictions.
- Advanced Gait Logic: Refinement of the procedural locomotion engine.
- Extended Skeleton Support: Scaling the system to support full-body humanoid rigs.
NeuraRig uses a programmable logic layer to define movement patterns, allowing the AI to adapt to different skeletal proportions and velocities dynamically.
- Temporal Awareness: Maintains continuous, jitter-free motion loops using cycle-based inputs.
- Anatomy Agnostic: Automatically scales strides based on bone length inputs.
- Phase Switching: Dynamic transitions between stance and swing phases.
- Pre-trained FK Model: A specialized neural network that generates natural joint rotations (thigh/calf) based on end-effector positioning.
- Physics-Informed Constraints: Penalties for bone length variations and joint limits are integrated directly into the loss function.
- Real-time Inference: Optimized for low-latency performance in high-fidelity simulations.
To integrate NeuraRig into Unreal Engine, use the dedicated bridge plugin:
- Plugin Repository: Neura-Rig-Unreal
- Features: Real-time data streaming, skeletal mapping, and seamless integration into Animation Blueprints.
- nlohmann_json: Configuration and schema parsing.
git clone https://github.com/nlohmann/json.git 3rdParty/json
- muparser: Gait logic expression evaluation.
git clone https://github.com/beltoforion/muparser.git 3rdParty/muparser
- LibTorch (PyTorch C++): Neural engine.
- Extract into
3rdParty/libtorch.
- Extract into
- Build the Project: Use CMake to configure and build the library and tests.
- Model Loading: Ensure the pre-trained model
trained_model.ptis located in the expected directory (e.g.,Tests/Datasets/). - Run Tests: Execute
NRTestNetworkorNRTestServerto verify the installation and model performance.
This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.
