generate new documentation
This commit is contained in:
parent
a4be6057a0
commit
16fd35d055
@ -129,9 +129,47 @@ Several Python examples are provided for reference and can be found in the **exa
|
||||
Note: Examples are grouped in three groups: DNA, DNACalib, and DNAViewer. These names are embedded as prefixes: dna_, dnacalib_, and dna_viewer_.
|
||||
|
||||
## Example DNA files
|
||||
[Two demo DNA files](https://github.com/EpicGames/MetaHuman-DNA-Calibration/tree/main/data/dna) are provided for easier testing of this tool. Any DNA generated with [MetaHumanCreator](https://www.unrealengine.com/en-US/metahuman)
|
||||
[Two demo DNA files](https://github.com/EpicGames/MetaHuman-DNA-Calibration/tree/main/data/dna_files) are provided for easier testing of this tool. Any DNA generated with [MetaHumanCreator](https://www.unrealengine.com/en-US/metahuman)
|
||||
should work.
|
||||
|
||||
The MHC 2023 spring release introduced changes to the rig definition (number of joints increased as well as the number of expressions).
|
||||
In order to accommodate those changes, we added several files to the repository in `/data/mh4` folder: new [gui scene](/data/mh4/gui.ma), updated [assemble script](/data/mh4/additional_assemble_script.py) and example of Ada’s [DNA file](https://github.com/EpicGames/MetaHuman-DNA-Calibration/tree/main/data/mh4/dna_files/Ada.dna).
|
||||
If a user wants to switch and use this new rig version it is necessary to update paths in their scripts:
|
||||
```python
|
||||
GUI = f"{DATA_DIR}/mh4/gui.ma"
|
||||
ADDITIONAL_ASSEMBLE_SCRIPT = f"{DATA_DIR}/mh4/additional_assemble_script.py"
|
||||
```
|
||||
|
||||
In case character DNA is downloaded from [Quixel Bridge](https://quixel.com/bridge) and we are not sure which rig definition is used, it can be checked with following code:
|
||||
```python
|
||||
from dna import (
|
||||
BinaryStreamReader,
|
||||
DataLayer_All,
|
||||
FileStream,
|
||||
Status,
|
||||
)
|
||||
|
||||
def load_dna_reader(dna_file):
|
||||
stream = FileStream(
|
||||
dna_file, FileStream.AccessMode_Read, FileStream.OpenMode_Binary
|
||||
)
|
||||
reader = BinaryStreamReader(stream, DataLayer_All)
|
||||
reader.read()
|
||||
if not Status.isOk():
|
||||
status = Status.get()
|
||||
raise RuntimeError(f"Error loading DNA: {status.message}")
|
||||
return reader
|
||||
|
||||
character_dna = "path_to/character.dna"
|
||||
reader = load_dna_reader(character_dna)
|
||||
if reader.getDBName() == "MH.4":
|
||||
print("Use mh4 folder")
|
||||
elif reader.getDBName() == "DHI":
|
||||
print("Use data folder")
|
||||
else:
|
||||
print("Unsupported rig definition!")
|
||||
```
|
||||
|
||||
# Notes
|
||||
If a user runs examples in Maya 2022, the value for `ROOT_DIR` should be changed and absolute paths must be used,
|
||||
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.
|
||||
|
@ -129,9 +129,47 @@ Several Python examples are provided for reference and can be found in the **exa
|
||||
Note: Examples are grouped in three groups: DNA, DNACalib, and DNAViewer. These names are embedded as prefixes: dna_, dnacalib_, and dna_viewer_.
|
||||
|
||||
## Example DNA files
|
||||
[Two demo DNA files](https://github.com/EpicGames/MetaHuman-DNA-Calibration/tree/main/data/dna) are provided for easier testing of this tool. Any DNA generated with [MetaHumanCreator](https://www.unrealengine.com/en-US/metahuman)
|
||||
[Two demo DNA files](https://github.com/EpicGames/MetaHuman-DNA-Calibration/tree/main/data/dna_files) are provided for easier testing of this tool. Any DNA generated with [MetaHumanCreator](https://www.unrealengine.com/en-US/metahuman)
|
||||
should work.
|
||||
|
||||
The MHC 2023 spring release introduced changes to the rig definition (number of joints increased as well as the number of expressions).
|
||||
In order to accommodate those changes, we added several files to the repository in `/data/mh4` folder: new [gui scene](/data/mh4/gui.ma), updated [assemble script](/data/mh4/additional_assemble_script.py) and example of Ada’s [DNA file](https://github.com/EpicGames/MetaHuman-DNA-Calibration/tree/main/data/mh4/dna_files/Ada.dna).
|
||||
If a user wants to switch and use this new rig version it is necessary to update paths in their scripts:
|
||||
```python
|
||||
GUI = f"{DATA_DIR}/mh4/gui.ma"
|
||||
ADDITIONAL_ASSEMBLE_SCRIPT = f"{DATA_DIR}/mh4/additional_assemble_script.py"
|
||||
```
|
||||
|
||||
In case character DNA is downloaded from [Quixel Bridge](https://quixel.com/bridge) and we are not sure which rig definition is used, it can be checked with following code:
|
||||
```python
|
||||
from dna import (
|
||||
BinaryStreamReader,
|
||||
DataLayer_All,
|
||||
FileStream,
|
||||
Status,
|
||||
)
|
||||
|
||||
def load_dna_reader(dna_file):
|
||||
stream = FileStream(
|
||||
dna_file, FileStream.AccessMode_Read, FileStream.OpenMode_Binary
|
||||
)
|
||||
reader = BinaryStreamReader(stream, DataLayer_All)
|
||||
reader.read()
|
||||
if not Status.isOk():
|
||||
status = Status.get()
|
||||
raise RuntimeError(f"Error loading DNA: {status.message}")
|
||||
return reader
|
||||
|
||||
character_dna = "path_to/character.dna"
|
||||
reader = load_dna_reader(character_dna)
|
||||
if reader.getDBName() == "MH.4":
|
||||
print("Use mh4 folder")
|
||||
elif reader.getDBName() == "DHI":
|
||||
print("Use data folder")
|
||||
else:
|
||||
print("Unsupported rig definition!")
|
||||
```
|
||||
|
||||
# Notes
|
||||
If a user runs examples in Maya 2022, the value for `ROOT_DIR` should be changed and absolute paths must be used,
|
||||
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.
|
||||
|
@ -241,8 +241,44 @@ If running on Linux, please make sure to append the LD_LIBRARY_PATH with absolut
|
||||
<p>Note: Examples are grouped in three groups: DNA, DNACalib, and DNAViewer. These names are embedded as prefixes: dna_, dnacalib_, and dna_viewer_.</p>
|
||||
<section id="example-dna-files">
|
||||
<h2>Example DNA files<a class="headerlink" href="#example-dna-files" title="Permalink to this headline"></a></h2>
|
||||
<p><a class="reference external" href="https://github.com/EpicGames/MetaHuman-DNA-Calibration/tree/main/data/dna">Two demo DNA files</a> are provided for easier testing of this tool. Any DNA generated with <a class="reference external" href="https://www.unrealengine.com/en-US/metahuman">MetaHumanCreator</a>
|
||||
<p><a class="reference external" href="https://github.com/EpicGames/MetaHuman-DNA-Calibration/tree/main/data/dna_files">Two demo DNA files</a> are provided for easier testing of this tool. Any DNA generated with <a class="reference external" href="https://www.unrealengine.com/en-US/metahuman">MetaHumanCreator</a>
|
||||
should work.</p>
|
||||
<p>The MHC 2023 spring release introduced changes to the rig definition (number of joints increased as well as the number of expressions).
|
||||
In order to accommodate those changes, we added several files to the repository in <code class="docutils literal notranslate"><span class="pre">/data/mh4</span></code> folder: new <span class="xref myst">gui scene</span>, updated <span class="xref myst">assemble script</span> and example of Ada’s <a class="reference external" href="https://github.com/EpicGames/MetaHuman-DNA-Calibration/tree/main/data/mh4/dna_files/Ada.dna">DNA file</a>.
|
||||
If a user wants to switch and use this new rig version it is necessary to update paths in their scripts:</p>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">GUI</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">DATA_DIR</span><span class="si">}</span><span class="s2">/mh4/gui.ma"</span>
|
||||
<span class="n">ADDITIONAL_ASSEMBLE_SCRIPT</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">DATA_DIR</span><span class="si">}</span><span class="s2">/mh4/additional_assemble_script.py"</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>In case character DNA is downloaded from <a class="reference external" href="https://quixel.com/bridge">Quixel Bridge</a> and we are not sure which rig definition is used, it can be checked with following code:</p>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">dna</span> <span class="kn">import</span> <span class="p">(</span>
|
||||
<span class="n">BinaryStreamReader</span><span class="p">,</span>
|
||||
<span class="n">DataLayer_All</span><span class="p">,</span>
|
||||
<span class="n">FileStream</span><span class="p">,</span>
|
||||
<span class="n">Status</span><span class="p">,</span>
|
||||
<span class="p">)</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">load_dna_reader</span><span class="p">(</span><span class="n">dna_file</span><span class="p">):</span>
|
||||
<span class="n">stream</span> <span class="o">=</span> <span class="n">FileStream</span><span class="p">(</span>
|
||||
<span class="n">dna_file</span><span class="p">,</span> <span class="n">FileStream</span><span class="o">.</span><span class="n">AccessMode_Read</span><span class="p">,</span> <span class="n">FileStream</span><span class="o">.</span><span class="n">OpenMode_Binary</span>
|
||||
<span class="p">)</span>
|
||||
<span class="n">reader</span> <span class="o">=</span> <span class="n">BinaryStreamReader</span><span class="p">(</span><span class="n">stream</span><span class="p">,</span> <span class="n">DataLayer_All</span><span class="p">)</span>
|
||||
<span class="n">reader</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="n">Status</span><span class="o">.</span><span class="n">isOk</span><span class="p">():</span>
|
||||
<span class="n">status</span> <span class="o">=</span> <span class="n">Status</span><span class="o">.</span><span class="n">get</span><span class="p">()</span>
|
||||
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Error loading DNA: </span><span class="si">{</span><span class="n">status</span><span class="o">.</span><span class="n">message</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="n">reader</span>
|
||||
|
||||
<span class="n">character_dna</span> <span class="o">=</span> <span class="s2">"path_to/character.dna"</span>
|
||||
<span class="n">reader</span> <span class="o">=</span> <span class="n">load_dna_reader</span><span class="p">(</span><span class="n">character_dna</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="n">reader</span><span class="o">.</span><span class="n">getDBName</span><span class="p">()</span> <span class="o">==</span> <span class="s2">"MH.4"</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s2">"Use mh4 folder"</span><span class="p">)</span>
|
||||
<span class="k">elif</span> <span class="n">reader</span><span class="o">.</span><span class="n">getDBName</span><span class="p">()</span> <span class="o">==</span> <span class="s2">"DHI"</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s2">"Use data folder"</span><span class="p">)</span>
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s2">"Unsupported rig definition!"</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section id="notes">
|
||||
|
@ -253,8 +253,44 @@ If running on Linux, please make sure to append the LD_LIBRARY_PATH with absolut
|
||||
<p>Note: Examples are grouped in three groups: DNA, DNACalib, and DNAViewer. These names are embedded as prefixes: dna_, dnacalib_, and dna_viewer_.</p>
|
||||
<section id="example-dna-files">
|
||||
<h2>Example DNA files<a class="headerlink" href="#example-dna-files" title="Permalink to this headline"></a></h2>
|
||||
<p><a class="reference external" href="https://github.com/EpicGames/MetaHuman-DNA-Calibration/tree/main/data/dna">Two demo DNA files</a> are provided for easier testing of this tool. Any DNA generated with <a class="reference external" href="https://www.unrealengine.com/en-US/metahuman">MetaHumanCreator</a>
|
||||
<p><a class="reference external" href="https://github.com/EpicGames/MetaHuman-DNA-Calibration/tree/main/data/dna_files">Two demo DNA files</a> are provided for easier testing of this tool. Any DNA generated with <a class="reference external" href="https://www.unrealengine.com/en-US/metahuman">MetaHumanCreator</a>
|
||||
should work.</p>
|
||||
<p>The MHC 2023 spring release introduced changes to the rig definition (number of joints increased as well as the number of expressions).
|
||||
In order to accommodate those changes, we added several files to the repository in <code class="docutils literal notranslate"><span class="pre">/data/mh4</span></code> folder: new <span class="xref myst">gui scene</span>, updated <span class="xref myst">assemble script</span> and example of Ada’s <a class="reference external" href="https://github.com/EpicGames/MetaHuman-DNA-Calibration/tree/main/data/mh4/dna_files/Ada.dna">DNA file</a>.
|
||||
If a user wants to switch and use this new rig version it is necessary to update paths in their scripts:</p>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">GUI</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">DATA_DIR</span><span class="si">}</span><span class="s2">/mh4/gui.ma"</span>
|
||||
<span class="n">ADDITIONAL_ASSEMBLE_SCRIPT</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">DATA_DIR</span><span class="si">}</span><span class="s2">/mh4/additional_assemble_script.py"</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>In case character DNA is downloaded from <a class="reference external" href="https://quixel.com/bridge">Quixel Bridge</a> and we are not sure which rig definition is used, it can be checked with following code:</p>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">dna</span> <span class="kn">import</span> <span class="p">(</span>
|
||||
<span class="n">BinaryStreamReader</span><span class="p">,</span>
|
||||
<span class="n">DataLayer_All</span><span class="p">,</span>
|
||||
<span class="n">FileStream</span><span class="p">,</span>
|
||||
<span class="n">Status</span><span class="p">,</span>
|
||||
<span class="p">)</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">load_dna_reader</span><span class="p">(</span><span class="n">dna_file</span><span class="p">):</span>
|
||||
<span class="n">stream</span> <span class="o">=</span> <span class="n">FileStream</span><span class="p">(</span>
|
||||
<span class="n">dna_file</span><span class="p">,</span> <span class="n">FileStream</span><span class="o">.</span><span class="n">AccessMode_Read</span><span class="p">,</span> <span class="n">FileStream</span><span class="o">.</span><span class="n">OpenMode_Binary</span>
|
||||
<span class="p">)</span>
|
||||
<span class="n">reader</span> <span class="o">=</span> <span class="n">BinaryStreamReader</span><span class="p">(</span><span class="n">stream</span><span class="p">,</span> <span class="n">DataLayer_All</span><span class="p">)</span>
|
||||
<span class="n">reader</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="n">Status</span><span class="o">.</span><span class="n">isOk</span><span class="p">():</span>
|
||||
<span class="n">status</span> <span class="o">=</span> <span class="n">Status</span><span class="o">.</span><span class="n">get</span><span class="p">()</span>
|
||||
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Error loading DNA: </span><span class="si">{</span><span class="n">status</span><span class="o">.</span><span class="n">message</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="n">reader</span>
|
||||
|
||||
<span class="n">character_dna</span> <span class="o">=</span> <span class="s2">"path_to/character.dna"</span>
|
||||
<span class="n">reader</span> <span class="o">=</span> <span class="n">load_dna_reader</span><span class="p">(</span><span class="n">character_dna</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="n">reader</span><span class="o">.</span><span class="n">getDBName</span><span class="p">()</span> <span class="o">==</span> <span class="s2">"MH.4"</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s2">"Use mh4 folder"</span><span class="p">)</span>
|
||||
<span class="k">elif</span> <span class="n">reader</span><span class="o">.</span><span class="n">getDBName</span><span class="p">()</span> <span class="o">==</span> <span class="s2">"DHI"</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s2">"Use data folder"</span><span class="p">)</span>
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s2">"Unsupported rig definition!"</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section id="notes">
|
||||
|
@ -159,6 +159,8 @@ sudo ln -s ~/MetaHuman-DNA-Calibration/lib/Maya2022/linux/libdnacalib.so /usr/li
|
||||
sudo ln -s ~/MetaHuman-DNA-Calibration/lib/Maya2022/linux/libdnacalib.so.6 /usr/lib/libdnacalib.so.6
|
||||
|
||||
sudo ln -s ~/MetaHuman-DNA-Calibration/lib/Maya2022/linux/libembeddedRL4.so /usr/lib/embeddedRL4.mll
|
||||
|
||||
sudo ln -s ~/MetaHuman-DNA-Calibration/lib/Maya2022/linux/MayaUERBFPlugin.mll /usr/lib/MayaUERBFPlugin.mll
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Note: Change the path <code class="docutils literal notranslate"><span class="pre">~/MetaHuman-DNA-Calibration</span></code> to where <code class="docutils literal notranslate"><span class="pre">MetaHuman-DNA-Calibration</span></code> is located.</p>
|
||||
@ -184,6 +186,9 @@ Maya scene assemble.
|
||||
Furthermore, <a class="reference external" href="https://github.com/EpicGames/MetaHuman-DNA-Calibration/tree/main/data/additional_assemble_script.py"><code class="docutils literal notranslate"><span class="pre">additional_assemble_script.py</span></code></a> is used to organize objects in scene and
|
||||
connect controls. The ideal setup looks like this:</p>
|
||||
<p><img alt="image" src="_images/aas.png" /></p>
|
||||
<p>The MHC 2023 spring release introduced changes to the rig definition (number of joints increased as well as the number of expressions).
|
||||
In order to accommodate those changes, we added several files to the repository in <code class="docutils literal notranslate"><span class="pre">/data/mh4</span></code> folder: new <a class="reference external" href="https://github.com/EpicGames/MetaHuman-DNA-Calibration/tree/main/data/mh4/gui.ma">gui scene</a>, updated <a class="reference external" href="https://github.com/EpicGames/MetaHuman-DNA-Calibration/tree/main/data/mh4/additional_assemble_script.py">assemble script</a> and example of Ada’s <a class="reference external" href="https://github.com/EpicGames/MetaHuman-DNA-Calibration/tree/main/data/mh4/dna_files/Ada.dna">DNA file</a>.
|
||||
Furthermore, in lib folder we added Maya RBF plugin which is used for controlling neck expressions. Neck setup has recently been improved and adding RBF plugin as well as new gui scene to use it, we get better neck deformations.</p>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
@ -41,6 +41,7 @@ sudo ln -s ~/MetaHuman-DNA-Calibration/lib/Maya2022/linux/libdnacalib.so.6 /usr/
|
||||
|
||||
sudo ln -s ~/MetaHuman-DNA-Calibration/lib/Maya2022/linux/libembeddedRL4.so /usr/lib/embeddedRL4.mll
|
||||
|
||||
sudo ln -s ~/MetaHuman-DNA-Calibration/lib/Maya2022/linux/MayaUERBFPlugin.mll /usr/lib/MayaUERBFPlugin.mll
|
||||
```
|
||||
|
||||
Note: Change the path `~/MetaHuman-DNA-Calibration` to where `MetaHuman-DNA-Calibration` is located.
|
||||
@ -59,3 +60,7 @@ Furthermore, [`additional_assemble_script.py`](https://github.com/EpicGames/Meta
|
||||
connect controls. The ideal setup looks like this:
|
||||
|
||||

|
||||
|
||||
The MHC 2023 spring release introduced changes to the rig definition (number of joints increased as well as the number of expressions).
|
||||
In order to accommodate those changes, we added several files to the repository in `/data/mh4` folder: new [gui scene](https://github.com/EpicGames/MetaHuman-DNA-Calibration/tree/main/data/mh4/gui.ma), updated [assemble script](https://github.com/EpicGames/MetaHuman-DNA-Calibration/tree/main/data/mh4/additional_assemble_script.py) and example of Ada’s [DNA file](https://github.com/EpicGames/MetaHuman-DNA-Calibration/tree/main/data/mh4/dna_files/Ada.dna).
|
||||
Furthermore, in lib folder we added Maya RBF plugin which is used for controlling neck expressions. Neck setup has recently been improved and adding RBF plugin as well as new gui scene to use it, we get better neck deformations.
|
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -241,8 +241,44 @@ If running on Linux, please make sure to append the LD_LIBRARY_PATH with absolut
|
||||
<p>Note: Examples are grouped in three groups: DNA, DNACalib, and DNAViewer. These names are embedded as prefixes: dna_, dnacalib_, and dna_viewer_.</p>
|
||||
<section id="example-dna-files">
|
||||
<h2>Example DNA files<a class="headerlink" href="#example-dna-files" title="Permalink to this headline"></a></h2>
|
||||
<p><a class="reference external" href="https://github.com/EpicGames/MetaHuman-DNA-Calibration/tree/main/data/dna">Two demo DNA files</a> are provided for easier testing of this tool. Any DNA generated with <a class="reference external" href="https://www.unrealengine.com/en-US/metahuman">MetaHumanCreator</a>
|
||||
<p><a class="reference external" href="https://github.com/EpicGames/MetaHuman-DNA-Calibration/tree/main/data/dna_files">Two demo DNA files</a> are provided for easier testing of this tool. Any DNA generated with <a class="reference external" href="https://www.unrealengine.com/en-US/metahuman">MetaHumanCreator</a>
|
||||
should work.</p>
|
||||
<p>The MHC 2023 spring release introduced changes to the rig definition (number of joints increased as well as the number of expressions).
|
||||
In order to accommodate those changes, we added several files to the repository in <code class="docutils literal notranslate"><span class="pre">/data/mh4</span></code> folder: new <span class="xref myst">gui scene</span>, updated <span class="xref myst">assemble script</span> and example of Ada’s <a class="reference external" href="https://github.com/EpicGames/MetaHuman-DNA-Calibration/tree/main/data/mh4/dna_files/Ada.dna">DNA file</a>.
|
||||
If a user wants to switch and use this new rig version it is necessary to update paths in their scripts:</p>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">GUI</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">DATA_DIR</span><span class="si">}</span><span class="s2">/mh4/gui.ma"</span>
|
||||
<span class="n">ADDITIONAL_ASSEMBLE_SCRIPT</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">DATA_DIR</span><span class="si">}</span><span class="s2">/mh4/additional_assemble_script.py"</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>In case character DNA is downloaded from <a class="reference external" href="https://quixel.com/bridge">Quixel Bridge</a> and we are not sure which rig definition is used, it can be checked with following code:</p>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">dna</span> <span class="kn">import</span> <span class="p">(</span>
|
||||
<span class="n">BinaryStreamReader</span><span class="p">,</span>
|
||||
<span class="n">DataLayer_All</span><span class="p">,</span>
|
||||
<span class="n">FileStream</span><span class="p">,</span>
|
||||
<span class="n">Status</span><span class="p">,</span>
|
||||
<span class="p">)</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">load_dna_reader</span><span class="p">(</span><span class="n">dna_file</span><span class="p">):</span>
|
||||
<span class="n">stream</span> <span class="o">=</span> <span class="n">FileStream</span><span class="p">(</span>
|
||||
<span class="n">dna_file</span><span class="p">,</span> <span class="n">FileStream</span><span class="o">.</span><span class="n">AccessMode_Read</span><span class="p">,</span> <span class="n">FileStream</span><span class="o">.</span><span class="n">OpenMode_Binary</span>
|
||||
<span class="p">)</span>
|
||||
<span class="n">reader</span> <span class="o">=</span> <span class="n">BinaryStreamReader</span><span class="p">(</span><span class="n">stream</span><span class="p">,</span> <span class="n">DataLayer_All</span><span class="p">)</span>
|
||||
<span class="n">reader</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="n">Status</span><span class="o">.</span><span class="n">isOk</span><span class="p">():</span>
|
||||
<span class="n">status</span> <span class="o">=</span> <span class="n">Status</span><span class="o">.</span><span class="n">get</span><span class="p">()</span>
|
||||
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Error loading DNA: </span><span class="si">{</span><span class="n">status</span><span class="o">.</span><span class="n">message</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="n">reader</span>
|
||||
|
||||
<span class="n">character_dna</span> <span class="o">=</span> <span class="s2">"path_to/character.dna"</span>
|
||||
<span class="n">reader</span> <span class="o">=</span> <span class="n">load_dna_reader</span><span class="p">(</span><span class="n">character_dna</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="n">reader</span><span class="o">.</span><span class="n">getDBName</span><span class="p">()</span> <span class="o">==</span> <span class="s2">"MH.4"</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s2">"Use mh4 folder"</span><span class="p">)</span>
|
||||
<span class="k">elif</span> <span class="n">reader</span><span class="o">.</span><span class="n">getDBName</span><span class="p">()</span> <span class="o">==</span> <span class="s2">"DHI"</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s2">"Use data folder"</span><span class="p">)</span>
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s2">"Unsupported rig definition!"</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section id="notes">
|
||||
|
@ -253,8 +253,44 @@ If running on Linux, please make sure to append the LD_LIBRARY_PATH with absolut
|
||||
<p>Note: Examples are grouped in three groups: DNA, DNACalib, and DNAViewer. These names are embedded as prefixes: dna_, dnacalib_, and dna_viewer_.</p>
|
||||
<section id="example-dna-files">
|
||||
<h2>Example DNA files<a class="headerlink" href="#example-dna-files" title="Permalink to this headline"></a></h2>
|
||||
<p><a class="reference external" href="https://github.com/EpicGames/MetaHuman-DNA-Calibration/tree/main/data/dna">Two demo DNA files</a> are provided for easier testing of this tool. Any DNA generated with <a class="reference external" href="https://www.unrealengine.com/en-US/metahuman">MetaHumanCreator</a>
|
||||
<p><a class="reference external" href="https://github.com/EpicGames/MetaHuman-DNA-Calibration/tree/main/data/dna_files">Two demo DNA files</a> are provided for easier testing of this tool. Any DNA generated with <a class="reference external" href="https://www.unrealengine.com/en-US/metahuman">MetaHumanCreator</a>
|
||||
should work.</p>
|
||||
<p>The MHC 2023 spring release introduced changes to the rig definition (number of joints increased as well as the number of expressions).
|
||||
In order to accommodate those changes, we added several files to the repository in <code class="docutils literal notranslate"><span class="pre">/data/mh4</span></code> folder: new <span class="xref myst">gui scene</span>, updated <span class="xref myst">assemble script</span> and example of Ada’s <a class="reference external" href="https://github.com/EpicGames/MetaHuman-DNA-Calibration/tree/main/data/mh4/dna_files/Ada.dna">DNA file</a>.
|
||||
If a user wants to switch and use this new rig version it is necessary to update paths in their scripts:</p>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="n">GUI</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">DATA_DIR</span><span class="si">}</span><span class="s2">/mh4/gui.ma"</span>
|
||||
<span class="n">ADDITIONAL_ASSEMBLE_SCRIPT</span> <span class="o">=</span> <span class="sa">f</span><span class="s2">"</span><span class="si">{</span><span class="n">DATA_DIR</span><span class="si">}</span><span class="s2">/mh4/additional_assemble_script.py"</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>In case character DNA is downloaded from <a class="reference external" href="https://quixel.com/bridge">Quixel Bridge</a> and we are not sure which rig definition is used, it can be checked with following code:</p>
|
||||
<div class="highlight-python notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">dna</span> <span class="kn">import</span> <span class="p">(</span>
|
||||
<span class="n">BinaryStreamReader</span><span class="p">,</span>
|
||||
<span class="n">DataLayer_All</span><span class="p">,</span>
|
||||
<span class="n">FileStream</span><span class="p">,</span>
|
||||
<span class="n">Status</span><span class="p">,</span>
|
||||
<span class="p">)</span>
|
||||
|
||||
<span class="k">def</span> <span class="nf">load_dna_reader</span><span class="p">(</span><span class="n">dna_file</span><span class="p">):</span>
|
||||
<span class="n">stream</span> <span class="o">=</span> <span class="n">FileStream</span><span class="p">(</span>
|
||||
<span class="n">dna_file</span><span class="p">,</span> <span class="n">FileStream</span><span class="o">.</span><span class="n">AccessMode_Read</span><span class="p">,</span> <span class="n">FileStream</span><span class="o">.</span><span class="n">OpenMode_Binary</span>
|
||||
<span class="p">)</span>
|
||||
<span class="n">reader</span> <span class="o">=</span> <span class="n">BinaryStreamReader</span><span class="p">(</span><span class="n">stream</span><span class="p">,</span> <span class="n">DataLayer_All</span><span class="p">)</span>
|
||||
<span class="n">reader</span><span class="o">.</span><span class="n">read</span><span class="p">()</span>
|
||||
<span class="k">if</span> <span class="ow">not</span> <span class="n">Status</span><span class="o">.</span><span class="n">isOk</span><span class="p">():</span>
|
||||
<span class="n">status</span> <span class="o">=</span> <span class="n">Status</span><span class="o">.</span><span class="n">get</span><span class="p">()</span>
|
||||
<span class="k">raise</span> <span class="ne">RuntimeError</span><span class="p">(</span><span class="sa">f</span><span class="s2">"Error loading DNA: </span><span class="si">{</span><span class="n">status</span><span class="o">.</span><span class="n">message</span><span class="si">}</span><span class="s2">"</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="n">reader</span>
|
||||
|
||||
<span class="n">character_dna</span> <span class="o">=</span> <span class="s2">"path_to/character.dna"</span>
|
||||
<span class="n">reader</span> <span class="o">=</span> <span class="n">load_dna_reader</span><span class="p">(</span><span class="n">character_dna</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="n">reader</span><span class="o">.</span><span class="n">getDBName</span><span class="p">()</span> <span class="o">==</span> <span class="s2">"MH.4"</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s2">"Use mh4 folder"</span><span class="p">)</span>
|
||||
<span class="k">elif</span> <span class="n">reader</span><span class="o">.</span><span class="n">getDBName</span><span class="p">()</span> <span class="o">==</span> <span class="s2">"DHI"</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s2">"Use data folder"</span><span class="p">)</span>
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="nb">print</span><span class="p">(</span><span class="s2">"Unsupported rig definition!"</span><span class="p">)</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
<section id="notes">
|
||||
|
@ -159,6 +159,8 @@ sudo ln -s ~/MetaHuman-DNA-Calibration/lib/Maya2022/linux/libdnacalib.so /usr/li
|
||||
sudo ln -s ~/MetaHuman-DNA-Calibration/lib/Maya2022/linux/libdnacalib.so.6 /usr/lib/libdnacalib.so.6
|
||||
|
||||
sudo ln -s ~/MetaHuman-DNA-Calibration/lib/Maya2022/linux/libembeddedRL4.so /usr/lib/embeddedRL4.mll
|
||||
|
||||
sudo ln -s ~/MetaHuman-DNA-Calibration/lib/Maya2022/linux/MayaUERBFPlugin.mll /usr/lib/MayaUERBFPlugin.mll
|
||||
</pre></div>
|
||||
</div>
|
||||
<p>Note: Change the path <code class="docutils literal notranslate"><span class="pre">~/MetaHuman-DNA-Calibration</span></code> to where <code class="docutils literal notranslate"><span class="pre">MetaHuman-DNA-Calibration</span></code> is located.</p>
|
||||
@ -184,6 +186,9 @@ Maya scene assemble.
|
||||
Furthermore, <a class="reference external" href="https://github.com/EpicGames/MetaHuman-DNA-Calibration/tree/main/data/additional_assemble_script.py"><code class="docutils literal notranslate"><span class="pre">additional_assemble_script.py</span></code></a> is used to organize objects in scene and
|
||||
connect controls. The ideal setup looks like this:</p>
|
||||
<p><img alt="image" src="_images/aas.png" /></p>
|
||||
<p>The MHC 2023 spring release introduced changes to the rig definition (number of joints increased as well as the number of expressions).
|
||||
In order to accommodate those changes, we added several files to the repository in <code class="docutils literal notranslate"><span class="pre">/data/mh4</span></code> folder: new <a class="reference external" href="https://github.com/EpicGames/MetaHuman-DNA-Calibration/tree/main/data/mh4/gui.ma">gui scene</a>, updated <a class="reference external" href="https://github.com/EpicGames/MetaHuman-DNA-Calibration/tree/main/data/mh4/additional_assemble_script.py">assemble script</a> and example of Ada’s <a class="reference external" href="https://github.com/EpicGames/MetaHuman-DNA-Calibration/tree/main/data/mh4/dna_files/Ada.dna">DNA file</a>.
|
||||
Furthermore, in lib folder we added Maya RBF plugin which is used for controlling neck expressions. Neck setup has recently been improved and adding RBF plugin as well as new gui scene to use it, we get better neck deformations.</p>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user