Skip to content

Commit dc377a7

Browse files
committed
release DNACalibration 1.1.0
1 parent 5d19123 commit dc377a7

File tree

190 files changed

+15275
-8656
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

190 files changed

+15275
-8656
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
*.dylib
1616

1717
# Fortran module files
18-
*.mod
1918
*.smod
2019

2120
# Compiled Static libraries

CHANGELOG.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Change Log
2+
3+
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).
4+
5+
## [1.1.0] - 2023-04-20
6+
7+
### Added
8+
- support for Maya 2023
9+
- support for Python 3.9
10+
- `RenameAnimatedMapCommand` class to DNACalib API. Command to remove animated maps.
11+
- `RemoveBlendShapeCommand` class to DNACalib API. Command to remove blend shapes.
12+
- `DNA` class to DNAViewer API. This class is used for accessing data in DNA file.
13+
- `rig_build` method to DNAViewer API. Method used for creating maya scene with functional rig. Replacement of method `assemble_rig`.
14+
- `Config` class to DNAViewer API. Configuration class used for `build_meshes`.
15+
- `RigConfig` class to DNAViewer API. Configuration class used for `rig_build`.
16+
- documentation for DNA library.
17+
18+
### Fixed
19+
- `ClearBlendShapesCommand` blend shape channel LODs were not correctly set.
20+
- `RotateCommand` to rotate blend shape target deltas as well.
21+
- `SetBlendShapeTargetDeltasCommand` to allow setting vertex indices as well.
22+
23+
### Changed
24+
- changed signature of `build_meshes`. Method used for creating maya scene with meshes.
25+
- Simplification of additional assemble script.
26+
- option to pass list of indices to remove in remove commands.
27+
28+
### Removed
29+
- removed method `assemble_rig` from DNAViewer API.

README.md

+59-7
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# MetaHuman DNA Calibration
22
MetaHuman DNA Calibration is a set of tools used for working with MetaHuman DNA files, bundled into a single package.
3-
DNA is an integral part of [MetaHuman](https://www.unrealengine.com/en-US/metahuman) identity.
3+
[`DNA`](/docs/dna.md#metahuman-dna) is an integral part of [MetaHuman](https://www.unrealengine.com/en-US/metahuman) identity.
44
DNA files are created with [MetaHuman Creator](https://metahuman.unrealengine.com/) and downloaded with
5-
[Quixel Bridge](https://docs.metahuman.unrealengine.com/en-US/downloading-metahumans-with-quixel-bridge/).
5+
[Quixel Bridge](https://docs.metahuman.unrealengine.com/en-US/downloading-metahumans-with-quixel-bridge/), and Bifrost in UE5.
66

77
MetaHuman DNA Calibration is a set of tools used for working with MetaHuman DNA files, bundled into a single package. We wanted to share this code to help users customize DNA files so they can better integrate the characters they create into their games and experiences.
88
MetaHuman DNA Calibration tools are provided in a GitHub repository located at this address.
@@ -35,9 +35,12 @@ To use these tools, you should be familiar with:
3535
- Prune blendshapes.
3636
- Remove all blend shape data.
3737

38+
An overview of the MetaHuman DNA file format can be found [`here`](/docs/dna.md).
39+
40+
**Note**: DNACalib library allows removal and renaming of any joint. However, the following joints are used for connecting head with body and should not be removed or renamed: neck_01, neck_02, FACIAL_C_FacialRoot.
3841

3942
## External Software Dependencies
40-
DNACalib's Python wrapper is compiled against Python 3.7. Pre-compiled binaries for Windows and Linux (both 64-bit) are part of the repository.
43+
DNACalib's Python wrapper is compiled against Python 3.7 and 3.9. Pre-compiled binaries for Windows and Linux (both 64-bit) are part of the repository.
4144
If you are using a different version of Python, you must recompile it. Any Python 3 version should be fine.
4245
If a user has a different platform or architecture, the library and its dependencies must be compiled.
4346

@@ -52,37 +55,86 @@ Python 2 is not supported.
5255

5356
DNACalib can be used in C++ projects as a C++ library.
5457

55-
DNACalib Python wrapper can be used in Python 3.7, `mayapy` (Maya's Python interpreter), or Maya 2022.
58+
DNACalib Python wrapper can be used in Python 3.7 and 3.9, `mayapy` (Python interpreter shipped with Maya) shipped with Maya.
59+
Supported Maya versions are 2022 and 2023.
60+
61+
Note: Maya 2022 is bundled with Python 3.7, Maya 2023 is bundled with Python 3.9.
62+
63+
## Environment Setup
64+
65+
In order to use MetaHuman DNA Calibration in your scripts, you need to:
66+
- have Python3 installed, see [note](README.md#external-software-dependencies),
67+
- add MetaHuman DNA Calibration location to `MAYA_MODULE_PATH` system variable (if you want to use MetaHuman DNA Calibration in Maya)
68+
69+
70+
If you plan to run the script from command line:
5671

72+
- in case of Maya's interpreter (mayapy) you will have to initialize maya with:
73+
74+
```python
75+
import maya.standalone
76+
maya.standalone.initialize()
77+
```
78+
79+
- in case of python interpreter you will have to add the following on top of your script:
80+
```python
81+
from os import path as ospath
82+
from sys import path as syspath
83+
from sys import platform
84+
85+
ROOT_DIR = f"{ospath.dirname(ospath.abspath(__file__))}/..".replace("\\", "/")
86+
MAYA_VERSION = "2022" # or 2023
87+
ROOT_LIB_DIR = f"{ROOT_DIR}/lib/Maya{MAYA_VERSION}"
88+
if platform == "win32":
89+
LIB_DIR = f"{ROOT_LIB_DIR}/windows"
90+
elif platform == "linux":
91+
LIB_DIR = f"{ROOT_LIB_DIR}/linux"
92+
else:
93+
raise OSError(
94+
"OS not supported, please compile dependencies and add value to LIB_DIR"
95+
)
96+
97+
# Adds directories to path
98+
syspath.insert(0, ROOT_DIR)
99+
syspath.insert(0, LIB_DIR)
100+
```
101+
102+
NOTE:
103+
If running on Linux, please make sure to append the LD_LIBRARY_PATH with absolute path to the `lib/Maya2022/linux` or `lib/Maya2023/linux` directory before running the example:
104+
- `export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<path-to-lib-linux-dir>`
57105

58106
## DNAViewer
59107
With DNAViewer, you can:
60108
- Create functional rigs for Maya.
61109
- Export FBX files.
62110
- Read internal parts of DNA files.
63111

64-
DNAViewer can be used in `mayapy` (Maya's Python interpreter) or in Maya 2022, except [Propagating changes from Maya scene to dna](/examples/dna_viewer_grab_changes_from_scene_and_propagate_to_dna.py) which can be used just in Maya.
112+
DNAViewer can be used in `mayapy` (Python interpreter shipped with Maya) or in Maya 2022, except [Propagating changes from Maya scene to dna](/examples/dna_viewer_grab_changes_from_scene_and_propagate_to_dna.py) which can be used just in Maya.
65113

66114
# Examples
67115
Several Python examples are provided for reference and can be found in the **examples'** folder:
68116
- [Showcase a few commands](/examples/dnacalib_demo.py)
69117
- [Rename a joint](/examples/dnacalib_rename_joint_demo.py)
70118
- [Create a small DNA from scratch](/examples/dna_demo.py)
119+
- [Read binary DNA and write it in a human readable format](/examples/dna_binary_to_json_demo.py)
71120
- [Create a new DNA from an existing one by extracting specific LODs](/examples/dnacalib_lod_demo.py)
72121
- [Remove a joint](/examples/dnacalib_remove_joint.py)
73122
- [Clear blend shape data](/examples/dnacalib_clear_blend_shapes.py)
74123
- [Subtract values from neutral mesh](/examples/dnacalib_neutral_mesh_subtract.py)
75124
- [Simple UI in Maya](examples/dna_viewer_run_in_maya.py) and some [documentation](docs/dna_viewer.md#usage-in-maya) for it
76-
- [Generate rig and export FBX per LOD](examples/dna_viewer_demo.py)
125+
- [Generates rig](/examples/dna_viewer_build_rig.py)
126+
- [Export FBX per LOD](/examples/dna_viewer_export_fbx.py)
77127
- [Propagating changes from Maya scene to dna](/examples/dna_viewer_grab_changes_from_scene_and_propagate_to_dna.py)
78128

129+
Note: Examples are grouped in three groups: DNA, DNACalib, and DNAViewer. These names are embedded as prefixes: dna_, dnacalib_, and dna_viewer_.
130+
79131
## Example DNA files
80132
[Two demo DNA files](data/dna) are provided for easier testing of this tool. Any DNA generated with [MetaHumanCreator](https://www.unrealengine.com/en-US/metahuman)
81133
should work.
82134

83135
# Notes
84136
If a user runs examples in Maya 2022, the value for `ROOT_DIR` should be changed and absolute paths must be used,
85-
eg. `c:/dna_calibration` in Windows or `/home/user/dna_calibration` in Linux. Important: Use `/` (forward slash), Maya uses forward slashes in path.
137+
e.g. `c:/MetaHuman-DNA-Calibration` in Windows or `/home/user/MetaHuman-DNA-Calibration` in Linux. Important: Use `/` (forward slash), Maya uses forward slashes in path.
86138

87139
See the [FAQ guide](docs/faq.md) for additional specifications.
88140

0 commit comments

Comments
 (0)