Skip to content

Commit 2819408

Browse files
committed
initial commit
0 parents  commit 2819408

388 files changed

Lines changed: 211876 additions & 0 deletions

File tree

Some content is hidden

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

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
data/dna/Ada.dna filter=lfs diff=lfs merge=lfs -text
2+
data/dna/Taro.dna filter=lfs diff=lfs merge=lfs -text

.gitignore

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# Prerequisites
2+
*.d
3+
4+
# Compiled Object files
5+
*.slo
6+
*.lo
7+
*.o
8+
*.obj
9+
10+
# Precompiled Headers
11+
*.gch
12+
*.pch
13+
14+
# Compiled Dynamic libraries
15+
*.so
16+
*.dylib
17+
*.dll
18+
19+
# Fortran module files
20+
*.mod
21+
*.smod
22+
23+
# Compiled Static libraries
24+
*.lai
25+
*.la
26+
*.a
27+
*.lib
28+
29+
# Executables
30+
*.exe
31+
*.out
32+
*.app
33+
34+
# Local build
35+
/build*
36+
37+
# Work Environment Artifacts
38+
/.vs
39+
/.vscode
40+
41+
*.pyc
42+
43+
/.idea
44+
/output

LICENSE

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
MetaHuman DNA Calibration License Agreement
2+
3+
This MetaHuman DNA Calibration License Agreement (“License Agreement”) is a legal document
4+
detailing your rights and obligations related to your use of Epic’s proprietary
5+
computer software known as MetaHuman DNA Calibration, including any updates, upgrades, or source
6+
code made available to you by Epic (“Software”). By downloading or using the
7+
Software, you are agreeing to be bound by the terms of this License Agreement,
8+
and this License Agreement will be effective upon the first of those events to
9+
occur. If you do not or cannot agree to the terms of this License Agreement, do
10+
not use the Software.
11+
12+
1. Internal Production License. Subject to the terms and conditions herein,
13+
Epic hereby grants you a worldwide, nonexclusive, royalty-free, non-sublicensable
14+
license to reproduce and prepare derivative works of the Software for the sole
15+
purpose of developing and using tools that enable third-party software programs
16+
to export and edit digital characters in Epic’s proprietary MetaHuman format
17+
(such exports, “MetaHuman Characters”). You may not distribute the Software or
18+
make any use of the Software other than as expressly permitted in this Section 1.
19+
20+
2. MetaHuman Characters. You may only use MetaHuman Characters to the extent
21+
such uses would be permitted if the MetaHuman Characters were licensed to you as
22+
MetaHuman Content under the Epic Content License Agreement available at
23+
https://www.unrealengine.com/en-US/eula/content. This means, for example, that
24+
MetaHuman Characters may only be used in conjunction with Unreal Engine and Unreal
25+
Engine-based products as designated by Epic, such as Twinmotion.
26+
27+
3. Ownership. The Software, and all intellectual property rights therein or
28+
thereto, are owned by Epic or Epic’s licensors and are protected under both United
29+
States and foreign laws. Epic reserve all right, title and interest in and to the
30+
Software, including all related intellectual property rights therein or thereto.
31+
No licenses or rights are granted to you other than as expressly stated in this
32+
License Agreement.
33+
34+
4. Trademarks. This License Agreement does not grant you any right, title or
35+
interest in the trademarks, service marks, trade names, and logos associated with
36+
Epic, Epic’s games and other intellectual property, including Unreal Engine (the
37+
“Epic Trademarks”). All use of the Epic Trademarks will inure to the sole benefit
38+
of Epic.
39+
40+
5. Disclaimer of Warranties. THE SOFTWARE, INCLUDING ALL INFORMATION, CONTENT,
41+
MATERIALS AND CODE, ARE PROVIDED BY EPIC ON AN “AS IS” AND “AS AVAILABLE” BASIS.
42+
EPIC AND ITS AFFILIATES, LICENSORS AND SERVICE PROVIDERS (THE “EPIC PARTIES”) MAKE
43+
NO REPRESENTATIONS OR WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED, REGARDING THE SOFTWARE.
44+
YOUR USE OF THE SOFTWARE IS AT YOUR SOLE RISK. TO THE FULL EXTENT PERMISSIBLE BY
45+
APPLICABLE LAW, THE EPIC PARTIES DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
46+
IMPLIED OR STATUTORY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
47+
TITLE AND NONINFRINGEMENT. THE EPIC PARTIES DO NOT WARRANT THAT THE SOFTWARE IS
48+
FREE OF VIRUSES OR OTHER HARMFUL COMPONENTS. THE PARTIES ACKNOWLEDGE AND AGREE THAT
49+
THE FOREGOING WARRANTY DISCLAIMERS WERE AN ESSENTIAL ELEMENT IN SETTING CONSIDERATION
50+
UNDER THIS LICENSE AGREEMENT.
51+
52+
6. Limitation of Liability. TO THE FULLEST EXTENT PERMITTED BY APPLICABLE LAW,
53+
THE EPIC PARTIES WILL HAVE NO, AND YOU IRREVOCABLY RELEASE THE EPIC PARTIES FROM
54+
AND FOREVER WAIVES ANY RIGHT YOU HAVE TO MAKE CLAIMS AGAINST THE EPIC PARTIES FOR,
55+
ANY LIABILITY (WHETHER IN CONTRACT, WARRANTY, TORT, NEGLIGENCE, STRICT LIABILITY
56+
OR OTHERWISE) ARISING OUT OF OR RELATING TO THE USE OR INABILITY TO USE THE SOFTWARE
57+
OR OTHERWISE UNDER OR IN CONNECTION WITH THIS LICENSE AGREEMENT, INCLUDING WITHOUT
58+
LIMITATION ANY DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, EXEMPLARY, SPECIAL OR
59+
PUNITIVE DAMAGES OR LIABILITIES WHATSOEVER, EVEN IF A EPIC PARTY HAS BEEN ADVISED
60+
OF THE POSSIBILITY OF SUCH DAMAGES. YOUR EXCLUSIVE REMEDY WILL BE TO IMMEDIATELY
61+
STOP USING THE SOFTWARE. THE LIMITATIONS OF LIABILITY SET FORTH IN THIS SECTION WILL
62+
SURVIVE ANY TERMINATION OR EXPIRATION OF THIS LICENSE AGREEMENT AND WILL APPLY EVEN
63+
IF ANY LIMITED REMEDY SPECIFIED HEREIN IS FOUND TO HAVE FAILED ITS ESSENTIAL PURPOSE.
64+
IN NO EVENT WILL THE AGGREGATE LIABILITY OF THE EPIC PARTIES HEREUNDER EXCEED TEN
65+
DOLLARS ($10.00). The foregoing disclaimer of warranties, disclaimer of certain
66+
damages and limitation of liability will apply to the maximum extent permitted by
67+
applicable law. The laws of some states or jurisdictions do not allow the exclusion
68+
of implied warranties or the exclusion or limitation of certain damages. To the extent
69+
that those laws apply to this License Agreement, the exclusions and limitations set
70+
forth above may not apply to you.
71+
72+
7. U.S. Government License Rights. You may not use, access, download, or
73+
otherwise export, reexport, or transfer the Software in violation of applicable
74+
export control, economic sanctions, and import laws and regulations, such as the
75+
U.S. Export Administration Regulations and U.S. Department of the Treasury’s
76+
Office of Foreign Assets Control regulations.
77+
78+
8. Termination. Without prejudice to any other rights, Epic may, upon written
79+
notice, terminate this License Agreement at any time for convenience. Unless
80+
otherwise agreed to by Epic in writing, upon termination of this License Agreement,
81+
You must immediately delete all copies of the Software and any derivative works
82+
based on the Software.
83+
84+
9. Governing Law; Jurisdiction. Any dispute or claim by you arising out of
85+
or related to this License Agreement will be governed by North Carolina law,
86+
exclusive of its choice of law rules. You and Epic submit to the exclusive jurisdiction
87+
of the Superior Court of Wake County, North Carolina, or, if federal court jurisdiction
88+
exists, the United States District Court for the Eastern District of North Carolina.
89+
You and Epic waive any jurisdictional, venue, or inconvenient forum objections to such
90+
courts (without affecting either party’s rights to remove a case to federal court if
91+
permissible), as well as any right to a jury trial. The Convention on Contracts for
92+
the International Sale of Goods will not apply. Any law or regulation which provides
93+
that the language of a contract will be construed against the drafter will not apply
94+
to this License Agreement. This Section 9 will be interpreted as broadly as applicable
95+
law permits.
96+
97+
10. Attorneys’ Fees. In any action or proceeding to enforce rights under this
98+
License Agreement, the prevailing party will be entitled to recover costs and
99+
reasonable attorneys’ fees.
100+
101+
11. Severability; Waiver. If any provision or part of a provision of this License
102+
Agreement is unlawful, void or unenforceable, that provision or part of the provision
103+
is deemed severable from this License Agreement and does not affect the validity and
104+
enforceability of any remaining provisions.
105+
106+
The failure or delay of Epic to exercise or enforce any right, remedy or provision of
107+
this License Agreement will not constitute a waiver of such right, remedy or provision.
108+
All waivers of any terms or conditions in this License Agreement must be in writing
109+
signed by Epic.
110+
111+
12. Entire Agreement. This License Agreement sets forth the entire agreement
112+
between Epic and You with respect to the Software and the subject matter hereof
113+
and supersedes all prior and contemporaneous understandings and agreements whether
114+
written or oral. No amendment, modification or waiver of any of the provisions of
115+
this License Agreement will be valid unless set forth in a written instrument signed
116+
by the party to be bound thereby.

README.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# DNA Calibration
2+
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.
4+
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/).
6+
7+
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.
8+
DNA Calibration tools are provided in a GitHub repository located at this address.
9+
10+
11+
# Overview
12+
For an explanation about how the repository is organized, [click here](docs/repository_organization.md).
13+
14+
The DNA Calibration repository contains two distinct tools:
15+
- [DNACalib](docs/dnacalib.md) (and its dependencies)
16+
- [DNAViewer](docs/dna_viewer.md)
17+
18+
19+
## Required Knowledge
20+
To use these tools, you should be familiar with:
21+
- Rigging in Maya
22+
- Python
23+
24+
## Optional Knowledge
25+
- C++ (for [DNACalib](docs/dnacalib.md) and its [API](docs/dnacalib_api.md))
26+
27+
28+
## DNACalib
29+
[DNACalib](docs/dnacalib.md) and its [API](docs/dnacalib_api.md) are used to inspect and modify DNA files. With [DNACalib](docs/dnacalib.md), you can make the following changes in DNA files:
30+
- Rename joints, meshes, blendshapes, and / or animated maps.
31+
- Remove joints, meshes, and / or joint animation.
32+
- Rotate, scale, and translate the rig.
33+
- Remove LODs.
34+
- Change neutral joint positions, neutral mesh positions, and blendshape delta values.
35+
- Prune blendshapes.
36+
- Remove all blend shape data.
37+
38+
39+
## External Software Dependencies
40+
DNACalib's Python wrapper is compiled against Python 3.7. If you are using a different version of Python, you must recompile it. Any Python 3 version should be fine.
41+
Pre-compiled binaries for Windows and Linux (both 64-bit) are part of the repository.
42+
If a user has a different platform or architecture, the library and its dependencies must be compiled.
43+
44+
**Warning:**
45+
Python 2 is not supported.
46+
47+
DNACalib can be used in C++ projects as a C++ library.
48+
49+
DNACalib Python wrapper can be used in Python 3.7, `mayapy` (Maya's Python interpreter), or Maya 2022.
50+
51+
52+
## DNAViewer
53+
With DNAViewer, you can:
54+
- Create functional rigs for Maya.
55+
- Export FBX files.
56+
- Read internal parts of DNA files.
57+
58+
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.
59+
60+
# Examples
61+
Several Python examples are provided for reference and can be found in the **examples'** folder:
62+
- [Showcase a few commands](/examples/dnacalib_demo.py)
63+
- [Rename a joint](/examples/dnacalib_rename_joint_demo.py)
64+
- [Create a small DNA from scratch](/examples/dna_demo.py)
65+
- [Create a new DNA from an existing one by extracting specific LODs](/examples/dnacalib_lod_demo.py)
66+
- [Remove a joint](/examples/dnacalib_remove_joint.py)
67+
- [Clear blend shape data](/examples/dnacalib_clear_blend_shapes.py)
68+
- [Subtract values from neutral mesh](/examples/dnacalib_neutral_mesh_subtract.py)
69+
- [Simple UI in Maya](examples/dna_viewer_run_in_maya.py) and some [documentation](docs/dna_viewer.md#usage-in-maya) for it
70+
- [Generate rig and export FBX per LOD](examples/dna_viewer_demo.py)
71+
- [Propagating changes from Maya scene to dna](/examples/dna_viewer_grab_changes_from_scene_and_propagate_to_dna.py)
72+
73+
## Example DNA files
74+
[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)
75+
should work.
76+
77+
# Notes
78+
If a user runs examples in Maya 2022, the value for `ROOT_DIR` should be changed and absolute paths must be used,
79+
eg. `c:/dna_calibration` in Windows or `/home/user/dna_calibration` in Linux. Important: Use `/` (forward slash), Maya uses forward slashes in path.
80+
81+
See the [FAQ guide](docs/faq.md) for additional specifications.
82+
83+
# License
84+
DNACalibration is released with [licence](LICENSE).

0 commit comments

Comments
 (0)