Skip to content

Latest commit

ย 

History

History
90 lines (56 loc) ยท 3.1 KB

File metadata and controls

90 lines (56 loc) ยท 3.1 KB

WildPyRigMotion

WildPyRigMotion provides a Python binding for RigLogic. It is designed to be used in python softwares like Blender.

๐Ÿ“– Overview

RigLogic is part of Unreal Engine and MetaHuman. It is used to manage advanced character rigs.

โš ๏ธ Important Notice

WildPyRigMotion does not contain or redistribute the RigLogic source code or binaries.
RigLogic is proprietary technology developed by Epic Games as part of Unreal Engine and MetaHuman.
To use WildPyRigMotion, you must already have a valid installation of Unreal Engine with the "3Lateral RigLogic Plugin for Facial Animation" provided by Epic Games, under Epic's own license terms.

This project is an independent open-source binding.
It is not affiliated with, endorsed by, or sponsored by Epic Games.

More about metahuman and RigLogic:

๐Ÿš€ Installation

๐Ÿ“Œ Requirements

  • Unreal Engine (Source code required)
  • CMake (Version 3.13+ recommended)
  • Python (Version 3.7+ recommended)

๐Ÿ› ๏ธ Compilation

Run the following commands, replacing path/to/UnrealEngine and path/to/python with your actual paths:

cmake -B build -DRIGLOGIC_SOURCE_DIR="path/to/UnrealEngine/Engine/Plugins/Animation/RigLogic/Source/RigLogicLib" -DPYTHON_EXECUTABLE="path/to/python/python.exe"
cmake --build build --config Release

โš ๏ธ If you plan to use RigLogic in Blender, ensure to use the same python version than your Blender.

๐Ÿ“š Usage

Once WildPyRigMotion is installed, here is an example of how to use it:

from pydna import BinaryStreamReader, FileStream, DataLayer

stream = FileStream("Ada.dna", FileStream.AccessMode.Read, FileStream.OpenMode.Binary)
reader = BinaryStreamReader(stream, DataLayer.All)
reader.read()

from pyriglogic import RigInstance, RigLogic

rig_logic = RigLogic(reader)
rig_instance = RigInstance(rig_logic)

expressions = ["browDown", "browLateral"]

rig_instance.setLOD(0)

for expression_name in expressions:
    for raw_control_index in range(reader.getRawControlCount()):
        control_name = reader.getRawControlName(raw_control_index)
        if expression_name in control_name.split(".")[-1]:
            rig_instance.setRawControl(raw_control_index, 1.0)

rig_logic.calculate(rig_instance)
joint_value = rig_instance.getJointOutputs()
 

๐Ÿ“œ License

This project is licensed under the Boost Software License 1.0. See the LICENSE_1_0.txt file for more details.

๐Ÿค Contributing

Contributions are welcome! To contribute:

  1. Fork the project ๐Ÿด
  2. Create a feature branch: git checkout -b feature/my-new-feature
  3. Commit your changes: git commit -m "Added a new feature"
  4. Push the branch: git push origin my-new-feature
  5. Open a pull request โœ…

๐Ÿ’ก Acknowledgments

Thanks to Epic Games for Unreal Engine and Metahuman. ๐ŸŽฎ๐Ÿš€