Compare commits
9 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
a48b933abe | ||
|
20bb3c545e | ||
|
6c46445fb0 | ||
|
9839c8fab7 | ||
|
47a3a045e0 | ||
|
401ea78fc9 | ||
|
c0a894d421 | ||
|
106a9f4942 | ||
|
30aec072ff |
30
CHANGELOG.md
@ -2,6 +2,36 @@
|
||||
|
||||
All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/).
|
||||
|
||||
## [1.3.1] - 2024-12-20
|
||||
|
||||
### Added
|
||||
- example script to assemble face rig in Maya with textures `dna_viewer_build_rig_with_textures.py`
|
||||
- added support for Maya 2024 in dna_calibration.mod file
|
||||
|
||||
## [1.3.0] - 2024-08-15
|
||||
|
||||
### Added
|
||||
- support for Maya 2024
|
||||
- support for Python 3.10
|
||||
- added source code comments to python wrappers
|
||||
|
||||
### Fixed
|
||||
- `CalculateMeshLowerLODsCommand` was rewritten to address edge cases discovered with eye lashes and to handle some common cases of invalid UV data.
|
||||
- `RotateCommand` to rotate blend shape target deltas as well.
|
||||
- `SetBlendShapeTargetDeltasCommand` to allow setting vertex indices as well.
|
||||
- Swig generated classes are now wrapped instead of being monkey-patched to invoke constructors and destructors (which allows building with newer Swig versions - 4.0.x and 4.1.x).
|
||||
|
||||
### Changed
|
||||
- CMake files to add test cases that execute the example scripts and allow generating bundled archives with CPack.
|
||||
- Binaries for embeddedRL4 plugin to be .so files.
|
||||
|
||||
|
||||
## [1.2.0] - 2023-06-30
|
||||
|
||||
### Added
|
||||
- assets (gui.ma, Ada.dna, additional_assemble_script.py) which support MHC 2.x.x releases (UE 5.2 and 5.3)
|
||||
|
||||
|
||||
## [1.1.0] - 2023-04-20
|
||||
|
||||
### Added
|
||||
|
43
README.md
@ -125,15 +125,54 @@ Several Python examples are provided for reference and can be found in the **exa
|
||||
- [Generates rig](/examples/dna_viewer_build_rig.py)
|
||||
- [Export FBX per LOD](/examples/dna_viewer_export_fbx.py)
|
||||
- [Propagating changes from Maya scene to dna](/examples/dna_viewer_grab_changes_from_scene_and_propagate_to_dna.py)
|
||||
- [Generate face rig with textures](/examples/dna_viewer_build_rig_with_textures.py)
|
||||
|
||||
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](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](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](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,
|
||||
If a user runs examples in Maya, 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.
|
||||
|
||||
See the [FAQ guide](docs/faq.md) for additional specifications.
|
||||
|
BIN
UnrealFest.zip
Normal file
526
data/lights.ma
Normal file
@ -0,0 +1,526 @@
|
||||
//Maya ASCII 2018ff09 scene
|
||||
//Name: dh_lights.ma
|
||||
//Last modified: Thu, May 11, 2023 11:07:06 AM
|
||||
//Codeset: 1252
|
||||
requires maya "2018ff09";
|
||||
requires "stereoCamera" "10.0";
|
||||
currentUnit -l centimeter -a degree -t film;
|
||||
fileInfo "application" "maya";
|
||||
fileInfo "product" "Maya 2018";
|
||||
fileInfo "version" "2018";
|
||||
fileInfo "cutIdentifier" "201903222215-65bada0e52";
|
||||
fileInfo "osv" "Microsoft Windows 8 Enterprise Edition, 64-bit (Build 9200)\n";
|
||||
createNode transform -s -n "persp";
|
||||
rename -uid "7BE03783-4E24-89B6-5989-A493C66637E0";
|
||||
setAttr ".v" no;
|
||||
setAttr ".t" -type "double3" 30.386393925746596 164.46424883057017 220.93384230676068 ;
|
||||
setAttr ".r" -type "double3" -4.5383527322844488 364.60000000001168 2.4928380793358483e-17 ;
|
||||
createNode camera -s -n "perspShape" -p "persp";
|
||||
rename -uid "17C4DE2D-4474-6D71-CB6F-6A8339904880";
|
||||
setAttr -k off ".v" no;
|
||||
setAttr ".fl" 70;
|
||||
setAttr ".coi" 235.22766075984245;
|
||||
setAttr ".imn" -type "string" "persp";
|
||||
setAttr ".den" -type "string" "persp_depth";
|
||||
setAttr ".man" -type "string" "persp_mask";
|
||||
setAttr ".tp" -type "double3" 5.2474091943811381 153.18041361778683 22.081981913115726 ;
|
||||
setAttr ".hc" -type "string" "viewSet -p %camera";
|
||||
createNode transform -s -n "top";
|
||||
rename -uid "31146484-4292-2309-297F-65BEAF59D272";
|
||||
setAttr ".v" no;
|
||||
setAttr ".t" -type "double3" 0 100.1 0 ;
|
||||
setAttr ".r" -type "double3" -89.999999999999986 0 0 ;
|
||||
createNode camera -s -n "topShape" -p "top";
|
||||
rename -uid "57F36015-479F-8693-E5D7-258FDB082AAA";
|
||||
setAttr -k off ".v" no;
|
||||
setAttr ".rnd" no;
|
||||
setAttr ".coi" 100.1;
|
||||
setAttr ".ow" 30;
|
||||
setAttr ".imn" -type "string" "top";
|
||||
setAttr ".den" -type "string" "top_depth";
|
||||
setAttr ".man" -type "string" "top_mask";
|
||||
setAttr ".hc" -type "string" "viewSet -t %camera";
|
||||
setAttr ".o" yes;
|
||||
createNode transform -s -n "front";
|
||||
rename -uid "D49E1F9F-45C5-21B5-FBA0-1489D48D157A";
|
||||
setAttr ".v" no;
|
||||
setAttr ".t" -type "double3" 0 0 100.1 ;
|
||||
createNode camera -s -n "frontShape" -p "front";
|
||||
rename -uid "C0399F30-4794-526C-41BE-12864024BA2D";
|
||||
setAttr -k off ".v" no;
|
||||
setAttr ".rnd" no;
|
||||
setAttr ".coi" 100.1;
|
||||
setAttr ".ow" 30;
|
||||
setAttr ".imn" -type "string" "front";
|
||||
setAttr ".den" -type "string" "front_depth";
|
||||
setAttr ".man" -type "string" "front_mask";
|
||||
setAttr ".hc" -type "string" "viewSet -f %camera";
|
||||
setAttr ".o" yes;
|
||||
createNode transform -s -n "side";
|
||||
rename -uid "F8B47EFF-46B3-66B0-A1E0-928C7E024511";
|
||||
setAttr ".v" no;
|
||||
setAttr ".t" -type "double3" 100.1 0 0 ;
|
||||
setAttr ".r" -type "double3" 0 89.999999999999986 0 ;
|
||||
createNode camera -s -n "sideShape" -p "side";
|
||||
rename -uid "1A18B0B0-4597-714D-E72F-DDA863A6711A";
|
||||
setAttr -k off ".v" no;
|
||||
setAttr ".rnd" no;
|
||||
setAttr ".coi" 100.1;
|
||||
setAttr ".ow" 30;
|
||||
setAttr ".imn" -type "string" "side";
|
||||
setAttr ".den" -type "string" "side_depth";
|
||||
setAttr ".man" -type "string" "side_mask";
|
||||
setAttr ".hc" -type "string" "viewSet -s %camera";
|
||||
setAttr ".o" yes;
|
||||
createNode transform -n "Lights";
|
||||
rename -uid "BC495762-4E8D-5F2A-7844-19883889F5F0";
|
||||
setAttr ".t" -type "double3" -9.1321692712715037e-15 0 0 ;
|
||||
createNode transform -n "directionalLight1" -p "Lights";
|
||||
rename -uid "65DA2872-436B-EDD6-1D2D-E6BFF59299BC";
|
||||
setAttr ".t" -type "double3" 15.486014481397302 138.81235271383406 5.2714390949948786 ;
|
||||
setAttr ".r" -type "double3" -116.515 10.116 -98.348000000000013 ;
|
||||
createNode directionalLight -n "directionalLightShape1" -p "directionalLight1";
|
||||
rename -uid "36B42BE7-4800-2440-AF1C-E980D1CC87BF";
|
||||
setAttr -k off ".v";
|
||||
setAttr ".cl" -type "float3" 0.49200001 0.74699998 0.72899997 ;
|
||||
setAttr ".urs" no;
|
||||
setAttr ".dms" yes;
|
||||
setAttr ".dr" 1280;
|
||||
createNode transform -n "directionalLight2" -p "Lights";
|
||||
rename -uid "7323F264-4461-0429-2501-FAB17160A35E";
|
||||
setAttr ".t" -type "double3" 20.940014481397302 138.81235271383406 5.2714390949948786 ;
|
||||
setAttr ".r" -type "double3" 25.053 -21.159 -133.766 ;
|
||||
createNode directionalLight -n "directionalLightShape2" -p "directionalLight2";
|
||||
rename -uid "674147DA-41B9-DF32-387E-81AD128B5F70";
|
||||
setAttr -k off ".v";
|
||||
setAttr ".cl" -type "float3" 0.71764708 0.86666667 0.90196079 ;
|
||||
setAttr ".in" 1.1449999809265137;
|
||||
setAttr ".urs" no;
|
||||
setAttr ".dms" yes;
|
||||
setAttr ".dr" 1280;
|
||||
createNode transform -n "directionalLight3" -p "Lights";
|
||||
rename -uid "FEE50C1F-498A-CA90-4D71-E1BCF3CC7285";
|
||||
setAttr ".t" -type "double3" 18.166014481397301 138.81235271383406 5.2714390949948786 ;
|
||||
setAttr ".r" -type "double3" -136.209 46.468 55.503 ;
|
||||
createNode directionalLight -n "directionalLightShape3" -p "directionalLight3";
|
||||
rename -uid "0FDD36F9-46DC-9CD8-95F3-0584EE829681";
|
||||
setAttr -k off ".v";
|
||||
setAttr ".cl" -type "float3" 0.57647061 0.8509804 0.9137255 ;
|
||||
setAttr ".in" 0.7929999828338623;
|
||||
setAttr ".urs" no;
|
||||
setAttr ".dms" yes;
|
||||
setAttr ".dr" 1280;
|
||||
createNode lightLinker -s -n "lightLinker1";
|
||||
rename -uid "164B5954-4F38-1CA6-4626-8BB06933E9DC";
|
||||
setAttr -s 2 ".lnk";
|
||||
setAttr -s 2 ".slnk";
|
||||
createNode displayLayerManager -n "layerManager";
|
||||
rename -uid "F5E9D64D-4FD6-EEA8-5D5E-6B9518D7E895";
|
||||
createNode displayLayer -n "defaultLayer";
|
||||
rename -uid "F8BF08C2-4846-CFBF-91C2-E580763F662F";
|
||||
createNode renderLayerManager -n "renderLayerManager";
|
||||
rename -uid "7F55B5EA-488C-8D40-BE39-5496C9D71AF3";
|
||||
createNode renderLayer -n "defaultRenderLayer";
|
||||
rename -uid "48CE02BC-4D67-7414-65B5-1089007AFCE7";
|
||||
setAttr ".g" yes;
|
||||
createNode script -n "uiConfigurationScriptNode";
|
||||
rename -uid "8418F3FA-4979-1AF9-5770-6498EFF21B86";
|
||||
setAttr ".b" -type "string" (
|
||||
"// Maya Mel UI Configuration File.\n//\n// This script is machine generated. Edit at your own risk.\n//\n//\n\nglobal string $gMainPane;\nif (`paneLayout -exists $gMainPane`) {\n\n\tglobal int $gUseScenePanelConfig;\n\tint $useSceneConfig = $gUseScenePanelConfig;\n\tint $nodeEditorPanelVisible = stringArrayContains(\"nodeEditorPanel1\", `getPanel -vis`);\n\tint $nodeEditorWorkspaceControlOpen = (`workspaceControl -exists nodeEditorPanel1Window` && `workspaceControl -q -visible nodeEditorPanel1Window`);\n\tint $menusOkayInPanels = `optionVar -q allowMenusInPanels`;\n\tint $nVisPanes = `paneLayout -q -nvp $gMainPane`;\n\tint $nPanes = 0;\n\tstring $editorName;\n\tstring $panelName;\n\tstring $itemFilterName;\n\tstring $panelConfig;\n\n\t//\n\t// get current state of the UI\n\t//\n\tsceneUIReplacement -update $gMainPane;\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"modelPanel\" (localizedPanelLabel(\"Top View\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tmodelPanel -edit -l (localizedPanelLabel(\"Top View\")) -mbv $menusOkayInPanels $panelName;\n"
|
||||
+ "\t\t$editorName = $panelName;\n modelEditor -e \n -docTag \"RADRENDER\" \n -editorChanged \"updateModelPanelBar\" \n -camera \"top\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"smoothShaded\" \n -activeOnly 0\n -ignorePanZoom 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -holdOuts 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 0\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 32768\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n"
|
||||
+ " -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -depthOfFieldPreview 1\n -maxConstantTransparency 1\n -rendererName \"vp2Renderer\" \n -objectFilterShowInHUD 1\n -isFiltered 0\n -colorResolution 256 256 \n -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n -sortTransparent 1\n -controllers 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n"
|
||||
+ " -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -imagePlane 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -particleInstancers 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nParticles 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -pluginShapes 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -motionTrails 1\n -clipGhosts 1\n -greasePencils 1\n -shadows 0\n -captureSequenceNumber -1\n -width 1\n -height 1\n -sceneRenderFilter 0\n $editorName;\n modelEditor -e -viewSelected 0 $editorName;\n modelEditor -e \n -pluginObjects \"gpuCacheDisplayFilter\" 1 \n"
|
||||
+ " $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"modelPanel\" (localizedPanelLabel(\"Side View\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tmodelPanel -edit -l (localizedPanelLabel(\"Side View\")) -mbv $menusOkayInPanels $panelName;\n\t\t$editorName = $panelName;\n modelEditor -e \n -docTag \"RADRENDER\" \n -editorChanged \"updateModelPanelBar\" \n -camera \"side\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"smoothShaded\" \n -activeOnly 0\n -ignorePanZoom 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -holdOuts 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 0\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n"
|
||||
+ " -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 32768\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -depthOfFieldPreview 1\n -maxConstantTransparency 1\n -rendererName \"vp2Renderer\" \n -objectFilterShowInHUD 1\n -isFiltered 0\n -colorResolution 256 256 \n -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n"
|
||||
+ " -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n -sortTransparent 1\n -controllers 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -imagePlane 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -particleInstancers 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nParticles 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -pluginShapes 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n"
|
||||
+ " -motionTrails 1\n -clipGhosts 1\n -greasePencils 1\n -shadows 0\n -captureSequenceNumber -1\n -width 1\n -height 1\n -sceneRenderFilter 0\n $editorName;\n modelEditor -e -viewSelected 0 $editorName;\n modelEditor -e \n -pluginObjects \"gpuCacheDisplayFilter\" 1 \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"modelPanel\" (localizedPanelLabel(\"Front View\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tmodelPanel -edit -l (localizedPanelLabel(\"Front View\")) -mbv $menusOkayInPanels $panelName;\n\t\t$editorName = $panelName;\n modelEditor -e \n -docTag \"RADRENDER\" \n -editorChanged \"updateModelPanelBar\" \n -camera \"front\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"smoothShaded\" \n -activeOnly 0\n"
|
||||
+ " -ignorePanZoom 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -holdOuts 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 0\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 32768\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -depthOfFieldPreview 1\n -maxConstantTransparency 1\n -rendererName \"vp2Renderer\" \n -objectFilterShowInHUD 1\n -isFiltered 0\n -colorResolution 256 256 \n"
|
||||
+ " -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n -sortTransparent 1\n -controllers 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -imagePlane 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -particleInstancers 1\n -fluids 1\n"
|
||||
+ " -hairSystems 1\n -follicles 1\n -nCloths 1\n -nParticles 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -pluginShapes 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -motionTrails 1\n -clipGhosts 1\n -greasePencils 1\n -shadows 0\n -captureSequenceNumber -1\n -width 1\n -height 1\n -sceneRenderFilter 0\n $editorName;\n modelEditor -e -viewSelected 0 $editorName;\n modelEditor -e \n -pluginObjects \"gpuCacheDisplayFilter\" 1 \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"modelPanel\" (localizedPanelLabel(\"Persp View\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tmodelPanel -edit -l (localizedPanelLabel(\"Persp View\")) -mbv $menusOkayInPanels $panelName;\n"
|
||||
+ "\t\t$editorName = $panelName;\n modelEditor -e \n -docTag \"RADRENDER\" \n -editorChanged \"updateModelPanelBar\" \n -camera \"persp\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"smoothShaded\" \n -activeOnly 0\n -ignorePanZoom 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -holdOuts 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 0\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 32768\n -fogging 0\n -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n"
|
||||
+ " -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -depthOfFieldPreview 1\n -maxConstantTransparency 1\n -rendererName \"vp2Renderer\" \n -objectFilterShowInHUD 1\n -isFiltered 0\n -colorResolution 256 256 \n -bumpResolution 512 512 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 1\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n -sortTransparent 1\n -controllers 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n"
|
||||
+ " -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -imagePlane 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -particleInstancers 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nParticles 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -pluginShapes 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -motionTrails 1\n -clipGhosts 1\n -greasePencils 1\n -shadows 0\n -captureSequenceNumber -1\n -width 1319\n -height 626\n -sceneRenderFilter 0\n $editorName;\n modelEditor -e -viewSelected 0 $editorName;\n modelEditor -e \n -pluginObjects \"gpuCacheDisplayFilter\" 1 \n"
|
||||
+ " $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"outlinerPanel\" (localizedPanelLabel(\"\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\toutlinerPanel -edit -l (localizedPanelLabel(\"\")) -mbv $menusOkayInPanels $panelName;\n\t\t$editorName = $panelName;\n outlinerEditor -e \n -docTag \"isolOutln_fromSeln\" \n -showShapes 0\n -showAssignedMaterials 0\n -showTimeEditor 1\n -showReferenceNodes 0\n -showReferenceMembers 0\n -showAttributes 0\n -showConnected 0\n -showAnimCurvesOnly 0\n -showMuteInfo 0\n -organizeByLayer 1\n -organizeByClip 1\n -showAnimLayerWeight 1\n -autoExpandLayers 1\n -autoExpand 0\n -showDagOnly 1\n -showAssets 1\n -showContainedOnly 1\n -showPublishedAsConnected 0\n -showParentContainers 0\n"
|
||||
+ " -showContainerContents 1\n -ignoreDagHierarchy 0\n -expandConnections 0\n -showUpstreamCurves 1\n -showUnitlessCurves 1\n -showCompounds 1\n -showLeafs 1\n -showNumericAttrsOnly 0\n -highlightActive 1\n -autoSelectNewObjects 0\n -doNotSelectNewObjects 0\n -dropIsParent 1\n -transmitFilters 0\n -setFilter \"defaultSetFilter\" \n -showSetMembers 1\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n -directSelect 0\n -isSet 0\n -isSetMember 0\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -containersIgnoreFilters 0\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -animLayerFilterOptions \"allAffecting\" \n"
|
||||
+ " -sortOrder \"none\" \n -longNames 0\n -niceNames 1\n -selectCommand \"<function selCom at 0x7f29c5c04aa0>\" \n -showNamespace 1\n -showPinIcons 0\n -mapMotionTrails 0\n -ignoreHiddenAttribute 0\n -ignoreOutlinerColor 0\n -renderFilterVisible 0\n -renderFilterIndex 0\n -selectionOrder \"chronological\" \n -expandAttribute 0\n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"outlinerPanel\" (localizedPanelLabel(\"Outliner\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\toutlinerPanel -edit -l (localizedPanelLabel(\"Outliner\")) -mbv $menusOkayInPanels $panelName;\n\t\t$editorName = $panelName;\n outlinerEditor -e \n -docTag \"isolOutln_fromSeln\" \n -showShapes 0\n -showAssignedMaterials 0\n -showTimeEditor 1\n -showReferenceNodes 1\n"
|
||||
+ " -showReferenceMembers 1\n -showAttributes 0\n -showConnected 0\n -showAnimCurvesOnly 0\n -showMuteInfo 0\n -organizeByLayer 1\n -organizeByClip 1\n -showAnimLayerWeight 1\n -autoExpandLayers 1\n -autoExpand 0\n -showDagOnly 1\n -showAssets 1\n -showContainedOnly 1\n -showPublishedAsConnected 0\n -showParentContainers 0\n -showContainerContents 1\n -ignoreDagHierarchy 0\n -expandConnections 0\n -showUpstreamCurves 1\n -showUnitlessCurves 1\n -showCompounds 1\n -showLeafs 1\n -showNumericAttrsOnly 0\n -highlightActive 1\n -autoSelectNewObjects 0\n -doNotSelectNewObjects 0\n -dropIsParent 1\n -transmitFilters 0\n -setFilter \"defaultSetFilter\" \n -showSetMembers 1\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n"
|
||||
+ " -directSelect 0\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -containersIgnoreFilters 0\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -animLayerFilterOptions \"allAffecting\" \n -sortOrder \"none\" \n -longNames 0\n -niceNames 1\n -showNamespace 1\n -showPinIcons 0\n -mapMotionTrails 0\n -ignoreHiddenAttribute 0\n -ignoreOutlinerColor 0\n -renderFilterVisible 0\n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"graphEditor\" (localizedPanelLabel(\"Graph Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Graph Editor\")) -mbv $menusOkayInPanels $panelName;\n"
|
||||
+ "\n\t\t\t$editorName = ($panelName+\"OutlineEd\");\n outlinerEditor -e \n -showShapes 1\n -showAssignedMaterials 0\n -showTimeEditor 1\n -showReferenceNodes 0\n -showReferenceMembers 0\n -showAttributes 1\n -showConnected 1\n -showAnimCurvesOnly 1\n -showMuteInfo 0\n -organizeByLayer 1\n -organizeByClip 1\n -showAnimLayerWeight 1\n -autoExpandLayers 1\n -autoExpand 1\n -showDagOnly 0\n -showAssets 1\n -showContainedOnly 0\n -showPublishedAsConnected 0\n -showParentContainers 1\n -showContainerContents 0\n -ignoreDagHierarchy 0\n -expandConnections 1\n -showUpstreamCurves 1\n -showUnitlessCurves 1\n -showCompounds 0\n -showLeafs 1\n -showNumericAttrsOnly 1\n"
|
||||
+ " -highlightActive 0\n -autoSelectNewObjects 1\n -doNotSelectNewObjects 0\n -dropIsParent 1\n -transmitFilters 1\n -setFilter \"0\" \n -showSetMembers 0\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n -directSelect 0\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -containersIgnoreFilters 0\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -animLayerFilterOptions \"allAffecting\" \n -sortOrder \"none\" \n -longNames 0\n -niceNames 1\n -showNamespace 1\n -showPinIcons 1\n -mapMotionTrails 1\n -ignoreHiddenAttribute 0\n -ignoreOutlinerColor 0\n"
|
||||
+ " -renderFilterVisible 0\n $editorName;\n\n\t\t\t$editorName = ($panelName+\"GraphEd\");\n animCurveEditor -e \n -displayKeys 1\n -displayTangents 0\n -displayActiveKeys 0\n -displayActiveKeyTangents 1\n -displayInfinities 0\n -displayValues 0\n -autoFit 1\n -autoFitTime 0\n -snapTime \"integer\" \n -snapValue \"none\" \n -showResults \"off\" \n -showBufferCurves \"off\" \n -smoothness \"fine\" \n -resultSamples 1\n -resultScreenSamples 0\n -resultUpdate \"delayed\" \n -showUpstreamCurves 1\n -showCurveNames 0\n -showActiveCurveNames 0\n -stackedCurves 0\n -stackedCurvesMin -1\n -stackedCurvesMax 1\n -stackedCurvesSpace 0.2\n -displayNormalized 0\n -preSelectionHighlight 0\n"
|
||||
+ " -constrainDrag 0\n -classicMode 1\n -valueLinesToggle 0\n -outliner \"graphEditor1OutlineEd\" \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"dopeSheetPanel\" (localizedPanelLabel(\"Dope Sheet\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Dope Sheet\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = ($panelName+\"OutlineEd\");\n outlinerEditor -e \n -showShapes 1\n -showAssignedMaterials 0\n -showTimeEditor 1\n -showReferenceNodes 0\n -showReferenceMembers 0\n -showAttributes 1\n -showConnected 1\n -showAnimCurvesOnly 1\n -showMuteInfo 0\n -organizeByLayer 1\n -organizeByClip 1\n -showAnimLayerWeight 1\n"
|
||||
+ " -autoExpandLayers 1\n -autoExpand 0\n -showDagOnly 0\n -showAssets 1\n -showContainedOnly 0\n -showPublishedAsConnected 0\n -showParentContainers 1\n -showContainerContents 0\n -ignoreDagHierarchy 0\n -expandConnections 1\n -showUpstreamCurves 1\n -showUnitlessCurves 0\n -showCompounds 1\n -showLeafs 1\n -showNumericAttrsOnly 1\n -highlightActive 0\n -autoSelectNewObjects 0\n -doNotSelectNewObjects 1\n -dropIsParent 1\n -transmitFilters 0\n -setFilter \"0\" \n -showSetMembers 0\n -allowMultiSelection 1\n -alwaysToggleSelect 0\n -directSelect 0\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -containersIgnoreFilters 0\n"
|
||||
+ " -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -animLayerFilterOptions \"allAffecting\" \n -sortOrder \"none\" \n -longNames 0\n -niceNames 1\n -showNamespace 1\n -showPinIcons 0\n -mapMotionTrails 1\n -ignoreHiddenAttribute 0\n -ignoreOutlinerColor 0\n -renderFilterVisible 0\n $editorName;\n\n\t\t\t$editorName = ($panelName+\"DopeSheetEd\");\n dopeSheetEditor -e \n -displayKeys 1\n -displayTangents 0\n -displayActiveKeys 0\n -displayActiveKeyTangents 0\n -displayInfinities 0\n -displayValues 0\n -autoFit 0\n -autoFitTime 0\n -snapTime \"integer\" \n -snapValue \"none\" \n"
|
||||
+ " -outliner \"dopeSheetPanel1OutlineEd\" \n -showSummary 1\n -showScene 0\n -hierarchyBelow 0\n -showTicks 1\n -selectionWindow 0 0 0 0 \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"timeEditorPanel\" (localizedPanelLabel(\"Time Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Time Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"clipEditorPanel\" (localizedPanelLabel(\"Trax Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Trax Editor\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = clipEditorNameFromPanel($panelName);\n clipEditor -e \n"
|
||||
+ " -displayKeys 0\n -displayTangents 0\n -displayActiveKeys 0\n -displayActiveKeyTangents 0\n -displayInfinities 0\n -displayValues 0\n -autoFit 0\n -autoFitTime 0\n -snapTime \"none\" \n -snapValue \"none\" \n -initialized 0\n -manageSequencer 0 \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"sequenceEditorPanel\" (localizedPanelLabel(\"Camera Sequencer\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Camera Sequencer\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = sequenceEditorNameFromPanel($panelName);\n clipEditor -e \n -displayKeys 0\n -displayTangents 0\n -displayActiveKeys 0\n -displayActiveKeyTangents 0\n"
|
||||
+ " -displayInfinities 0\n -displayValues 0\n -autoFit 0\n -autoFitTime 0\n -snapTime \"none\" \n -snapValue \"none\" \n -initialized 0\n -manageSequencer 1 \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"hyperGraphPanel\" (localizedPanelLabel(\"Hypergraph Hierarchy\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Hypergraph Hierarchy\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = ($panelName+\"HyperGraphEd\");\n hyperGraph -e \n -graphLayoutStyle \"hierarchicalLayout\" \n -orientation \"horiz\" \n -mergeConnections 0\n -zoom 1\n -animateTransition 0\n -showRelationships 1\n -showShapes 0\n -showDeformers 0\n -showExpressions 0\n"
|
||||
+ " -showConstraints 0\n -showConnectionFromSelected 0\n -showConnectionToSelected 0\n -showConstraintLabels 0\n -showUnderworld 0\n -showInvisible 0\n -transitionFrames 1\n -opaqueContainers 0\n -freeform 0\n -image \"C:/work/Batman/characters/Bane/sourceimages/Bane_tpage_2048.tga\" \n -imagePosition 0 0 \n -imageScale 1\n -imageEnabled 0\n -graphType \"DAG\" \n -heatMapDisplay 0\n -updateSelection 1\n -updateNodeAdded 1\n -useDrawOverrideColor 0\n -limitGraphTraversal -1\n -range 0 0 \n -iconSize \"smallIcons\" \n -showCachedConnections 0\n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"hyperShadePanel\" (localizedPanelLabel(\"Hypershade\")) `;\n"
|
||||
+ "\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Hypershade\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"visorPanel\" (localizedPanelLabel(\"Visor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Visor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"nodeEditorPanel\" (localizedPanelLabel(\"Node Editor\")) `;\n\tif ($nodeEditorPanelVisible || $nodeEditorWorkspaceControlOpen) {\n\t\tif (\"\" == $panelName) {\n\t\t\tif ($useSceneConfig) {\n\t\t\t\t$panelName = `scriptedPanel -unParent -type \"nodeEditorPanel\" -l (localizedPanelLabel(\"Node Editor\")) -mbv $menusOkayInPanels `;\n\n\t\t\t$editorName = ($panelName+\"NodeEditorEd\");\n nodeEditor -e \n -allAttributes 0\n"
|
||||
+ " -allNodes 0\n -autoSizeNodes 1\n -consistentNameSize 1\n -createNodeCommand \"nodeEdCreateNodeCommand\" \n -connectNodeOnCreation 0\n -connectOnDrop 0\n -copyConnectionsOnPaste 0\n -connectionStyle \"bezier\" \n -defaultPinnedState 0\n -additiveGraphingMode 0\n -settingsChangedCallback \"nodeEdSyncControls\" \n -traversalDepthLimit -1\n -keyPressCommand \"nodeEdKeyPressCommand\" \n -nodeTitleMode \"name\" \n -gridSnap 0\n -gridVisibility 1\n -crosshairOnEdgeDragging 0\n -popupMenuScript \"nodeEdBuildPanelMenus\" \n -showNamespace 1\n -showShapes 1\n -showSGShapes 0\n -showTransforms 1\n -useAssets 1\n -syncedSelection 1\n -extendToShapes 1\n -editorMode \"default\" \n"
|
||||
+ " $editorName;\n\t\t\t}\n\t\t} else {\n\t\t\t$label = `panel -q -label $panelName`;\n\t\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Node Editor\")) -mbv $menusOkayInPanels $panelName;\n\n\t\t\t$editorName = ($panelName+\"NodeEditorEd\");\n nodeEditor -e \n -allAttributes 0\n -allNodes 0\n -autoSizeNodes 1\n -consistentNameSize 1\n -createNodeCommand \"nodeEdCreateNodeCommand\" \n -connectNodeOnCreation 0\n -connectOnDrop 0\n -copyConnectionsOnPaste 0\n -connectionStyle \"bezier\" \n -defaultPinnedState 0\n -additiveGraphingMode 0\n -settingsChangedCallback \"nodeEdSyncControls\" \n -traversalDepthLimit -1\n -keyPressCommand \"nodeEdKeyPressCommand\" \n -nodeTitleMode \"name\" \n -gridSnap 0\n -gridVisibility 1\n -crosshairOnEdgeDragging 0\n -popupMenuScript \"nodeEdBuildPanelMenus\" \n"
|
||||
+ " -showNamespace 1\n -showShapes 1\n -showSGShapes 0\n -showTransforms 1\n -useAssets 1\n -syncedSelection 1\n -extendToShapes 1\n -editorMode \"default\" \n $editorName;\n\t\t\tif (!$useSceneConfig) {\n\t\t\t\tpanel -e -l $label $panelName;\n\t\t\t}\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"createNodePanel\" (localizedPanelLabel(\"Create Node\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Create Node\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"polyTexturePlacementPanel\" (localizedPanelLabel(\"UV Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"UV Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n"
|
||||
+ "\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"renderWindowPanel\" (localizedPanelLabel(\"Render View\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Render View\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"shapePanel\" (localizedPanelLabel(\"Shape Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tshapePanel -edit -l (localizedPanelLabel(\"Shape Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"posePanel\" (localizedPanelLabel(\"Pose Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tposePanel -edit -l (localizedPanelLabel(\"Pose Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n"
|
||||
+ "\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"dynRelEdPanel\" (localizedPanelLabel(\"Dynamic Relationships\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Dynamic Relationships\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"relationshipPanel\" (localizedPanelLabel(\"Relationship Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Relationship Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"referenceEditorPanel\" (localizedPanelLabel(\"Reference Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Reference Editor\")) -mbv $menusOkayInPanels $panelName;\n"
|
||||
+ "\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"componentEditorPanel\" (localizedPanelLabel(\"Component Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Component Editor\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"dynPaintScriptedPanelType\" (localizedPanelLabel(\"Paint Effects\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Paint Effects\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"scriptEditorPanel\" (localizedPanelLabel(\"Script Editor\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Script Editor\")) -mbv $menusOkayInPanels $panelName;\n"
|
||||
+ "\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"profilerPanel\" (localizedPanelLabel(\"Profiler Tool\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Profiler Tool\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"contentBrowserPanel\" (localizedPanelLabel(\"Content Browser\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Content Browser\")) -mbv $menusOkayInPanels $panelName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextScriptedPanel \"Stereo\" (localizedPanelLabel(\"Stereo\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\tscriptedPanel -edit -l (localizedPanelLabel(\"Stereo\")) -mbv $menusOkayInPanels $panelName;\n"
|
||||
+ "string $editorName = ($panelName+\"Editor\");\n stereoCameraView -e \n -editorChanged \"updateModelPanelBar\" \n -camera \"persp\" \n -useInteractiveMode 0\n -displayLights \"default\" \n -displayAppearance \"wireframe\" \n -activeOnly 0\n -ignorePanZoom 0\n -wireframeOnShaded 0\n -headsUpDisplay 1\n -holdOuts 1\n -selectionHiliteDisplay 1\n -useDefaultMaterial 0\n -bufferMode \"double\" \n -twoSidedLighting 1\n -backfaceCulling 0\n -xray 0\n -jointXray 0\n -activeComponentsXray 0\n -displayTextures 0\n -smoothWireframe 0\n -lineWidth 1\n -textureAnisotropic 0\n -textureHilight 1\n -textureSampling 2\n -textureDisplay \"modulate\" \n -textureMaxSize 32768\n -fogging 0\n"
|
||||
+ " -fogSource \"fragment\" \n -fogMode \"linear\" \n -fogStart 0\n -fogEnd 100\n -fogDensity 0.1\n -fogColor 0.5 0.5 0.5 1 \n -depthOfFieldPreview 1\n -maxConstantTransparency 1\n -rendererOverrideName \"stereoOverrideVP2\" \n -objectFilterShowInHUD 1\n -isFiltered 0\n -colorResolution 4 4 \n -bumpResolution 4 4 \n -textureCompression 0\n -transparencyAlgorithm \"frontAndBackCull\" \n -transpInShadows 0\n -cullingOverride \"none\" \n -lowQualityLighting 0\n -maximumNumHardwareLights 0\n -occlusionCulling 0\n -shadingModel 0\n -useBaseRenderer 0\n -useReducedRenderer 0\n -smallObjectCulling 0\n -smallObjectThreshold -1 \n -interactiveDisableShadows 0\n -interactiveBackFaceCull 0\n"
|
||||
+ " -sortTransparent 1\n -controllers 1\n -nurbsCurves 1\n -nurbsSurfaces 1\n -polymeshes 1\n -subdivSurfaces 1\n -planes 1\n -lights 1\n -cameras 1\n -controlVertices 1\n -hulls 1\n -grid 1\n -imagePlane 1\n -joints 1\n -ikHandles 1\n -deformers 1\n -dynamics 1\n -particleInstancers 1\n -fluids 1\n -hairSystems 1\n -follicles 1\n -nCloths 1\n -nParticles 1\n -nRigids 1\n -dynamicConstraints 1\n -locators 1\n -manipulators 1\n -pluginShapes 1\n -dimensions 1\n -handles 1\n -pivots 1\n -textures 1\n -strokes 1\n -motionTrails 1\n -clipGhosts 1\n"
|
||||
+ " -greasePencils 1\n -shadows 0\n -captureSequenceNumber -1\n -width 0\n -height 0\n -sceneRenderFilter 0\n -displayMode \"centerEye\" \n -viewColor 0 0 0 1 \n -useCustomBackground 1\n $editorName;\n stereoCameraView -e -viewSelected 0 $editorName;\n stereoCameraView -e \n -pluginObjects \"gpuCacheDisplayFilter\" 1 \n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\t$panelName = `sceneUIReplacement -getNextPanel \"outlinerPanel\" (localizedPanelLabel(\"ToggledOutliner\")) `;\n\tif (\"\" != $panelName) {\n\t\t$label = `panel -q -label $panelName`;\n\t\toutlinerPanel -edit -l (localizedPanelLabel(\"ToggledOutliner\")) -mbv $menusOkayInPanels $panelName;\n\t\t$editorName = $panelName;\n outlinerEditor -e \n -docTag \"isolOutln_fromSeln\" \n -showShapes 0\n -showAssignedMaterials 0\n -showTimeEditor 1\n"
|
||||
+ " -showReferenceNodes 0\n -showReferenceMembers 0\n -showAttributes 0\n -showConnected 0\n -showAnimCurvesOnly 0\n -showMuteInfo 0\n -organizeByLayer 1\n -organizeByClip 1\n -showAnimLayerWeight 1\n -autoExpandLayers 1\n -autoExpand 0\n -showDagOnly 1\n -showAssets 1\n -showContainedOnly 1\n -showPublishedAsConnected 0\n -showParentContainers 0\n -showContainerContents 1\n -ignoreDagHierarchy 0\n -expandConnections 0\n -showUpstreamCurves 1\n -showUnitlessCurves 1\n -showCompounds 1\n -showLeafs 1\n -showNumericAttrsOnly 0\n -highlightActive 1\n -autoSelectNewObjects 0\n -doNotSelectNewObjects 0\n -dropIsParent 1\n -transmitFilters 0\n -setFilter \"defaultSetFilter\" \n -showSetMembers 1\n -allowMultiSelection 1\n"
|
||||
+ " -alwaysToggleSelect 0\n -directSelect 0\n -isSet 0\n -isSetMember 0\n -displayMode \"DAG\" \n -expandObjects 0\n -setsIgnoreFilters 1\n -containersIgnoreFilters 0\n -editAttrName 0\n -showAttrValues 0\n -highlightSecondary 0\n -showUVAttrsOnly 0\n -showTextureNodesOnly 0\n -attrAlphaOrder \"default\" \n -animLayerFilterOptions \"allAffecting\" \n -sortOrder \"none\" \n -longNames 0\n -niceNames 1\n -selectCommand \"pass\" \n -showNamespace 1\n -showPinIcons 0\n -mapMotionTrails 0\n -ignoreHiddenAttribute 0\n -ignoreOutlinerColor 0\n -renderFilterVisible 0\n -renderFilterIndex 0\n -selectionOrder \"chronological\" \n -expandAttribute 0\n $editorName;\n\t\tif (!$useSceneConfig) {\n\t\t\tpanel -e -l $label $panelName;\n\t\t}\n\t}\n\n\n\tif ($useSceneConfig) {\n"
|
||||
+ " string $configName = `getPanel -cwl (localizedPanelLabel(\"Current Layout\"))`;\n if (\"\" != $configName) {\n\t\t\tpanelConfiguration -edit -label (localizedPanelLabel(\"Current Layout\")) \n\t\t\t\t-userCreated false\n\t\t\t\t-defaultImage \"vacantCell.xP:/\"\n\t\t\t\t-image \"\"\n\t\t\t\t-sc false\n\t\t\t\t-configString \"global string $gMainPane; paneLayout -e -cn \\\"single\\\" -ps 1 100 100 $gMainPane;\"\n\t\t\t\t-removeAllPanels\n\t\t\t\t-ap false\n\t\t\t\t\t(localizedPanelLabel(\"Persp View\")) \n\t\t\t\t\t\"modelPanel\"\n"
|
||||
+ "\t\t\t\t\t\"$panelName = `modelPanel -unParent -l (localizedPanelLabel(\\\"Persp View\\\")) -mbv $menusOkayInPanels `;\\n$editorName = $panelName;\\nmodelEditor -e \\n -docTag \\\"RADRENDER\\\" \\n -editorChanged \\\"updateModelPanelBar\\\" \\n -cam `findStartUpCamera persp` \\n -useInteractiveMode 0\\n -displayLights \\\"default\\\" \\n -displayAppearance \\\"smoothShaded\\\" \\n -activeOnly 0\\n -ignorePanZoom 0\\n -wireframeOnShaded 0\\n -headsUpDisplay 1\\n -holdOuts 1\\n -selectionHiliteDisplay 1\\n -useDefaultMaterial 0\\n -bufferMode \\\"double\\\" \\n -twoSidedLighting 0\\n -backfaceCulling 0\\n -xray 0\\n -jointXray 0\\n -activeComponentsXray 0\\n -displayTextures 0\\n -smoothWireframe 0\\n -lineWidth 1\\n -textureAnisotropic 0\\n -textureHilight 1\\n -textureSampling 2\\n -textureDisplay \\\"modulate\\\" \\n -textureMaxSize 32768\\n -fogging 0\\n -fogSource \\\"fragment\\\" \\n -fogMode \\\"linear\\\" \\n -fogStart 0\\n -fogEnd 100\\n -fogDensity 0.1\\n -fogColor 0.5 0.5 0.5 1 \\n -depthOfFieldPreview 1\\n -maxConstantTransparency 1\\n -rendererName \\\"vp2Renderer\\\" \\n -objectFilterShowInHUD 1\\n -isFiltered 0\\n -colorResolution 256 256 \\n -bumpResolution 512 512 \\n -textureCompression 0\\n -transparencyAlgorithm \\\"frontAndBackCull\\\" \\n -transpInShadows 0\\n -cullingOverride \\\"none\\\" \\n -lowQualityLighting 0\\n -maximumNumHardwareLights 1\\n -occlusionCulling 0\\n -shadingModel 0\\n -useBaseRenderer 0\\n -useReducedRenderer 0\\n -smallObjectCulling 0\\n -smallObjectThreshold -1 \\n -interactiveDisableShadows 0\\n -interactiveBackFaceCull 0\\n -sortTransparent 1\\n -controllers 1\\n -nurbsCurves 1\\n -nurbsSurfaces 1\\n -polymeshes 1\\n -subdivSurfaces 1\\n -planes 1\\n -lights 1\\n -cameras 1\\n -controlVertices 1\\n -hulls 1\\n -grid 1\\n -imagePlane 1\\n -joints 1\\n -ikHandles 1\\n -deformers 1\\n -dynamics 1\\n -particleInstancers 1\\n -fluids 1\\n -hairSystems 1\\n -follicles 1\\n -nCloths 1\\n -nParticles 1\\n -nRigids 1\\n -dynamicConstraints 1\\n -locators 1\\n -manipulators 1\\n -pluginShapes 1\\n -dimensions 1\\n -handles 1\\n -pivots 1\\n -textures 1\\n -strokes 1\\n -motionTrails 1\\n -clipGhosts 1\\n -greasePencils 1\\n -shadows 0\\n -captureSequenceNumber -1\\n -width 1319\\n -height 626\\n -sceneRenderFilter 0\\n $editorName;\\nmodelEditor -e -viewSelected 0 $editorName;\\nmodelEditor -e \\n -pluginObjects \\\"gpuCacheDisplayFilter\\\" 1 \\n $editorName\"\n"
|
||||
+ "\t\t\t\t\t\"modelPanel -edit -l (localizedPanelLabel(\\\"Persp View\\\")) -mbv $menusOkayInPanels $panelName;\\n$editorName = $panelName;\\nmodelEditor -e \\n -docTag \\\"RADRENDER\\\" \\n -editorChanged \\\"updateModelPanelBar\\\" \\n -cam `findStartUpCamera persp` \\n -useInteractiveMode 0\\n -displayLights \\\"default\\\" \\n -displayAppearance \\\"smoothShaded\\\" \\n -activeOnly 0\\n -ignorePanZoom 0\\n -wireframeOnShaded 0\\n -headsUpDisplay 1\\n -holdOuts 1\\n -selectionHiliteDisplay 1\\n -useDefaultMaterial 0\\n -bufferMode \\\"double\\\" \\n -twoSidedLighting 0\\n -backfaceCulling 0\\n -xray 0\\n -jointXray 0\\n -activeComponentsXray 0\\n -displayTextures 0\\n -smoothWireframe 0\\n -lineWidth 1\\n -textureAnisotropic 0\\n -textureHilight 1\\n -textureSampling 2\\n -textureDisplay \\\"modulate\\\" \\n -textureMaxSize 32768\\n -fogging 0\\n -fogSource \\\"fragment\\\" \\n -fogMode \\\"linear\\\" \\n -fogStart 0\\n -fogEnd 100\\n -fogDensity 0.1\\n -fogColor 0.5 0.5 0.5 1 \\n -depthOfFieldPreview 1\\n -maxConstantTransparency 1\\n -rendererName \\\"vp2Renderer\\\" \\n -objectFilterShowInHUD 1\\n -isFiltered 0\\n -colorResolution 256 256 \\n -bumpResolution 512 512 \\n -textureCompression 0\\n -transparencyAlgorithm \\\"frontAndBackCull\\\" \\n -transpInShadows 0\\n -cullingOverride \\\"none\\\" \\n -lowQualityLighting 0\\n -maximumNumHardwareLights 1\\n -occlusionCulling 0\\n -shadingModel 0\\n -useBaseRenderer 0\\n -useReducedRenderer 0\\n -smallObjectCulling 0\\n -smallObjectThreshold -1 \\n -interactiveDisableShadows 0\\n -interactiveBackFaceCull 0\\n -sortTransparent 1\\n -controllers 1\\n -nurbsCurves 1\\n -nurbsSurfaces 1\\n -polymeshes 1\\n -subdivSurfaces 1\\n -planes 1\\n -lights 1\\n -cameras 1\\n -controlVertices 1\\n -hulls 1\\n -grid 1\\n -imagePlane 1\\n -joints 1\\n -ikHandles 1\\n -deformers 1\\n -dynamics 1\\n -particleInstancers 1\\n -fluids 1\\n -hairSystems 1\\n -follicles 1\\n -nCloths 1\\n -nParticles 1\\n -nRigids 1\\n -dynamicConstraints 1\\n -locators 1\\n -manipulators 1\\n -pluginShapes 1\\n -dimensions 1\\n -handles 1\\n -pivots 1\\n -textures 1\\n -strokes 1\\n -motionTrails 1\\n -clipGhosts 1\\n -greasePencils 1\\n -shadows 0\\n -captureSequenceNumber -1\\n -width 1319\\n -height 626\\n -sceneRenderFilter 0\\n $editorName;\\nmodelEditor -e -viewSelected 0 $editorName;\\nmodelEditor -e \\n -pluginObjects \\\"gpuCacheDisplayFilter\\\" 1 \\n $editorName\"\n"
|
||||
+ "\t\t\t\t$configName;\n\n setNamedPanelLayout (localizedPanelLabel(\"Current Layout\"));\n }\n\n panelHistory -e -clear mainPanelHistory;\n sceneUIReplacement -clear;\n\t}\n\n\ngrid -spacing 5 -size 12 -divisions 5 -displayAxes yes -displayGridLines yes -displayDivisionLines yes -displayPerspectiveLabels no -displayOrthographicLabels no -displayAxesBold yes -perspectiveLabelPosition axis -orthographicLabelPosition edge;\nviewManip -drawCompass 0 -compassAngle 0 -frontParameters \"1 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000\" -homeParameters \"\" -selectionLockParameters \"\";\n}\n");
|
||||
setAttr ".st" 3;
|
||||
createNode script -n "sceneConfigurationScriptNode";
|
||||
rename -uid "55EEE3F8-4EE1-A60E-BD11-499251DB7F72";
|
||||
addAttr -ci true -m -sn "stringOptions" -ln "stringOptions" -at "compound" -nc
|
||||
3;
|
||||
addAttr -ci true -sn "name" -ln "name" -dt "string" -p "stringOptions";
|
||||
addAttr -ci true -sn "value" -ln "value" -dt "string" -p "stringOptions";
|
||||
addAttr -ci true -sn "type" -ln "type" -dt "string" -p "stringOptions";
|
||||
setAttr ".b" -type "string" "playbackOptions -min 1 -max 120 -ast 1 -aet 200 ";
|
||||
setAttr ".st" 6;
|
||||
setAttr -s 48 ".stringOptions";
|
||||
setAttr ".stringOptions[0].name" -type "string" "rast motion factor";
|
||||
setAttr ".stringOptions[0].value" -type "string" "1.0";
|
||||
setAttr ".stringOptions[0].type" -type "string" "scalar";
|
||||
setAttr ".stringOptions[1].name" -type "string" "rast transparency depth";
|
||||
setAttr ".stringOptions[1].value" -type "string" "8";
|
||||
setAttr ".stringOptions[1].type" -type "string" "integer";
|
||||
setAttr ".stringOptions[2].name" -type "string" "rast useopacity";
|
||||
setAttr ".stringOptions[2].value" -type "string" "true";
|
||||
setAttr ".stringOptions[2].type" -type "string" "boolean";
|
||||
setAttr ".stringOptions[3].name" -type "string" "importon";
|
||||
setAttr ".stringOptions[3].value" -type "string" "false";
|
||||
setAttr ".stringOptions[3].type" -type "string" "boolean";
|
||||
setAttr ".stringOptions[4].name" -type "string" "importon density";
|
||||
setAttr ".stringOptions[4].value" -type "string" "1.0";
|
||||
setAttr ".stringOptions[4].type" -type "string" "scalar";
|
||||
setAttr ".stringOptions[5].name" -type "string" "importon merge";
|
||||
setAttr ".stringOptions[5].value" -type "string" "0.0";
|
||||
setAttr ".stringOptions[5].type" -type "string" "scalar";
|
||||
setAttr ".stringOptions[6].name" -type "string" "importon trace depth";
|
||||
setAttr ".stringOptions[6].value" -type "string" "0";
|
||||
setAttr ".stringOptions[6].type" -type "string" "integer";
|
||||
setAttr ".stringOptions[7].name" -type "string" "importon traverse";
|
||||
setAttr ".stringOptions[7].value" -type "string" "true";
|
||||
setAttr ".stringOptions[7].type" -type "string" "boolean";
|
||||
setAttr ".stringOptions[8].name" -type "string" "shadowmap pixel samples";
|
||||
setAttr ".stringOptions[8].value" -type "string" "3";
|
||||
setAttr ".stringOptions[8].type" -type "string" "integer";
|
||||
setAttr ".stringOptions[9].name" -type "string" "ambient occlusion";
|
||||
setAttr ".stringOptions[9].value" -type "string" "false";
|
||||
setAttr ".stringOptions[9].type" -type "string" "boolean";
|
||||
setAttr ".stringOptions[10].name" -type "string" "ambient occlusion rays";
|
||||
setAttr ".stringOptions[10].value" -type "string" "64";
|
||||
setAttr ".stringOptions[10].type" -type "string" "integer";
|
||||
setAttr ".stringOptions[11].name" -type "string" "ambient occlusion cache";
|
||||
setAttr ".stringOptions[11].value" -type "string" "false";
|
||||
setAttr ".stringOptions[11].type" -type "string" "boolean";
|
||||
setAttr ".stringOptions[12].name" -type "string" "ambient occlusion cache density";
|
||||
setAttr ".stringOptions[12].value" -type "string" "1.0";
|
||||
setAttr ".stringOptions[12].type" -type "string" "scalar";
|
||||
setAttr ".stringOptions[13].name" -type "string" "ambient occlusion cache points";
|
||||
setAttr ".stringOptions[13].value" -type "string" "64";
|
||||
setAttr ".stringOptions[13].type" -type "string" "integer";
|
||||
setAttr ".stringOptions[14].name" -type "string" "irradiance particles";
|
||||
setAttr ".stringOptions[14].value" -type "string" "false";
|
||||
setAttr ".stringOptions[14].type" -type "string" "boolean";
|
||||
setAttr ".stringOptions[15].name" -type "string" "irradiance particles rays";
|
||||
setAttr ".stringOptions[15].value" -type "string" "256";
|
||||
setAttr ".stringOptions[15].type" -type "string" "integer";
|
||||
setAttr ".stringOptions[16].name" -type "string" "irradiance particles interpolate";
|
||||
setAttr ".stringOptions[16].value" -type "string" "1";
|
||||
setAttr ".stringOptions[16].type" -type "string" "integer";
|
||||
setAttr ".stringOptions[17].name" -type "string" "irradiance particles interppoints";
|
||||
setAttr ".stringOptions[17].value" -type "string" "64";
|
||||
setAttr ".stringOptions[17].type" -type "string" "integer";
|
||||
setAttr ".stringOptions[18].name" -type "string" "irradiance particles indirect passes";
|
||||
setAttr ".stringOptions[18].value" -type "string" "0";
|
||||
setAttr ".stringOptions[18].type" -type "string" "integer";
|
||||
setAttr ".stringOptions[19].name" -type "string" "irradiance particles scale";
|
||||
setAttr ".stringOptions[19].value" -type "string" "1.0";
|
||||
setAttr ".stringOptions[19].type" -type "string" "scalar";
|
||||
setAttr ".stringOptions[20].name" -type "string" "irradiance particles env";
|
||||
setAttr ".stringOptions[20].value" -type "string" "true";
|
||||
setAttr ".stringOptions[20].type" -type "string" "boolean";
|
||||
setAttr ".stringOptions[21].name" -type "string" "irradiance particles env rays";
|
||||
setAttr ".stringOptions[21].value" -type "string" "256";
|
||||
setAttr ".stringOptions[21].type" -type "string" "integer";
|
||||
setAttr ".stringOptions[22].name" -type "string" "irradiance particles env scale";
|
||||
setAttr ".stringOptions[22].value" -type "string" "1";
|
||||
setAttr ".stringOptions[22].type" -type "string" "integer";
|
||||
setAttr ".stringOptions[23].name" -type "string" "irradiance particles rebuild";
|
||||
setAttr ".stringOptions[23].value" -type "string" "true";
|
||||
setAttr ".stringOptions[23].type" -type "string" "boolean";
|
||||
setAttr ".stringOptions[24].name" -type "string" "irradiance particles file";
|
||||
setAttr ".stringOptions[24].value" -type "string" "";
|
||||
setAttr ".stringOptions[24].type" -type "string" "string";
|
||||
setAttr ".stringOptions[25].name" -type "string" "geom displace motion factor";
|
||||
setAttr ".stringOptions[25].value" -type "string" "1.0";
|
||||
setAttr ".stringOptions[25].type" -type "string" "scalar";
|
||||
setAttr ".stringOptions[26].name" -type "string" "contrast all buffers";
|
||||
setAttr ".stringOptions[26].value" -type "string" "true";
|
||||
setAttr ".stringOptions[26].type" -type "string" "boolean";
|
||||
setAttr ".stringOptions[27].name" -type "string" "finalgather normal tolerance";
|
||||
setAttr ".stringOptions[27].value" -type "string" "25.842";
|
||||
setAttr ".stringOptions[27].type" -type "string" "scalar";
|
||||
setAttr ".stringOptions[28].name" -type "string" "trace camera clip";
|
||||
setAttr ".stringOptions[28].value" -type "string" "false";
|
||||
setAttr ".stringOptions[28].type" -type "string" "boolean";
|
||||
setAttr ".stringOptions[29].name" -type "string" "unified sampling";
|
||||
setAttr ".stringOptions[29].value" -type "string" "true";
|
||||
setAttr ".stringOptions[29].type" -type "string" "boolean";
|
||||
setAttr ".stringOptions[30].name" -type "string" "samples quality";
|
||||
setAttr ".stringOptions[30].value" -type "string" "0.25 0.25 0.25 0.25";
|
||||
setAttr ".stringOptions[30].type" -type "string" "color";
|
||||
setAttr ".stringOptions[31].name" -type "string" "samples min";
|
||||
setAttr ".stringOptions[31].value" -type "string" "1.0";
|
||||
setAttr ".stringOptions[31].type" -type "string" "scalar";
|
||||
setAttr ".stringOptions[32].name" -type "string" "samples max";
|
||||
setAttr ".stringOptions[32].value" -type "string" "100.0";
|
||||
setAttr ".stringOptions[32].type" -type "string" "scalar";
|
||||
setAttr ".stringOptions[33].name" -type "string" "samples error cutoff";
|
||||
setAttr ".stringOptions[33].value" -type "string" "0.0 0.0 0.0 0.0";
|
||||
setAttr ".stringOptions[33].type" -type "string" "color";
|
||||
setAttr ".stringOptions[34].name" -type "string" "samples per object";
|
||||
setAttr ".stringOptions[34].value" -type "string" "false";
|
||||
setAttr ".stringOptions[34].type" -type "string" "boolean";
|
||||
setAttr ".stringOptions[35].name" -type "string" "progressive";
|
||||
setAttr ".stringOptions[35].value" -type "string" "false";
|
||||
setAttr ".stringOptions[35].type" -type "string" "boolean";
|
||||
setAttr ".stringOptions[36].name" -type "string" "progressive max time";
|
||||
setAttr ".stringOptions[36].value" -type "string" "0";
|
||||
setAttr ".stringOptions[36].type" -type "string" "integer";
|
||||
setAttr ".stringOptions[37].name" -type "string" "progressive subsampling size";
|
||||
setAttr ".stringOptions[37].value" -type "string" "4";
|
||||
setAttr ".stringOptions[37].type" -type "string" "integer";
|
||||
setAttr ".stringOptions[38].name" -type "string" "iray";
|
||||
setAttr ".stringOptions[38].value" -type "string" "false";
|
||||
setAttr ".stringOptions[38].type" -type "string" "boolean";
|
||||
setAttr ".stringOptions[39].name" -type "string" "light relative scale";
|
||||
setAttr ".stringOptions[39].value" -type "string" "0.31831";
|
||||
setAttr ".stringOptions[39].type" -type "string" "scalar";
|
||||
setAttr ".stringOptions[40].name" -type "string" "trace camera motion vectors";
|
||||
setAttr ".stringOptions[40].value" -type "string" "false";
|
||||
setAttr ".stringOptions[40].type" -type "string" "boolean";
|
||||
setAttr ".stringOptions[41].name" -type "string" "ray differentials";
|
||||
setAttr ".stringOptions[41].value" -type "string" "true";
|
||||
setAttr ".stringOptions[41].type" -type "string" "boolean";
|
||||
setAttr ".stringOptions[42].name" -type "string" "environment lighting mode";
|
||||
setAttr ".stringOptions[42].value" -type "string" "off";
|
||||
setAttr ".stringOptions[42].type" -type "string" "string";
|
||||
setAttr ".stringOptions[43].name" -type "string" "environment lighting quality";
|
||||
setAttr ".stringOptions[43].value" -type "string" "0.2";
|
||||
setAttr ".stringOptions[43].type" -type "string" "scalar";
|
||||
setAttr ".stringOptions[44].name" -type "string" "environment lighting shadow";
|
||||
setAttr ".stringOptions[44].value" -type "string" "transparent";
|
||||
setAttr ".stringOptions[44].type" -type "string" "string";
|
||||
setAttr ".stringOptions[45].name" -type "string" "environment lighting resolution";
|
||||
setAttr ".stringOptions[45].value" -type "string" "512";
|
||||
setAttr ".stringOptions[45].type" -type "string" "integer";
|
||||
setAttr ".stringOptions[46].name" -type "string" "environment lighting shader samples";
|
||||
setAttr ".stringOptions[46].value" -type "string" "2";
|
||||
setAttr ".stringOptions[46].type" -type "string" "integer";
|
||||
setAttr ".stringOptions[47].name" -type "string" "environment lighting scale";
|
||||
setAttr ".stringOptions[47].value" -type "string" "1.0 1.0 1.0";
|
||||
setAttr ".stringOptions[47].type" -type "string" "color";
|
||||
createNode shapeEditorManager -n "shapeEditorManager";
|
||||
rename -uid "C1A4E002-4B00-921F-6C36-E7981109BC70";
|
||||
createNode poseInterpolatorManager -n "poseInterpolatorManager";
|
||||
rename -uid "0A7A777B-42BC-EFFC-F4FB-ECB6E726E530";
|
||||
createNode nodeGraphEditorInfo -n "hyperShadePrimaryNodeEditorSavedTabsInfo";
|
||||
rename -uid "A959A99A-4D35-3DA7-D5AD-E39C23F21339";
|
||||
setAttr ".tgi[0].tn" -type "string" "Untitled_1";
|
||||
setAttr ".tgi[0].vl" -type "double2" -330.95236780151544 -323.80951094248991 ;
|
||||
setAttr ".tgi[0].vh" -type "double2" 317.85713022663526 338.09522466054096 ;
|
||||
select -ne :time1;
|
||||
setAttr -av -k on ".cch";
|
||||
setAttr -k on ".fzn";
|
||||
setAttr -av -cb on ".ihi";
|
||||
setAttr -av -k on ".nds";
|
||||
setAttr -cb on ".bnm";
|
||||
setAttr -k on ".o" 1;
|
||||
setAttr -av -k on ".unw" 1;
|
||||
setAttr -av -k on ".etw";
|
||||
setAttr -av -k on ".tps";
|
||||
setAttr -av -k on ".tms";
|
||||
select -ne :hardwareRenderingGlobals;
|
||||
setAttr -av -k on ".cch";
|
||||
setAttr -av -k on ".ihi";
|
||||
setAttr -av -k on ".nds";
|
||||
setAttr -cb on ".bnm";
|
||||
setAttr ".otfna" -type "stringArray" 22 "NURBS Curves" "NURBS Surfaces" "Polygons" "Subdiv Surface" "Particles" "Particle Instance" "Fluids" "Strokes" "Image Planes" "UI" "Lights" "Cameras" "Locators" "Joints" "IK Handles" "Deformers" "Motion Trails" "Components" "Hair Systems" "Follicles" "Misc. UI" "Ornaments" ;
|
||||
setAttr ".otfva" -type "Int32Array" 22 0 1 1 1 1 1
|
||||
1 1 1 0 0 0 0 0 0 0 0 0
|
||||
0 0 0 0 ;
|
||||
setAttr -k on ".hwi";
|
||||
setAttr -av ".ta";
|
||||
setAttr -av ".tq";
|
||||
setAttr -av ".etmr" no;
|
||||
setAttr -av ".tmr" 4096;
|
||||
setAttr -av ".aoon";
|
||||
setAttr -av ".aoam";
|
||||
setAttr -av ".aora";
|
||||
setAttr -k on ".hff";
|
||||
setAttr -av -k on ".hfd";
|
||||
setAttr -av -k on ".hfs";
|
||||
setAttr -av -k on ".hfe";
|
||||
setAttr -av ".hfc";
|
||||
setAttr -av -k on ".hfcr";
|
||||
setAttr -av -k on ".hfcg";
|
||||
setAttr -av -k on ".hfcb";
|
||||
setAttr -av -k on ".hfa";
|
||||
setAttr -av ".mbe";
|
||||
setAttr -av -k on ".mbsof";
|
||||
setAttr -k on ".blen";
|
||||
setAttr -k on ".blat";
|
||||
setAttr -av ".msaa";
|
||||
select -ne :renderPartition;
|
||||
setAttr -av -k on ".cch";
|
||||
setAttr -cb on ".ihi";
|
||||
setAttr -av -k on ".nds";
|
||||
setAttr -cb on ".bnm";
|
||||
setAttr -s 2 ".st";
|
||||
setAttr -cb on ".an";
|
||||
setAttr -cb on ".pt";
|
||||
select -ne :renderGlobalsList1;
|
||||
setAttr -k on ".cch";
|
||||
setAttr -cb on ".ihi";
|
||||
setAttr -k on ".nds";
|
||||
setAttr -cb on ".bnm";
|
||||
select -ne :defaultShaderList1;
|
||||
setAttr -k on ".cch";
|
||||
setAttr -cb on ".ihi";
|
||||
setAttr -k on ".nds";
|
||||
setAttr -cb on ".bnm";
|
||||
setAttr -s 4 ".s";
|
||||
select -ne :postProcessList1;
|
||||
setAttr -k on ".cch";
|
||||
setAttr -cb on ".ihi";
|
||||
setAttr -k on ".nds";
|
||||
setAttr -cb on ".bnm";
|
||||
setAttr -s 2 ".p";
|
||||
select -ne :defaultRenderingList1;
|
||||
setAttr -k on ".ihi";
|
||||
select -ne :lightList1;
|
||||
setAttr -s 3 ".l";
|
||||
select -ne :initialShadingGroup;
|
||||
setAttr -av -k on ".cch";
|
||||
setAttr -k on ".fzn";
|
||||
setAttr -cb on ".ihi";
|
||||
setAttr -av -k on ".nds";
|
||||
setAttr -cb on ".bnm";
|
||||
setAttr -k on ".bbx";
|
||||
setAttr -k on ".vwm";
|
||||
setAttr -k on ".tpv";
|
||||
setAttr -k on ".uit";
|
||||
setAttr -k on ".mwc";
|
||||
setAttr -cb on ".an";
|
||||
setAttr -cb on ".il";
|
||||
setAttr -cb on ".vo";
|
||||
setAttr -cb on ".eo";
|
||||
setAttr -cb on ".fo";
|
||||
setAttr -cb on ".epo";
|
||||
setAttr -k on ".ro" yes;
|
||||
select -ne :initialParticleSE;
|
||||
setAttr -av -k on ".cch";
|
||||
setAttr -cb on ".ihi";
|
||||
setAttr -av -k on ".nds";
|
||||
setAttr -cb on ".bnm";
|
||||
setAttr -k on ".mwc";
|
||||
setAttr -cb on ".an";
|
||||
setAttr -cb on ".il";
|
||||
setAttr -cb on ".vo";
|
||||
setAttr -cb on ".eo";
|
||||
setAttr -cb on ".fo";
|
||||
setAttr -cb on ".epo";
|
||||
setAttr -k on ".ro" yes;
|
||||
lockNode -l 0 -lu 1;
|
||||
select -ne :defaultResolution;
|
||||
setAttr -av -k on ".cch";
|
||||
setAttr -av -k on ".ihi";
|
||||
setAttr -av -k on ".nds";
|
||||
setAttr -k on ".bnm";
|
||||
setAttr -av -k on ".w";
|
||||
setAttr -av -k on ".h";
|
||||
setAttr -av -k on ".pa" 1;
|
||||
setAttr -av -k on ".al";
|
||||
setAttr -av -k on ".dar";
|
||||
setAttr -av -k on ".ldar";
|
||||
setAttr -av -k on ".dpi";
|
||||
setAttr -av -k on ".off";
|
||||
setAttr -av -k on ".fld";
|
||||
setAttr -av -k on ".zsl";
|
||||
setAttr -av -k on ".isu";
|
||||
setAttr -av -k on ".pdu";
|
||||
select -ne :defaultLightSet;
|
||||
setAttr -k on ".cch";
|
||||
setAttr -k on ".ihi";
|
||||
setAttr -av -k on ".nds";
|
||||
setAttr -k on ".bnm";
|
||||
setAttr -s 3 ".dsm";
|
||||
setAttr -k on ".mwc";
|
||||
setAttr -k on ".an";
|
||||
setAttr -k on ".il";
|
||||
setAttr -k on ".vo";
|
||||
setAttr -k on ".eo";
|
||||
setAttr -k on ".fo";
|
||||
setAttr -k on ".epo";
|
||||
setAttr -k on ".ro";
|
||||
select -ne :hardwareRenderGlobals;
|
||||
setAttr -av -k on ".cch";
|
||||
setAttr -cb on ".ihi";
|
||||
setAttr -av -k on ".nds";
|
||||
setAttr -cb on ".bnm";
|
||||
setAttr -av -k off -cb on ".ctrs" 256;
|
||||
setAttr -av -k off -cb on ".btrs" 512;
|
||||
setAttr -av -k off -cb on ".fbfm";
|
||||
setAttr -av -k off -cb on ".ehql";
|
||||
setAttr -av -k off -cb on ".eams";
|
||||
setAttr -av -k off -cb on ".eeaa";
|
||||
setAttr -av -k off -cb on ".engm";
|
||||
setAttr -av -k off -cb on ".mes";
|
||||
setAttr -av -k off -cb on ".emb";
|
||||
setAttr -av -k off -cb on ".mbbf";
|
||||
setAttr -av -k off -cb on ".mbs";
|
||||
setAttr -av -k off -cb on ".trm";
|
||||
setAttr -av -k off -cb on ".tshc";
|
||||
setAttr -av -k off -cb on ".enpt";
|
||||
setAttr -av -k off -cb on ".clmt";
|
||||
setAttr -av -k off -cb on ".tcov";
|
||||
setAttr -av -k off -cb on ".lith";
|
||||
setAttr -av -k off -cb on ".sobc";
|
||||
setAttr -av -k off -cb on ".cuth";
|
||||
setAttr -av -k off -cb on ".hgcd";
|
||||
setAttr -av -k off -cb on ".hgci";
|
||||
setAttr -av -k off -cb on ".mgcs";
|
||||
setAttr -av -k off -cb on ".twa";
|
||||
setAttr -av -k off -cb on ".twz";
|
||||
setAttr -cb on ".hwcc";
|
||||
setAttr -cb on ".hwdp";
|
||||
setAttr -cb on ".hwql";
|
||||
setAttr -k on ".hwfr";
|
||||
setAttr -k on ".soll";
|
||||
setAttr -k on ".sosl";
|
||||
setAttr -k on ".bswa";
|
||||
setAttr -k on ".shml";
|
||||
setAttr -k on ".hwel";
|
||||
relationship "link" ":lightLinker1" ":initialShadingGroup.message" ":defaultLightSet.message";
|
||||
relationship "link" ":lightLinker1" ":initialParticleSE.message" ":defaultLightSet.message";
|
||||
relationship "shadowLink" ":lightLinker1" ":initialShadingGroup.message" ":defaultLightSet.message";
|
||||
relationship "shadowLink" ":lightLinker1" ":initialParticleSE.message" ":defaultLightSet.message";
|
||||
connectAttr "layerManager.dli[0]" "defaultLayer.id";
|
||||
connectAttr "renderLayerManager.rlmi[0]" "defaultRenderLayer.rlid";
|
||||
connectAttr "defaultRenderLayer.msg" ":defaultRenderingList1.r" -na;
|
||||
connectAttr "directionalLightShape1.ltd" ":lightList1.l" -na;
|
||||
connectAttr "directionalLightShape2.ltd" ":lightList1.l" -na;
|
||||
connectAttr "directionalLightShape3.ltd" ":lightList1.l" -na;
|
||||
connectAttr ":perspShape.msg" ":defaultRenderGlobals.sc";
|
||||
connectAttr "directionalLight1.iog" ":defaultLightSet.dsm" -na;
|
||||
connectAttr "directionalLight2.iog" ":defaultLightSet.dsm" -na;
|
||||
connectAttr "directionalLight3.iog" ":defaultLightSet.dsm" -na;
|
||||
// End of dh_lights.ma
|
BIN
data/maps/dx11_diffuseIrradiance_map.dds
Normal file
BIN
data/maps/dx11_jitter_map.tga
Normal file
After Width: | Height: | Size: 64 KiB |
BIN
data/maps/dx11_skinLUT_map.tga
Normal file
After Width: | Height: | Size: 192 KiB |
BIN
data/maps/dx11_specularIrradiance_map.dds
Normal file
BIN
data/maps/eyelashes_color_map.tga
Normal file
After Width: | Height: | Size: 4.0 MiB |
BIN
data/maps/eyes_color_map.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
data/maps/eyes_normal_map.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
data/maps/head_cavity_map.tga
Normal file
After Width: | Height: | Size: 4.0 MiB |
BIN
data/maps/head_cm1_color_map.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
data/maps/head_cm2_color_map.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
data/maps/head_cm3_color_map.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
data/maps/head_color_map.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
data/maps/head_micro_normal_map.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
data/maps/head_normal_map.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
data/maps/head_roughness_map.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
data/maps/head_wm1_normal_map.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
data/maps/head_wm2_normal_map.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
data/maps/head_wm3_normal_map.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
data/maps/teeth_color_map.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
data/maps/teeth_normal_map.tga
Normal file
After Width: | Height: | Size: 3.0 MiB |
BIN
data/masks/head_wm13_lips_DL_msk.tga
Normal file
BIN
data/masks/head_wm13_lips_DR_msk.tga
Normal file
BIN
data/masks/head_wm13_lips_UL_msk.tga
Normal file
BIN
data/masks/head_wm13_lips_UR_msk.tga
Normal file
BIN
data/masks/head_wm1_blink_L_msk.tga
Normal file
BIN
data/masks/head_wm1_blink_R_msk.tga
Normal file
BIN
data/masks/head_wm1_browsRaiseInner_L_msk.tga
Normal file
BIN
data/masks/head_wm1_browsRaiseInner_R_msk.tga
Normal file
BIN
data/masks/head_wm1_browsRaiseOuter_L_msk.tga
Normal file
BIN
data/masks/head_wm1_browsRaiseOuter_R_msk.tga
Normal file
BIN
data/masks/head_wm1_chinRaise_L_msk.tga
Normal file
BIN
data/masks/head_wm1_chinRaise_R_msk.tga
Normal file
BIN
data/masks/head_wm1_jawOpen_msk.tga
Normal file
BIN
data/masks/head_wm1_purse_DL_msk.tga
Normal file
BIN
data/masks/head_wm1_purse_DR_msk.tga
Normal file
BIN
data/masks/head_wm1_purse_UL_msk.tga
Normal file
BIN
data/masks/head_wm1_purse_UR_msk.tga
Normal file
BIN
data/masks/head_wm1_squintInner_L_msk.tga
Normal file
BIN
data/masks/head_wm1_squintInner_R_msk.tga
Normal file
BIN
data/masks/head_wm2_browsDown_L_msk.tga
Normal file
BIN
data/masks/head_wm2_browsDown_R_msk.tga
Normal file
BIN
data/masks/head_wm2_browsLateral_L_msk.tga
Normal file
BIN
data/masks/head_wm2_browsLateral_R_msk.tga
Normal file
BIN
data/masks/head_wm2_mouthStretch_L_msk.tga
Normal file
BIN
data/masks/head_wm2_mouthStretch_R_msk.tga
Normal file
BIN
data/masks/head_wm2_neckStretch_L_msk.tga
Normal file
BIN
data/masks/head_wm2_neckStretch_R_msk.tga
Normal file
BIN
data/masks/head_wm2_noseWrinkler_L_msk.tga
Normal file
BIN
data/masks/head_wm2_noseWrinkler_R_msk.tga
Normal file
BIN
data/masks/head_wm3_cheekRaiseInner_L_msk.tga
Normal file
BIN
data/masks/head_wm3_cheekRaiseInner_R_msk.tga
Normal file
BIN
data/masks/head_wm3_cheekRaiseOuter_L_msk.tga
Normal file
BIN
data/masks/head_wm3_cheekRaiseOuter_R_msk.tga
Normal file
BIN
data/masks/head_wm3_cheekRaiseUpper_L_msk.tga
Normal file
BIN
data/masks/head_wm3_cheekRaiseUpper_R_msk.tga
Normal file
BIN
data/masks/head_wm3_smile_L_msk.tga
Normal file
BIN
data/masks/head_wm3_smile_R_msk.tga
Normal file
1231
data/mh4/additional_assemble_script.py
Normal file
BIN
data/mh4/dna_files/Ada.dna
Normal file
179084
data/mh4/gui.ma
Normal file
8545
data/shader.ma
Normal file
4271
data/shaders/dx11_shd_body.fx
Normal file
2872
data/shaders/dx11_shd_eyeLeft.fx
Normal file
2872
data/shaders/dx11_shd_eyeRight.fx
Normal file
4271
data/shaders/dx11_shd_head.fx
Normal file
2872
data/shaders/dx11_shd_teeth.fx
Normal file
@ -21,3 +21,15 @@ PYTHONPATH +:=
|
||||
PYTHONPATH +:= data
|
||||
PYTHONPATH +:= lib/Maya2023/linux
|
||||
MAYA_PLUG_IN_PATH +:= lib/Maya2023/linux
|
||||
|
||||
+ MAYAVERSION:2024 PLATFORM:win64 MetaHuman-DNA-Calibration any .
|
||||
PYTHONPATH +:=
|
||||
PYTHONPATH +:= data
|
||||
PYTHONPATH +:= lib/Maya2024/windows
|
||||
MAYA_PLUG_IN_PATH +:= lib/Maya2024/windows
|
||||
|
||||
+ MAYAVERSION:2024 PLATFORM:linux MetaHuman-DNA-Calibration any .
|
||||
PYTHONPATH +:=
|
||||
PYTHONPATH +:= data
|
||||
PYTHONPATH +:= lib/Maya2024/linux
|
||||
MAYA_PLUG_IN_PATH +:= lib/Maya2024/linux
|
||||
|
@ -3,7 +3,25 @@ project(dnacalib)
|
||||
|
||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/CMakeModulesExtra")
|
||||
|
||||
enable_testing()
|
||||
|
||||
add_subdirectory(DNACalib)
|
||||
add_subdirectory(SPyUS)
|
||||
add_subdirectory(PyDNA)
|
||||
add_subdirectory(PyDNACalib)
|
||||
|
||||
################################################
|
||||
# Package build artifacts
|
||||
set(CPACK_GENERATOR "ZIP")
|
||||
set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
|
||||
set(CPACK_COMPONENT_INCLUDE_TOPLEVEL_DIRECTORY OFF)
|
||||
set(CPACK_COMPONENTS_GROUPING ALL_COMPONENTS_IN_ONE)
|
||||
string(CONCAT CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}"
|
||||
"-${CMAKE_PROJECT_VERSION}"
|
||||
"-${CMAKE_SYSTEM_NAME}"
|
||||
"-${CMAKE_SYSTEM_PROCESSOR}"
|
||||
"-${CMAKE_CXX_COMPILER_ID}${CMAKE_CXX_COMPILER_VERSION}"
|
||||
"-${CMAKE_BUILD_TYPE}"
|
||||
"-${PYTHON3_EXACT_VERSION}"
|
||||
"-SHARED")
|
||||
include(CPack)
|
||||
|
@ -14,6 +14,14 @@
|
||||
set(INSTALL_LIBRARY_SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}")
|
||||
|
||||
macro(install_library target_name)
|
||||
# component_name is an optional argument, and will default to the given target_name
|
||||
set(COMPONENT_NAME ${target_name})
|
||||
set(extra_args ${ARGN})
|
||||
list(LENGTH extra_args num_extra_args)
|
||||
if(${num_extra_args} GREATER 0)
|
||||
list(GET extra_args 0 COMPONENT_NAME)
|
||||
endif()
|
||||
|
||||
include(GNUInstallDirs)
|
||||
set(REPRESENTATIVE_TARGET_NAME ${target_name})
|
||||
set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
|
||||
@ -21,9 +29,20 @@ macro(install_library target_name)
|
||||
# Set install destinations and associate installed target files with an export
|
||||
install(TARGETS ${REPRESENTATIVE_TARGET_NAME}
|
||||
EXPORT ${PROJECT_NAME}-targets
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
COMPONENT ${COMPONENT_NAME}
|
||||
RUNTIME
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
COMPONENT ${COMPONENT_NAME}
|
||||
LIBRARY
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
COMPONENT ${COMPONENT_NAME}
|
||||
NAMELINK_COMPONENT ${COMPONENT_NAME}
|
||||
ARCHIVE
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||
COMPONENT ${COMPONENT_NAME}
|
||||
PUBLIC_HEADER
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
COMPONENT ${COMPONENT_NAME}
|
||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
|
||||
# Write build-tree targets
|
||||
@ -37,7 +56,8 @@ macro(install_library target_name)
|
||||
install(EXPORT ${PROJECT_NAME}-targets
|
||||
FILE ${PROJECT_NAME}Targets.cmake
|
||||
NAMESPACE ${PROJECT_NAME}::
|
||||
DESTINATION ${INSTALL_CONFIGDIR})
|
||||
DESTINATION ${INSTALL_CONFIGDIR}
|
||||
COMPONENT ${COMPONENT_NAME})
|
||||
|
||||
include(CMakePackageConfigHelpers)
|
||||
|
||||
@ -68,13 +88,17 @@ macro(install_library target_name)
|
||||
install(FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.install.cmake"
|
||||
DESTINATION ${INSTALL_CONFIGDIR}
|
||||
RENAME "${PROJECT_NAME}Config.cmake")
|
||||
RENAME "${PROJECT_NAME}Config.cmake"
|
||||
COMPONENT ${COMPONENT_NAME})
|
||||
|
||||
# Install package version file
|
||||
install(FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}ConfigVersion.cmake"
|
||||
DESTINATION ${INSTALL_CONFIGDIR})
|
||||
DESTINATION ${INSTALL_CONFIGDIR}
|
||||
COMPONENT ${COMPONENT_NAME})
|
||||
|
||||
# Install include files
|
||||
install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
install(DIRECTORY include/
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
COMPONENT ${COMPONENT_NAME})
|
||||
endmacro()
|
||||
|
@ -100,6 +100,8 @@ set(SOURCES
|
||||
src/dnacalib/TypeDefs.h
|
||||
|
||||
src/dnacalib/commands/CalculateMeshLowerLODsCommand.cpp
|
||||
src/dnacalib/commands/CalculateMeshLowerLODsCommandImpl.cpp
|
||||
src/dnacalib/commands/CalculateMeshLowerLODsCommandImpl.h
|
||||
src/dnacalib/commands/ClearBlendShapesCommand.cpp
|
||||
src/dnacalib/commands/CommandSequence.cpp
|
||||
src/dnacalib/commands/PruneBlendShapeTargetsCommand.cpp
|
||||
|
@ -123,6 +123,8 @@ set(SOURCES
|
||||
src/dnacalib/CommandImplBase.h
|
||||
src/dnacalib/TypeDefs.h
|
||||
src/dnacalib/commands/CalculateMeshLowerLODsCommand.cpp
|
||||
src/dnacalib/commands/CalculateMeshLowerLODsCommandImpl.cpp
|
||||
src/dnacalib/commands/CalculateMeshLowerLODsCommandImpl.h
|
||||
src/dnacalib/commands/ClearBlendShapesCommand.cpp
|
||||
src/dnacalib/commands/CommandSequence.cpp
|
||||
src/dnacalib/commands/PruneBlendShapeTargetsCommand.cpp
|
||||
|
@ -41,12 +41,19 @@ struct ArrayViewTraits<const T> {
|
||||
using difference_type = std::ptrdiff_t;
|
||||
};
|
||||
|
||||
template<typename T, typename U>
|
||||
struct IsCompatible {
|
||||
static constexpr bool value = std::is_same<typename std::remove_cv<T>::type, typename std::remove_cv<U>::type>::value &&
|
||||
(std::is_const<typename std::remove_reference<T>::type>::value ||
|
||||
!std::is_const<typename std::remove_reference<U>::type>::value);
|
||||
};
|
||||
|
||||
/**
|
||||
@brief A view over a continuous sequence of objects.
|
||||
@tparam T element type
|
||||
Provides a view over a continuous sequence of objects owned by some other object.
|
||||
Contains a count of elements and a pointer to a location where they are stored.
|
||||
ArrayView does not own the mmemory it points to - it does not perform any allocation
|
||||
ArrayView does not own the memory it points to - it does not perform any allocation
|
||||
and deallocation. It can be constructed given a pointer and element count, or a container
|
||||
type argument. The class provides helper methods for creating subviews over the objects,
|
||||
and methods for by-value comparison with containers. ConstArrayView represents an immutable view.
|
||||
@ -76,23 +83,23 @@ class ArrayView {
|
||||
sz{size} {
|
||||
}
|
||||
|
||||
ArrayView(std::nullptr_t /*unused*/, size_type /*unused*/) : ArrayView{nullptr, {}} {
|
||||
}
|
||||
|
||||
template<typename U>
|
||||
template<typename U, typename std::enable_if<IsCompatible<T, U>::value, int>::type = 0>
|
||||
ArrayView(ArrayView<U>& src) : ArrayView{src.data(), src.size()} {
|
||||
}
|
||||
|
||||
template<typename U>
|
||||
template<typename U, typename std::enable_if<IsCompatible<T, U>::value, int>::type = 0>
|
||||
ArrayView(const ArrayView<U>& src) : ArrayView{src.data(), src.size()} {
|
||||
}
|
||||
|
||||
template<typename U>
|
||||
template<typename U, typename std::enable_if<IsCompatible<T, U>::value, int>::type = 0>
|
||||
ArrayView(ArrayView<U>&& src) : ArrayView{src.data(), src.size()} {
|
||||
}
|
||||
|
||||
template<typename U, typename std::enable_if<!std::is_rvalue_reference<U &&>::value, int>::type = 0>
|
||||
explicit ArrayView(U&& src) : ArrayView{src.data(), src.size()} {
|
||||
template<typename U,
|
||||
typename std::enable_if<!std::is_rvalue_reference<U &&>::value &&
|
||||
IsCompatible<T, typename std::remove_reference<U>::type::value_type>::value,
|
||||
int>::type = 0>
|
||||
ArrayView(U&& src) : ArrayView{src.data(), static_cast<size_type>(src.size())} {
|
||||
}
|
||||
|
||||
size_type size() const {
|
||||
@ -193,7 +200,8 @@ bool operator!=(const ArrayView<T>& lhs, const ArrayView<U>& rhs) {
|
||||
}
|
||||
|
||||
template<typename T, typename TContainer>
|
||||
bool operator==(const ArrayView<T>& lhs, const TContainer& rhs) {
|
||||
typename std::enable_if<!std::is_base_of<ArrayView<T>, TContainer>::value, bool>::type operator==(const ArrayView<T>& lhs,
|
||||
const TContainer& rhs) {
|
||||
if (lhs.size() != rhs.size()) {
|
||||
return false;
|
||||
}
|
||||
@ -207,17 +215,20 @@ bool operator==(const ArrayView<T>& lhs, const TContainer& rhs) {
|
||||
}
|
||||
|
||||
template<typename T, typename TContainer>
|
||||
bool operator!=(const ArrayView<T>& lhs, const TContainer& rhs) {
|
||||
typename std::enable_if<!std::is_base_of<ArrayView<T>, TContainer>::value, bool>::type operator!=(const ArrayView<T>& lhs,
|
||||
const TContainer& rhs) {
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
template<typename T, typename TContainer>
|
||||
bool operator==(const TContainer& lhs, const ArrayView<T>& rhs) {
|
||||
typename std::enable_if<!std::is_base_of<ArrayView<T>, TContainer>::value, bool>::type operator==(const TContainer& lhs,
|
||||
const ArrayView<T>& rhs) {
|
||||
return (rhs == lhs);
|
||||
}
|
||||
|
||||
template<typename T, typename TContainer>
|
||||
bool operator!=(const TContainer& lhs, const ArrayView<T>& rhs) {
|
||||
typename std::enable_if<!std::is_base_of<ArrayView<T>, TContainer>::value, bool>::type operator!=(const TContainer& lhs,
|
||||
const ArrayView<T>& rhs) {
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
|
@ -32,12 +32,4 @@ class StringView : public trust::ConstArrayView<char> {
|
||||
|
||||
};
|
||||
|
||||
inline bool operator==(const StringView& lhs, const StringView& rhs) {
|
||||
return (static_cast<const StringView::Base&>(lhs) == static_cast<const StringView::Base&>(rhs));
|
||||
}
|
||||
|
||||
inline bool operator!=(const StringView& lhs, const StringView& rhs) {
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
} // namespace dna
|
||||
|
@ -70,7 +70,7 @@ void JointFilter::apply(RawBehavior& dest) {
|
||||
}
|
||||
}
|
||||
// Collect row indices of removed output indices to be used for joint delta removal
|
||||
Set<std::size_t> rowsToDelete{memRes};
|
||||
UnorderedSet<std::size_t> rowsToDelete{memRes};
|
||||
// Remove output indices belonging to the deletable joint
|
||||
extd::filter(jointGroup.outputIndices, [this, &rowsToDelete](std::uint16_t outputIndex, std::size_t rowIndex) {
|
||||
const auto jointIndex = static_cast<std::uint16_t>(outputIndex / jointAttributeCount);
|
||||
|
@ -3,11 +3,26 @@
|
||||
#include "dnacalib/commands/CalculateMeshLowerLODsCommand.h"
|
||||
|
||||
#include "dnacalib/CommandImplBase.h"
|
||||
#include "dnacalib/commands/CalculateMeshLowerLODsCommandImpl.h"
|
||||
#include "dnacalib/dna/DNA.h"
|
||||
#include "dnacalib/dna/DNACalibDNAReaderImpl.h"
|
||||
#include "dnacalib/types/Aliases.h"
|
||||
#include "dnacalib/types/UVBarycentricMapping.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable : 4365 4987)
|
||||
#endif
|
||||
#include <algorithm>
|
||||
#include <cstddef>
|
||||
#include <cstdio>
|
||||
#include <iterator>
|
||||
#include <limits>
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
|
||||
namespace dnac {
|
||||
|
||||
class CalculateMeshLowerLODsCommand::Impl : public CommandImplBase<Impl> {
|
||||
@ -25,7 +40,16 @@ class CalculateMeshLowerLODsCommand::Impl : public CommandImplBase<Impl> {
|
||||
}
|
||||
|
||||
void run(DNACalibDNAReaderImpl* output) {
|
||||
UVBarycentricMapping mapping{output, meshIndex, getMemoryResource()};
|
||||
auto faceGetter = std::bind(&dna::Reader::getFaceVertexLayoutIndices, output, meshIndex, std::placeholders::_1);
|
||||
const auto layoutPositions = output->getVertexLayoutPositionIndices(meshIndex);
|
||||
const auto layoutTexCoords = output->getVertexLayoutTextureCoordinateIndices(meshIndex);
|
||||
const auto origMappingUs = output->getVertexTextureCoordinateUs(meshIndex);
|
||||
const auto mappingVs = output->getVertexTextureCoordinateVs(meshIndex);
|
||||
const auto mappingUs = deduplicateTextureCoordinates(origMappingUs, mappingVs);
|
||||
const auto faceCount = output->getFaceCount(meshIndex);
|
||||
|
||||
UVBarycentricMapping mapping{faceGetter, layoutPositions, layoutTexCoords, mappingUs, mappingVs, faceCount,
|
||||
getMemoryResource()};
|
||||
|
||||
auto srcMeshXs = output->getVertexPositionXs(meshIndex);
|
||||
auto srcMeshYs = output->getVertexPositionYs(meshIndex);
|
||||
@ -36,51 +60,83 @@ class CalculateMeshLowerLODsCommand::Impl : public CommandImplBase<Impl> {
|
||||
};
|
||||
|
||||
for (std::uint16_t mi : findIndicesOfMeshLowerLODs(output)) {
|
||||
auto vertexLayoutPositionIndices = output->getVertexLayoutPositionIndices(mi);
|
||||
auto vertexLayoutTextureCoordinateIndices = output->getVertexLayoutTextureCoordinateIndices(mi);
|
||||
auto us = output->getVertexTextureCoordinateUs(mi);
|
||||
auto vs = output->getVertexTextureCoordinateVs(mi);
|
||||
const auto vertexLayoutPositionIndices = output->getVertexLayoutPositionIndices(mi);
|
||||
const auto vertexLayoutTextureCoordinateIndices = output->getVertexLayoutTextureCoordinateIndices(mi);
|
||||
const auto vs = output->getVertexTextureCoordinateVs(mi);
|
||||
const auto us = deduplicateTextureCoordinates(output->getVertexTextureCoordinateUs(mi), vs);
|
||||
const std::uint32_t positionCount = output->getVertexPositionCount(mi);
|
||||
RawVector3Vector destVertexPositions {positionCount, {}, getMemoryResource()};
|
||||
// As there can be multiple VertexLayout per each VertexPosition we will use arithmetic mean value.
|
||||
Vector<uint8_t> vertexLayoutsPerPosition{positionCount, {}, getMemoryResource()};
|
||||
Vector<std::uint8_t> vertexLayoutsPerPosition{positionCount, {}, getMemoryResource()};
|
||||
|
||||
for (std::size_t i = 0u; i < vertexLayoutPositionIndices.size(); ++i) {
|
||||
const std::uint32_t uvIndex = vertexLayoutTextureCoordinateIndices[i];
|
||||
for (std::uint32_t vli = 0u; vli < vertexLayoutPositionIndices.size(); ++vli) {
|
||||
std::uint32_t uvIndex = vertexLayoutTextureCoordinateIndices[vli];
|
||||
const fvec2 uvs = {us[uvIndex], vs[uvIndex]};
|
||||
const auto weightsIndicesPair = mapping.getBarycentric(uvs);
|
||||
const fvec3& barycentric = weightsIndicesPair.first;
|
||||
auto srcVtxIndices = weightsIndicesPair.second;
|
||||
fvec3 barycentric = std::get<0>(weightsIndicesPair);
|
||||
auto srcVtxIndices = std::get<1>(weightsIndicesPair);
|
||||
|
||||
if (srcVtxIndices.size() == 0) {
|
||||
// We'll need to handle this case in the future?
|
||||
assert(false && "Could not map a vertex, did not hit any triangle's bounding box.");
|
||||
continue;
|
||||
// We didn't hit any triangle. We aim to identify the nearest face to this UV, ensuring
|
||||
// that the selected face has an intersection with at least one of the adjacent faces of the vertex we are
|
||||
// projecting.
|
||||
float minDistance = std::numeric_limits<float>::max();
|
||||
std::uint32_t sourceTriangleIndex = std::numeric_limits<std::uint32_t>::max();
|
||||
// First we find all of the faces that are adjacent to this vertex
|
||||
for (std::uint32_t fi = 0u; fi < output->getFaceCount(mi); fi++) {
|
||||
const auto face = output->getFaceVertexLayoutIndices(mi, fi);
|
||||
if (std::find(face.begin(), face.end(), vli) == face.end()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Gather all vertex UVs from this face and create a bounding box from it
|
||||
Vector<fvec2> UVs{getMemoryResource()};
|
||||
for (const auto vertexLayoutIndex : face) {
|
||||
uvIndex = vertexLayoutTextureCoordinateIndices[vertexLayoutIndex];
|
||||
UVs.emplace_back(us[uvIndex], vs[uvIndex]);
|
||||
}
|
||||
const BoundingBox faceBoundingBox{UVs};
|
||||
|
||||
// Find the closest triangle that has intersection with this face
|
||||
auto bBoxes = mapping.getBoundingBoxes();
|
||||
for (std::uint32_t bi = 0u; bi < bBoxes.size(); bi++) {
|
||||
const auto& bBox = bBoxes[bi];
|
||||
if (bBox.overlaps(faceBoundingBox)) {
|
||||
const float distance = bBox.distance(uvs);
|
||||
if (distance < minDistance) {
|
||||
minDistance = distance;
|
||||
sourceTriangleIndex = bi;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (sourceTriangleIndex != std::numeric_limits<std::uint32_t>::max()) {
|
||||
barycentric = mapping.getTriangle(sourceTriangleIndex).getBarycentricCoords(uvs);
|
||||
srcVtxIndices = mapping.getTrianglePositionIndices(sourceTriangleIndex);
|
||||
} else {
|
||||
assert(false && "Could not map a vertex. It is not within a face of higher lod.");
|
||||
continue;
|
||||
}
|
||||
}
|
||||
const fvec3 src =
|
||||
getSrcVertex(srcVtxIndices[0]) * barycentric[0] +
|
||||
getSrcVertex(srcVtxIndices[1]) * barycentric[1] +
|
||||
getSrcVertex(srcVtxIndices[2]) * barycentric[2];
|
||||
|
||||
const uint32_t positionIndex = vertexLayoutPositionIndices[i];
|
||||
const uint32_t positionIndex = vertexLayoutPositionIndices[vli];
|
||||
float& destX = destVertexPositions.xs[positionIndex];
|
||||
float& destY = destVertexPositions.ys[positionIndex];
|
||||
float& destZ = destVertexPositions.zs[positionIndex];
|
||||
|
||||
const auto vtxLayoutCount = ++vertexLayoutsPerPosition[positionIndex];
|
||||
// We require mean average, more than one vertexLayout for this vertex position
|
||||
const auto lastDenominator = static_cast<float>(vtxLayoutCount - 1u);
|
||||
const auto newDenominator = static_cast<float>(vtxLayoutCount);
|
||||
destX = (destX * lastDenominator + src[0]) / newDenominator;
|
||||
destY = (destY * lastDenominator + src[1]) / newDenominator;
|
||||
destZ = (destZ * lastDenominator + src[2]) / newDenominator;
|
||||
|
||||
if (vtxLayoutCount == 1) {
|
||||
destX = src[0];
|
||||
destY = src[1];
|
||||
destZ = src[2];
|
||||
} else {
|
||||
// We require mean average, more than one vertexLayout for this vertex position
|
||||
const auto lastDenominator = static_cast<float>(vtxLayoutCount - 1u);
|
||||
const auto newDenominator = static_cast<float>(vtxLayoutCount);
|
||||
destX = (destX * lastDenominator + src[0]) / newDenominator;
|
||||
destY = (destY * lastDenominator + src[1]) / newDenominator;
|
||||
destZ = (destZ * lastDenominator + src[2]) / newDenominator;
|
||||
}
|
||||
}
|
||||
output->setVertexPositions(mi, std::move(destVertexPositions));
|
||||
}
|
||||
@ -113,12 +169,23 @@ class CalculateMeshLowerLODsCommand::Impl : public CommandImplBase<Impl> {
|
||||
}
|
||||
}
|
||||
} else {
|
||||
isLowerLOD = std::find(lodMeshIndices.begin(), lodMeshIndices.end(), meshIndex) != lodMeshIndices.end();
|
||||
isLowerLOD =
|
||||
std::find(lodMeshIndices.begin(), lodMeshIndices.end(), meshIndex) != lodMeshIndices.end();
|
||||
}
|
||||
}
|
||||
return lowerLODIndices;
|
||||
}
|
||||
|
||||
Vector<float> deduplicateTextureCoordinates(ConstArrayView<float> us, ConstArrayView<float> vs) {
|
||||
Vector<float> usCopy{us.begin(), us.end(), getMemoryResource()};
|
||||
if (isUVMapOverlapping(us, vs)) {
|
||||
// The offset function will not modify those given arrays for which the specified offset is 0.0
|
||||
// So const_cast-ing here is just to satisfy the compiler, not for modifying the data sneakily.
|
||||
offsetOverlappingUVMapRegion(usCopy, {const_cast<float*>(vs.data()), vs.size()}, 1.0f, 0.0f);
|
||||
}
|
||||
return usCopy;
|
||||
}
|
||||
|
||||
private:
|
||||
std::uint16_t meshIndex;
|
||||
};
|
||||
|
@ -0,0 +1,62 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
#include "dnacalib/commands/CalculateMeshLowerLODsCommandImpl.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <cstddef>
|
||||
|
||||
namespace dnac {
|
||||
|
||||
inline bool near(float a, float b, float threshold) {
|
||||
return std::fabs(a - b) < threshold;
|
||||
}
|
||||
|
||||
bool isUVMapOverlapping(ConstArrayView<float> us,
|
||||
ConstArrayView<float> vs,
|
||||
std::size_t overlapCountThreshold,
|
||||
float uvCompareThreshold) {
|
||||
// Quick heuristic to check if the UV is really mirrored into the upper half of the array,
|
||||
// if first N matches, it will be considered a total match and deduplication should proceed
|
||||
assert(us.size() == vs.size());
|
||||
|
||||
if ((us.size() % 2ul) != 0ul) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const std::size_t half = (us.size() / 2ul);
|
||||
for (std::size_t i = {}; i < std::min(half, overlapCountThreshold); ++i) {
|
||||
bool found = false;
|
||||
for (std::size_t j = half; j < us.size(); ++j) {
|
||||
if (near(us[i], us[j], uvCompareThreshold) && near(vs[i], vs[j], uvCompareThreshold)) {
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void offsetOverlappingUVMapRegion(ArrayView<float> us, ArrayView<float> vs, float uOffset, float vOffset,
|
||||
float uvCompareThreshold) {
|
||||
assert(us.size() == vs.size());
|
||||
const std::size_t half = (us.size() / 2ul);
|
||||
for (std::size_t i = {}; i < half; ++i) {
|
||||
for (std::size_t j = half; j < us.size(); ++j) {
|
||||
if (near(us[i], us[j], uvCompareThreshold) && near(vs[i], vs[j], uvCompareThreshold)) {
|
||||
if (uOffset != 0.0f) {
|
||||
us[i] += uOffset;
|
||||
}
|
||||
if (vOffset != 0.0f) {
|
||||
vs[i] += vOffset;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace dnac
|
@ -0,0 +1,19 @@
|
||||
// Copyright Epic Games, Inc. All Rights Reserved.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "dnacalib/types/Aliases.h"
|
||||
|
||||
namespace dnac {
|
||||
|
||||
bool isUVMapOverlapping(ConstArrayView<float> us,
|
||||
ConstArrayView<float> vs,
|
||||
std::size_t overlapCountThreshold = 10ul,
|
||||
float uvCompareThreshold = 0.0002f);
|
||||
void offsetOverlappingUVMapRegion(ArrayView<float> us,
|
||||
ArrayView<float> vs,
|
||||
float uOffset = 1.0f,
|
||||
float vOffset = 0.0f,
|
||||
float uvCompareThreshold = 0.0002f);
|
||||
|
||||
} // namespace dnac
|
@ -70,7 +70,7 @@ void JointFilter::apply(RawBehavior& dest) {
|
||||
}
|
||||
}
|
||||
// Collect row indices of removed output indices to be used for joint delta removal
|
||||
Set<std::size_t> rowsToDelete{memRes};
|
||||
UnorderedSet<std::size_t> rowsToDelete{memRes};
|
||||
// Remove output indices belonging to the deletable joint
|
||||
extd::filter(jointGroup.outputIndices, [this, &rowsToDelete](std::uint16_t outputIndex, std::size_t rowIndex) {
|
||||
const auto jointIndex = static_cast<std::uint16_t>(outputIndex / jointAttributeCount);
|
||||
|
@ -42,11 +42,22 @@ class BoundingBox {
|
||||
BoundingBox(std::begin(container), std::end(container), alpha) {
|
||||
}
|
||||
|
||||
bool contains(const fvec2& point) const {
|
||||
bool contains(fvec2 point) const {
|
||||
return point[0] >= min[0] && point[0] <= max[0] &&
|
||||
point[1] >= min[1] && point[1] <= max[1];
|
||||
}
|
||||
|
||||
float distance(fvec2 point) const {
|
||||
const float dx = std::max({min[0] - point[0], 0.0f, point[0] - max[0]});
|
||||
const float dy = std::max({min[1] - point[1], 0.0f, point[1] - max[1]});
|
||||
return std::sqrt(dx * dx + dy * dy);
|
||||
}
|
||||
|
||||
bool overlaps(const BoundingBox& other) const {
|
||||
return (max[0] >= other.min[0] && other.max[0] >= min[0]) &&
|
||||
(max[1] >= other.min[1] && other.max[1] >= min[1]);
|
||||
}
|
||||
|
||||
fvec2 getMin() const {
|
||||
return min;
|
||||
}
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "dnacalib/types/Aliases.h"
|
||||
#include "dnacalib/TypeDefs.h"
|
||||
|
||||
#include <array>
|
||||
@ -15,12 +14,6 @@ class Triangle {
|
||||
Triangle(const fvec2& a, const fvec2& b, const fvec2& c);
|
||||
explicit Triangle(const std::array<fvec2, 3>& vertices);
|
||||
|
||||
Triangle(const Triangle& triangle) = default;
|
||||
Triangle& operator=(const Triangle& triangle) = default;
|
||||
|
||||
Triangle(Triangle&&) = default;
|
||||
Triangle& operator=(Triangle&& triangle) = default;
|
||||
|
||||
fvec3 getBarycentricCoords(const fvec2& point) const;
|
||||
|
||||
fvec2 A() const;
|
||||
|
@ -12,73 +12,74 @@ UVBarycentricMapping::UVBarycentricMapping(const std::function<ConstArrayView<st
|
||||
std::uint32_t faceCount,
|
||||
MemoryResource* memRes) :
|
||||
triangles{memRes},
|
||||
bBoxes{memRes} {
|
||||
trianglePositionIndices{memRes} {
|
||||
|
||||
auto estimatedTriangleCount = static_cast<std::size_t>(static_cast<float>(faceCount) * 2.5f);
|
||||
triangles.reserve(estimatedTriangleCount);
|
||||
bBoxes.reserve(estimatedTriangleCount);
|
||||
for (std::uint32_t i = 0u; i < faceCount; i++) {
|
||||
auto face = faceGetter(i);
|
||||
while (face.size() > 2) {
|
||||
const auto vertexLayoutIndex0 = face[0];
|
||||
const auto vertexLayoutIndex1 = face[1];
|
||||
const auto vertexLayoutIndex2 = face[face.size() - 1u];
|
||||
boundingBoxes.reserve(estimatedTriangleCount);
|
||||
trianglePositionIndices.reserve(estimatedTriangleCount);
|
||||
|
||||
const std::array<std::uint32_t, 3> positionIndices {vertexPositionIndices[vertexLayoutIndex0],
|
||||
vertexPositionIndices[vertexLayoutIndex1],
|
||||
vertexPositionIndices[vertexLayoutIndex2]};
|
||||
for (std::uint32_t fi = 0u; fi < faceCount; fi++) {
|
||||
auto face = faceGetter(fi);
|
||||
if (face.size() > 2) {
|
||||
const auto n = face.size();
|
||||
for (std::uint32_t i = 0; i < n - 2; ++i) {
|
||||
for (std::uint32_t j = i + 1; j < n - 1; ++j) {
|
||||
for (std::uint32_t k = j + 1; k < n; ++k) {
|
||||
const auto vli0 = face[i];
|
||||
const auto vli1 = face[j];
|
||||
const auto vli2 = face[k];
|
||||
const std::array<std::uint32_t, 3> positionIndices {vertexPositionIndices[vli0],
|
||||
vertexPositionIndices[vli1],
|
||||
vertexPositionIndices[vli2]};
|
||||
const auto uvIndex0 = textureCoordinateUVIndices[vli0];
|
||||
const auto uvIndex1 = textureCoordinateUVIndices[vli1];
|
||||
const auto uvIndex2 = textureCoordinateUVIndices[vli2];
|
||||
|
||||
const auto uvIndex0 = textureCoordinateUVIndices[vertexLayoutIndex0];
|
||||
const auto uvIndex1 = textureCoordinateUVIndices[vertexLayoutIndex1];
|
||||
const auto uvIndex2 = textureCoordinateUVIndices[vertexLayoutIndex2];
|
||||
|
||||
const std::array<fvec2, 3> UVs = {fvec2{Us[uvIndex0], Vs[uvIndex0]},
|
||||
fvec2{Us[uvIndex1], Vs[uvIndex1]},
|
||||
fvec2{Us[uvIndex2], Vs[uvIndex2]}};
|
||||
|
||||
triangles.emplace_back(Triangle{UVs}, positionIndices);
|
||||
bBoxes.emplace_back(BoundingBox{UVs});
|
||||
face = face.last(face.size() - 1u);
|
||||
}
|
||||
}
|
||||
triangles.shrink_to_fit();
|
||||
bBoxes.shrink_to_fit();
|
||||
}
|
||||
|
||||
UVBarycentricMapping::UVBarycentricMapping(const dna::Reader* reader, std::uint16_t meshIndex, MemoryResource* memRes) :
|
||||
UVBarycentricMapping(std::bind(&dna::Reader::getFaceVertexLayoutIndices, reader, meshIndex, std::placeholders::_1),
|
||||
reader->getVertexLayoutPositionIndices(meshIndex),
|
||||
reader->getVertexLayoutTextureCoordinateIndices(meshIndex),
|
||||
reader->getVertexTextureCoordinateUs(meshIndex),
|
||||
reader->getVertexTextureCoordinateVs(meshIndex),
|
||||
reader->getFaceCount(meshIndex),
|
||||
memRes) {
|
||||
|
||||
}
|
||||
|
||||
ConstArrayView<UVBarycentricMapping::TrianglePositionIndicesPair> UVBarycentricMapping::getTriangles() const {
|
||||
return {triangles.data(), triangles.size()};
|
||||
}
|
||||
|
||||
ConstArrayView<BoundingBox> UVBarycentricMapping::getBoundingBoxes() const {
|
||||
return {bBoxes.data(), bBoxes.size()};
|
||||
}
|
||||
|
||||
UVBarycentricMapping::BarycentricPositionIndicesPair UVBarycentricMapping::getBarycentric(const fvec2& uv) const {
|
||||
BarycentricPositionIndicesPair barycentricPositionsPair;
|
||||
for (std::uint32_t i = 0u; i < bBoxes.size(); i++) {
|
||||
if (bBoxes[i].contains(uv)) {
|
||||
const auto barycentricWeights = triangles[i].first.getBarycentricCoords(uv);
|
||||
// If we don't hit any triangle, we will use one whose bounding box we hit
|
||||
barycentricPositionsPair = {barycentricWeights, ConstArrayView<std::uint32_t>{triangles[i].second}};
|
||||
if ((barycentricWeights[0] >= 0.0f) && (barycentricWeights[0] <= 1.0f) &&
|
||||
(barycentricWeights[1] >= 0.0f) && (barycentricWeights[1] <= 1.0f) &&
|
||||
(barycentricWeights[2] >= 0.0f) && (barycentricWeights[2] <= 1.0f)) {
|
||||
return barycentricPositionsPair;
|
||||
const std::array<fvec2, 3> UVs = {fvec2{Us[uvIndex0], Vs[uvIndex0]},
|
||||
fvec2{Us[uvIndex1], Vs[uvIndex1]},
|
||||
fvec2{Us[uvIndex2], Vs[uvIndex2]}};
|
||||
triangles.emplace_back(UVs);
|
||||
boundingBoxes.emplace_back(UVs);
|
||||
trianglePositionIndices.emplace_back(positionIndices);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return barycentricPositionsPair;
|
||||
triangles.shrink_to_fit();
|
||||
boundingBoxes.shrink_to_fit();
|
||||
trianglePositionIndices.shrink_to_fit();
|
||||
}
|
||||
|
||||
UVBarycentricMapping::BarycentricPositionIndicesPair UVBarycentricMapping::getBarycentric(fvec2 uv) const {
|
||||
const auto isPointInsideTriangle = [](const fvec3& barycentricPoint) {
|
||||
return barycentricPoint[0] > 0.0f && barycentricPoint[1] > 0.0f && barycentricPoint[2] > 0.0f;
|
||||
};
|
||||
for (std::uint32_t i = 0; i < triangles.size(); i++) {
|
||||
const auto& triangle = triangles[i];
|
||||
// we check if point is inside triangle (all barycentric coordinates are positive)
|
||||
if (boundingBoxes[i].contains(uv)) {
|
||||
const auto barycentricPoint = triangle.getBarycentricCoords(uv);
|
||||
if (isPointInsideTriangle(barycentricPoint)) {
|
||||
return BarycentricPositionIndicesPair{barycentricPoint,
|
||||
ConstArrayView<std::uint32_t>{trianglePositionIndices[i]}};
|
||||
}
|
||||
}
|
||||
}
|
||||
return {};
|
||||
}
|
||||
|
||||
const Triangle& UVBarycentricMapping::getTriangle(std::uint32_t index) const {
|
||||
return triangles[index];
|
||||
}
|
||||
|
||||
ConstArrayView<std::uint32_t> UVBarycentricMapping::getTrianglePositionIndices(std::uint32_t index) const {
|
||||
return trianglePositionIndices[index];
|
||||
}
|
||||
|
||||
ConstArrayView<BoundingBox> UVBarycentricMapping::getBoundingBoxes() const {
|
||||
return boundingBoxes;
|
||||
}
|
||||
|
||||
} // namespace dnac
|
||||
|
@ -3,16 +3,15 @@
|
||||
#pragma once
|
||||
|
||||
#include "dnacalib/types/Aliases.h"
|
||||
#include "dnacalib/types/Triangle.h"
|
||||
#include "dnacalib/types/BoundingBox.h"
|
||||
#include "dnacalib/types/Triangle.h"
|
||||
|
||||
namespace dnac {
|
||||
|
||||
|
||||
class UVBarycentricMapping {
|
||||
public:
|
||||
using TrianglePositionIndicesPair = std::pair<Triangle, std::array<std::uint32_t, 3u> >;
|
||||
using BarycentricPositionIndicesPair = std::pair<fvec3, ConstArrayView<std::uint32_t> >;
|
||||
using TrianglePositionIndicesPair = std::tuple<Triangle, std::array<std::uint32_t, 3u> >;
|
||||
using BarycentricPositionIndicesPair = std::tuple<fvec3, ConstArrayView<std::uint32_t> >;
|
||||
|
||||
public:
|
||||
UVBarycentricMapping(const std::function<ConstArrayView<std::uint32_t>(std::uint32_t)>& faceGetter,
|
||||
@ -23,16 +22,15 @@ class UVBarycentricMapping {
|
||||
std::uint32_t faceCount,
|
||||
MemoryResource* memRes);
|
||||
|
||||
explicit UVBarycentricMapping(const dna::Reader* reader, std::uint16_t meshIndex, MemoryResource* memRes);
|
||||
|
||||
ConstArrayView<TrianglePositionIndicesPair> getTriangles() const;
|
||||
BarycentricPositionIndicesPair getBarycentric(fvec2 uv) const;
|
||||
const Triangle& getTriangle(std::uint32_t index) const;
|
||||
ConstArrayView<std::uint32_t> getTrianglePositionIndices(std::uint32_t index) const;
|
||||
ConstArrayView<BoundingBox> getBoundingBoxes() const;
|
||||
|
||||
BarycentricPositionIndicesPair getBarycentric(const fvec2& uv) const;
|
||||
|
||||
private:
|
||||
Vector<TrianglePositionIndicesPair> triangles;
|
||||
Vector<BoundingBox> bBoxes;
|
||||
Vector<Triangle> triangles;
|
||||
Vector<BoundingBox> boundingBoxes;
|
||||
Vector<std::array<std::uint32_t, 3u> > trianglePositionIndices;
|
||||
};
|
||||
|
||||
} // namespace dnac
|
||||
|
@ -2,13 +2,15 @@ set(PYTHON3_EXACT_VERSION "" CACHE STRING "Specify exact python3 version against
|
||||
if(PYTHON3_EXACT_VERSION)
|
||||
set(find_python3_extra_args ${PYTHON3_EXACT_VERSION} EXACT)
|
||||
endif()
|
||||
find_package(Python3 ${find_python3_extra_args} COMPONENTS Development)
|
||||
find_package(Python3 ${find_python3_extra_args} COMPONENTS Development Interpreter)
|
||||
|
||||
set(py_version "py${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}")
|
||||
set(output_dir "${py_version}")
|
||||
set_property(SOURCE DNA.i PROPERTY CPLUSPLUS ON)
|
||||
set_property(SOURCE DNA.i PROPERTY SWIG_MODULE_NAME dna)
|
||||
set_property(SOURCE DNA.i PROPERTY SWIG_FLAGS "-doxygen")
|
||||
|
||||
option(TYPEMAP_DEBUG "Debug deducing of typemaps" OFF)
|
||||
|
||||
if(TYPEMAP_DEBUG)
|
||||
set_property(SOURCE DNA.i PROPERTY SWIG_FLAGS "-debug-tmsearch")
|
||||
endif()
|
||||
@ -19,12 +21,17 @@ swig_add_library(py3dna
|
||||
LANGUAGE
|
||||
python
|
||||
OUTPUT_DIR
|
||||
${CMAKE_BINARY_DIR}/py3bin
|
||||
${CMAKE_BINARY_DIR}/${output_dir}
|
||||
OUTFILE_DIR
|
||||
${CMAKE_BINARY_DIR}/python3
|
||||
SOURCES
|
||||
DNA.i)
|
||||
add_library(PyDNA::py3dna ALIAS py3dna)
|
||||
|
||||
set_property(TARGET py3dna PROPERTY SWIG_USE_TARGET_INCLUDE_DIRECTORIES ON)
|
||||
|
||||
set_target_properties(py3dna PROPERTIES
|
||||
SWIG_USE_TARGET_INCLUDE_DIRECTORIES ON
|
||||
SWIG_COMPILE_DEFINITIONS DNA_BUILD_WITH_JSON_SUPPORT=ON)
|
||||
target_compile_definitions(py3dna PRIVATE DNA_BUILD_WITH_JSON_SUPPORT=ON)
|
||||
target_include_directories(py3dna PUBLIC ${CMAKE_CURRENT_LIST_DIR})
|
||||
target_link_libraries(py3dna
|
||||
PUBLIC
|
||||
@ -33,14 +40,31 @@ target_link_libraries(py3dna
|
||||
PRIVATE
|
||||
Python3::Python)
|
||||
|
||||
add_custom_target(py3dna-distribution ALL
|
||||
DEPENDS
|
||||
py3dna
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/py3bin
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E copy $<TARGET_FILE:py3dna> ${CMAKE_BINARY_DIR}/py3bin
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E copy $<TARGET_FILE:DNACalib::dnacalib> ${CMAKE_BINARY_DIR}/py3bin
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/examples/demo.py ${CMAKE_BINARY_DIR}/py3bin/dna_demo.py)
|
||||
set(component_name "${PROJECT_NAME}-${py_version}")
|
||||
get_property(wrapper_files TARGET py3dna PROPERTY SWIG_SUPPORT_FILES)
|
||||
install(FILES ${wrapper_files} DESTINATION ${output_dir} COMPONENT ${component_name})
|
||||
install(TARGETS py3dna
|
||||
RUNTIME
|
||||
DESTINATION ${output_dir}
|
||||
COMPONENT ${component_name}
|
||||
LIBRARY
|
||||
DESTINATION ${output_dir}
|
||||
COMPONENT ${component_name}
|
||||
NAMELINK_COMPONENT ${component_name}
|
||||
ARCHIVE
|
||||
DESTINATION ${output_dir}
|
||||
COMPONENT ${component_name})
|
||||
install(FILES ${CMAKE_CURRENT_LIST_DIR}/examples/demo.py DESTINATION ${output_dir} RENAME dna_demo.py COMPONENT ${component_name})
|
||||
|
||||
set(CPACK_COMPONENTS_ALL "${CPACK_COMPONENTS_ALL};${component_name}" PARENT_SCOPE)
|
||||
|
||||
if(WIN32)
|
||||
set(extra_env "PATH=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
|
||||
endif()
|
||||
set(DNA_TEST_NAMES dna_binary_to_json_demo dna_demo)
|
||||
foreach(test_name ${DNA_TEST_NAMES})
|
||||
add_test(NAME ${test_name}
|
||||
COMMAND ${CMAKE_COMMAND} -E env ${extra_env} LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR} PYTHONPATH=. ${Python3_EXECUTABLE} "${CMAKE_CURRENT_LIST_DIR}/../../../examples/${test_name}.py"
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/${output_dir})
|
||||
set_property(TEST ${test_name} PROPERTY PASS_REGULAR_EXPRESSION "Done\.")
|
||||
endforeach()
|
||||
|
@ -1,5 +1,17 @@
|
||||
%module dna
|
||||
|
||||
%pythonbegin
|
||||
%{
|
||||
import os
|
||||
if hasattr(os, 'add_dll_directory'):
|
||||
for path in os.environ.get('PATH', '').split(';'):
|
||||
try:
|
||||
if path:
|
||||
os.add_dll_directory(path)
|
||||
except Exception:
|
||||
pass
|
||||
%}
|
||||
|
||||
%{
|
||||
#include <pma/Defs.h>
|
||||
#include <pma/MemoryResource.h>
|
||||
|
@ -2,13 +2,15 @@ set(PYTHON3_EXACT_VERSION "" CACHE STRING "Specify exact python3 version against
|
||||
if(PYTHON3_EXACT_VERSION)
|
||||
set(find_python3_extra_args ${PYTHON3_EXACT_VERSION} EXACT)
|
||||
endif()
|
||||
find_package(Python3 ${find_python3_extra_args} COMPONENTS Development)
|
||||
find_package(Python3 ${find_python3_extra_args} COMPONENTS Development Interpreter)
|
||||
|
||||
set(py_version "py${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}")
|
||||
set(output_dir "${py_version}")
|
||||
set_property(SOURCE DNACalib.i PROPERTY CPLUSPLUS ON)
|
||||
set_property(SOURCE DNACalib.i PROPERTY SWIG_MODULE_NAME dnacalib)
|
||||
set_property(SOURCE DNACalib.i PROPERTY SWIG_FLAGS "-doxygen")
|
||||
|
||||
option(TYPEMAP_DEBUG "Debug deducing of typemaps" OFF)
|
||||
|
||||
if(TYPEMAP_DEBUG)
|
||||
set_property(SOURCE DNACalib.i PROPERTY SWIG_FLAGS "-debug-tmsearch")
|
||||
endif()
|
||||
@ -19,32 +21,53 @@ swig_add_library(py3dnacalib
|
||||
LANGUAGE
|
||||
python
|
||||
OUTPUT_DIR
|
||||
${CMAKE_BINARY_DIR}/py3bin
|
||||
${CMAKE_BINARY_DIR}/${output_dir}
|
||||
OUTFILE_DIR
|
||||
${CMAKE_BINARY_DIR}/python3
|
||||
SOURCES
|
||||
DNACalib.i)
|
||||
add_library(PyDNACalib::py3dnacalib ALIAS py3dnacalib)
|
||||
|
||||
set_property(TARGET py3dnacalib PROPERTY SWIG_USE_TARGET_INCLUDE_DIRECTORIES ON)
|
||||
|
||||
set_target_properties(py3dnacalib PROPERTIES SWIG_USE_TARGET_INCLUDE_DIRECTORIES ON)
|
||||
target_link_libraries(py3dnacalib
|
||||
PUBLIC
|
||||
py3dna
|
||||
PyDNA::py3dna
|
||||
PRIVATE
|
||||
Spyus::spyus
|
||||
DNACalib::dnacalib
|
||||
Python3::Python)
|
||||
|
||||
add_custom_target(py3dnacalib-distribution ALL
|
||||
DEPENDS
|
||||
py3dnacalib
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/py3bin
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E copy $<TARGET_FILE:py3dnacalib> ${CMAKE_BINARY_DIR}/py3bin
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E copy $<TARGET_FILE:DNACalib::dnacalib> ${CMAKE_BINARY_DIR}/py3bin
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/examples/demo.py ${CMAKE_BINARY_DIR}/py3bin/dnacalib_demo.py
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/examples/remove_joint.py ${CMAKE_BINARY_DIR}/py3bin/dnacalib_remove_joint.py
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_LIST_DIR}/examples/clear_blend_shapes.py ${CMAKE_BINARY_DIR}/py3bin/dnacalib_clear_blend_shapes.py)
|
||||
set(component_name "${PROJECT_NAME}-${py_version}")
|
||||
get_property(wrapper_files TARGET py3dnacalib PROPERTY SWIG_SUPPORT_FILES)
|
||||
install(FILES ${wrapper_files} DESTINATION ${output_dir} COMPONENT ${component_name})
|
||||
install(TARGETS py3dnacalib
|
||||
RUNTIME
|
||||
DESTINATION ${output_dir}
|
||||
COMPONENT ${component_name}
|
||||
LIBRARY
|
||||
DESTINATION ${output_dir}
|
||||
COMPONENT ${component_name}
|
||||
NAMELINK_COMPONENT ${component_name}
|
||||
ARCHIVE
|
||||
DESTINATION ${output_dir}
|
||||
COMPONENT ${component_name})
|
||||
install(FILES ${CMAKE_CURRENT_LIST_DIR}/examples/clear_blend_shapes.py DESTINATION ${output_dir}/examples RENAME dnacalib_clear_blend_shapes.py COMPONENT ${component_name})
|
||||
install(FILES ${CMAKE_CURRENT_LIST_DIR}/examples/demo.py DESTINATION ${output_dir}/examples RENAME dnacalib_demo.py COMPONENT ${component_name})
|
||||
install(FILES ${CMAKE_CURRENT_LIST_DIR}/examples/remove_joint.py DESTINATION ${output_dir}/examples RENAME dnacalib_remove_joint.py COMPONENT ${component_name})
|
||||
set(CPACK_COMPONENTS_ALL "${CPACK_COMPONENTS_ALL};${component_name}" PARENT_SCOPE)
|
||||
|
||||
if(WIN32)
|
||||
set(extra_env "PATH=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
|
||||
endif()
|
||||
set(DNACALIB_TEST_NAMES dnacalib_clear_blend_shapes
|
||||
dnacalib_demo
|
||||
dnacalib_lod_demo
|
||||
dnacalib_neutral_mesh_subtract
|
||||
dnacalib_remove_joint
|
||||
dnacalib_rename_joint_demo)
|
||||
foreach(test_name ${DNACALIB_TEST_NAMES})
|
||||
add_test(NAME ${test_name}
|
||||
COMMAND ${CMAKE_COMMAND} -E env ${extra_env} LD_LIBRARY_PATH=${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR} PYTHONPATH=. ${Python3_EXECUTABLE} "${CMAKE_CURRENT_LIST_DIR}/../../../examples/${test_name}.py"
|
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/${output_dir})
|
||||
set_property(TEST ${test_name} PROPERTY PASS_REGULAR_EXPRESSION "Done\.")
|
||||
endforeach()
|
||||
|
@ -1,5 +1,17 @@
|
||||
%module dnacalib
|
||||
|
||||
%pythonbegin
|
||||
%{
|
||||
import os
|
||||
if hasattr(os, 'add_dll_directory'):
|
||||
for path in os.environ.get('PATH', '').split(';'):
|
||||
try:
|
||||
if path:
|
||||
os.add_dll_directory(path)
|
||||
except Exception:
|
||||
pass
|
||||
%}
|
||||
|
||||
%include <exception.i>
|
||||
%include <stdint.i>
|
||||
|
||||
|
@ -171,28 +171,59 @@ class name(object):
|
||||
%enddef
|
||||
|
||||
%pythoncode %{
|
||||
def __new_decorator(factory_func, original_new):
|
||||
@staticmethod
|
||||
def __new(cls, *args, **kwargs):
|
||||
# FIXME: while this workaround solves the immediate issue with the set of classes we currently have,
|
||||
# it will fail for classes that use a factory function but need no parameters at all, in which case
|
||||
# the factory function will never be invoked, only the original __new__ function.
|
||||
if args or kwargs:
|
||||
return factory_func(*args, **kwargs)
|
||||
return original_new(cls)
|
||||
return __new
|
||||
def with_metaclass(meta, *bases):
|
||||
class metaclass(type):
|
||||
|
||||
def __managed_init(self, *args, **kwargs):
|
||||
self._args = args
|
||||
self._kwargs = kwargs
|
||||
def __new__(cls, name, this_bases, d):
|
||||
return meta(name, bases, d)
|
||||
|
||||
@classmethod
|
||||
def __prepare__(cls, name, this_bases):
|
||||
return meta.__prepare__(name, bases)
|
||||
return type.__new__(metaclass, 'temporary_class', (), {})
|
||||
%}
|
||||
|
||||
%define pythonize_unmanaged_type(type, creator, destroyer)
|
||||
%define pythonize_unmanaged_type(typename, creator, destroyer)
|
||||
%pythoncode %{
|
||||
type ## .__new__ = __new_decorator(type ## _ ## creator, type ## .__new__)
|
||||
type ## .__del__ = lambda instance: type ## _ ## destroyer ## (instance)
|
||||
type ## .__init__ = __managed_init
|
||||
del type ## .creator
|
||||
del type ## .destroyer
|
||||
typename ## Impl = typename
|
||||
|
||||
class typename ## ImplReflectionMixin(type):
|
||||
|
||||
def __getattr__(cls, name):
|
||||
return getattr(typename ## Impl, name)
|
||||
|
||||
def __dir__(cls):
|
||||
return [name for name in dir(typename ## Impl) if name not in (#creator, #destroyer)]
|
||||
|
||||
class typename(with_metaclass(typename ## ImplReflectionMixin, object)):
|
||||
__slots__ = ('_args', '_kwargs', '_instance')
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
self._args = args
|
||||
self._kwargs = kwargs
|
||||
self._instance = typename ## Impl. ## creator(*args, **kwargs)
|
||||
|
||||
def __del__(self):
|
||||
typename ## Impl. ## destroyer(self._instance)
|
||||
|
||||
def _in_slots(self, attr):
|
||||
for cls in type(self).__mro__:
|
||||
if attr in getattr(cls, '__slots__', []):
|
||||
return True
|
||||
return False
|
||||
|
||||
def __getattr__(self, attr):
|
||||
if self._in_slots(attr):
|
||||
return object.__getattr__(self, attr)
|
||||
return getattr(self._instance, attr)
|
||||
|
||||
def __setattr__(self, attr, value):
|
||||
if self._in_slots(attr):
|
||||
object.__setattr__(self, attr, value)
|
||||
else:
|
||||
setattr(self._instance, attr, value)
|
||||
|
||||
def __dir__(self):
|
||||
return [name for name in self._instance.__dir__() if name not in (#creator, #destroyer)]
|
||||
%}
|
||||
%enddef
|
||||
|
@ -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`](/data/additional_assemble_script.
|
||||
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](/data/mh4/gui.ma), updated [assemble script](/data/mh4/additional_assemble_script.py) and example of Ada’s [DNA file](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.
|
@ -20,7 +20,7 @@ NOTE: If OUTPUT_DIR does not exist, it will be created.
|
||||
from os import makedirs
|
||||
from os import path as ospath
|
||||
|
||||
# if you use Maya, use absolute path
|
||||
# If you use Maya, use absolute path
|
||||
ROOT_DIR = f"{ospath.dirname(ospath.abspath(__file__))}/..".replace("\\", "/")
|
||||
OUTPUT_DIR = f"{ROOT_DIR}/output"
|
||||
|
||||
@ -75,6 +75,7 @@ def save_dna(reader, path):
|
||||
def create_json_dna(input_path, output_path):
|
||||
dna_reader = load_dna(input_path)
|
||||
save_dna(dna_reader, output_path)
|
||||
print('Done.')
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
@ -21,7 +21,7 @@ NOTE: If OUTPUT_DIR does not exist, it will be created.
|
||||
from os import makedirs
|
||||
from os import path as ospath
|
||||
|
||||
# if you use Maya, use absolute path
|
||||
# If you use Maya, use absolute path
|
||||
ROOT_DIR = f"{ospath.dirname(ospath.abspath(__file__))}/..".replace("\\", "/")
|
||||
OUTPUT_DIR = f"{ROOT_DIR}/output"
|
||||
|
||||
@ -93,6 +93,7 @@ def create_new_dna(dna_path):
|
||||
create_dna(dna_path)
|
||||
dna_reader = load_dna(dna_path)
|
||||
print_dna_summary(dna_reader)
|
||||
print('Done.')
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
@ -53,10 +53,10 @@ if __name__ == "__main__":
|
||||
|
||||
makedirs(OUTPUT_DIR, exist_ok=True)
|
||||
|
||||
# this fixes warning when calling this script with headless maya Warning: line 1: Unknown object type: HIKCharacterNode
|
||||
# This fixes warning when calling this script with headless maya Warning: line 1: Unknown object type: HIKCharacterNode
|
||||
mel.eval(f"HIKCharacterControlsTool;")
|
||||
|
||||
# generate workspace.mel
|
||||
# Generate workspace.mel
|
||||
mel.eval(f'setProject "{OUTPUT_DIR}";')
|
||||
|
||||
config = RigConfig(
|
||||
@ -70,5 +70,5 @@ if __name__ == "__main__":
|
||||
# Renames and saves the scene
|
||||
cmds.file(rename=f"{OUTPUT_DIR}/{CHARACTER_NAME}.mb")
|
||||
cmds.file(save=True)
|
||||
# copy dna fila and workspace file alongside generated scene
|
||||
# Copy dna file and workspace file alongside generated scene
|
||||
copyfile(CHARACTER_DNA, f"{OUTPUT_DIR}/{CHARACTER_NAME}.dna")
|
||||
|
355
examples/dna_viewer_build_rig_with_textures.py
Normal file
@ -0,0 +1,355 @@
|
||||
"""
|
||||
This example demonstrates generating functional rig based on DNA file in Maya scene with applied textures.
|
||||
Maps added in data folder belong to Ada preset character. User should use source data downloaded from Quixel Bridge.
|
||||
IMPORTANT: You have to setup the environment before running this example. Please refer to the 'Environment setup' section in README.md.
|
||||
|
||||
- usage in command line:
|
||||
mayapy dna_viewer_build_rig_with_textures.py
|
||||
NOTE: Script cannot be called with Python, it must be called with mayapy.
|
||||
|
||||
- usage in Maya:
|
||||
1. copy whole content of this file to Maya Script Editor
|
||||
2. change value of ROOT_DIR to absolute path of dna_calibration, e.g. `c:/dna_calibration` in Windows or `/home/user/dna_calibration`. Important:
|
||||
Use `/` (forward slash), because Maya uses forward slashes in path.
|
||||
"""
|
||||
import time
|
||||
import os
|
||||
|
||||
# if you use Maya, use absolute path
|
||||
ROOT_DIR = f"{os.path.dirname(os.path.abspath(__file__))}/..".replace("\\", "/")
|
||||
DATA_DIR = f"{ROOT_DIR}/data"
|
||||
|
||||
from maya import cmds, mel
|
||||
from dna_viewer import (
|
||||
DNA,
|
||||
RigConfig,
|
||||
build_rig
|
||||
)
|
||||
|
||||
ORIENT_Y = [0.0, 0.0, 0.0]
|
||||
COMMON_MAP_INFOS = [
|
||||
("dx11_diffuseIrradiance", 1),
|
||||
("dx11_jitter", 1),
|
||||
("dx11_skinLUT", 1),
|
||||
("dx11_specularIrradiance", 1),
|
||||
]
|
||||
|
||||
MAP_INFOS = [
|
||||
("head_color", 1),
|
||||
("head_cm1_color", 0),
|
||||
("head_cm2_color", 0),
|
||||
("head_cm3_color", 0),
|
||||
("head_normal", 1),
|
||||
("head_wm1_normal", 0),
|
||||
("head_wm2_normal", 0),
|
||||
("head_wm3_normal", 0),
|
||||
("head_specular", 1),
|
||||
("head_specular_16Bits", 1),
|
||||
("head_occlusion", 1),
|
||||
("head_occlusion_16Bits", 1),
|
||||
("head_cavity", 1),
|
||||
("head_cavity_16Bits", 1),
|
||||
("head_transmission", 1),
|
||||
("head_transmission_16Bits", 1),
|
||||
("head_curvature", 1),
|
||||
("head_curvature_16Bits", 1),
|
||||
("head_position", 1),
|
||||
("head_position_16Bits", 1),
|
||||
("head_worldspace", 1),
|
||||
("head_worldspace_16Bits", 1),
|
||||
("head_bentNormal", 1),
|
||||
("head_bentNormal_16Bits", 1),
|
||||
("teeth_color", 1),
|
||||
("teeth_normal", 1),
|
||||
("eyes_color", 1),
|
||||
("eyeLeft_color", 1),
|
||||
("eyeRight_color", 1),
|
||||
("eyeLeft_normal", 1),
|
||||
("eyeRight_normal", 1),
|
||||
("eyes_color_16Bits", 1),
|
||||
("eyes_normal", 1),
|
||||
("eyes_normal_16Bits", 1),
|
||||
("eyelashes_color", 1),
|
||||
]
|
||||
|
||||
MASKS = [
|
||||
"head_wm1_blink_L",
|
||||
"head_wm1_blink_R",
|
||||
"head_wm1_browsRaiseInner_L",
|
||||
"head_wm1_browsRaiseInner_R",
|
||||
"head_wm1_browsRaiseOuter_L",
|
||||
"head_wm1_browsRaiseOuter_R",
|
||||
"head_wm1_chinRaise_L",
|
||||
"head_wm1_chinRaise_R",
|
||||
"head_wm1_jawOpen",
|
||||
"head_wm1_purse_DL",
|
||||
"head_wm1_purse_DR",
|
||||
"head_wm1_purse_UL",
|
||||
"head_wm1_purse_UR",
|
||||
"head_wm1_squintInner_L",
|
||||
"head_wm1_squintInner_R",
|
||||
"head_wm2_browsDown_L",
|
||||
"head_wm2_browsDown_R",
|
||||
"head_wm2_browsLateral_L",
|
||||
"head_wm2_browsLateral_R",
|
||||
"head_wm2_mouthStretch_L",
|
||||
"head_wm2_mouthStretch_R",
|
||||
"head_wm2_neckStretch_L",
|
||||
"head_wm2_neckStretch_R",
|
||||
"head_wm2_noseWrinkler_L",
|
||||
"head_wm2_noseWrinkler_R",
|
||||
"head_wm3_cheekRaiseInner_L",
|
||||
"head_wm3_cheekRaiseInner_R",
|
||||
"head_wm3_cheekRaiseOuter_L",
|
||||
"head_wm3_cheekRaiseOuter_R",
|
||||
"head_wm3_cheekRaiseUpper_L",
|
||||
"head_wm3_cheekRaiseUpper_R",
|
||||
"head_wm3_smile_L",
|
||||
"head_wm3_smile_R",
|
||||
"head_wm13_lips_DL",
|
||||
"head_wm13_lips_DR",
|
||||
"head_wm13_lips_UL",
|
||||
"head_wm13_lips_UR",
|
||||
]
|
||||
|
||||
MESH_SHADER_MAPPING = {
|
||||
"head_lod": "head_shader",
|
||||
"teeth_lod": "teeth_shader",
|
||||
"saliva_lod": "saliva_shader",
|
||||
"eyeLeft_lod": "eyeLeft_shader",
|
||||
"eyeRight_lod": "eyeRight_shader",
|
||||
"eyeshell_lod": "eyeshell_shader",
|
||||
"eyelashes_lod": "eyelashes_shader",
|
||||
"eyelashesShadow_lod": "eyelashesShadow_shader",
|
||||
"eyeEdge_lod": "eyeEdge_shader",
|
||||
"cartilage_lod": "eyeEdge_shader",
|
||||
}
|
||||
|
||||
SHADERS = ["head_shader", "teeth_shader", "eyeLeft_shader", "eyeRight_shader"]
|
||||
|
||||
SHADER_ATTRIBUTES_MAPPING = {
|
||||
"FRM_WMmultipliers.head_cm2_color_head_wm2_browsDown_L": "shader_head_shader.maskWeight_00",
|
||||
"FRM_WMmultipliers.head_wm2_normal_head_wm2_browsDown_L": "shader_head_shader.maskWeight_01",
|
||||
"FRM_WMmultipliers.head_cm2_color_head_wm2_browsDown_R": "shader_head_shader.maskWeight_02",
|
||||
"FRM_WMmultipliers.head_wm2_normal_head_wm2_browsDown_R": "shader_head_shader.maskWeight_03",
|
||||
"FRM_WMmultipliers.head_cm2_color_head_wm2_browsLateral_L": "shader_head_shader.maskWeight_04",
|
||||
"FRM_WMmultipliers.head_wm2_normal_head_wm2_browsLateral_L": "shader_head_shader.maskWeight_05",
|
||||
"FRM_WMmultipliers.head_cm2_color_head_wm2_browsLateral_R": "shader_head_shader.maskWeight_06",
|
||||
"FRM_WMmultipliers.head_wm2_normal_head_wm2_browsLateral_R": "shader_head_shader.maskWeight_07",
|
||||
"FRM_WMmultipliers.head_cm1_color_head_wm1_browsRaiseInner_L": "shader_head_shader.maskWeight_08",
|
||||
"FRM_WMmultipliers.head_wm1_normal_head_wm1_browsRaiseInner_L": "shader_head_shader.maskWeight_09",
|
||||
"FRM_WMmultipliers.head_cm1_color_head_wm1_browsRaiseInner_R": "shader_head_shader.maskWeight_10",
|
||||
"FRM_WMmultipliers.head_wm1_normal_head_wm1_browsRaiseInner_R": "shader_head_shader.maskWeight_11",
|
||||
"FRM_WMmultipliers.head_cm1_color_head_wm1_browsRaiseOuter_L": "shader_head_shader.maskWeight_12",
|
||||
"FRM_WMmultipliers.head_wm1_normal_head_wm1_browsRaiseOuter_L": "shader_head_shader.maskWeight_13",
|
||||
"FRM_WMmultipliers.head_cm1_color_head_wm1_browsRaiseOuter_R": "shader_head_shader.maskWeight_14",
|
||||
"FRM_WMmultipliers.head_wm1_normal_head_wm1_browsRaiseOuter_R": "shader_head_shader.maskWeight_15",
|
||||
"FRM_WMmultipliers.head_cm1_color_head_wm1_blink_L": "shader_head_shader.maskWeight_16",
|
||||
"FRM_WMmultipliers.head_cm1_color_head_wm1_squintInner_L": "shader_head_shader.maskWeight_17",
|
||||
"FRM_WMmultipliers.head_wm1_normal_head_wm1_blink_L": "shader_head_shader.maskWeight_18",
|
||||
"FRM_WMmultipliers.head_wm1_normal_head_wm1_squintInner_L": "shader_head_shader.maskWeight_19",
|
||||
"FRM_WMmultipliers.head_cm1_color_head_wm1_blink_R": "shader_head_shader.maskWeight_20",
|
||||
"FRM_WMmultipliers.head_cm1_color_head_wm1_squintInner_R": "shader_head_shader.maskWeight_21",
|
||||
"FRM_WMmultipliers.head_wm1_normal_head_wm1_blink_R": "shader_head_shader.maskWeight_22",
|
||||
"FRM_WMmultipliers.head_wm1_normal_head_wm1_squintInner_R": "shader_head_shader.maskWeight_23",
|
||||
"FRM_WMmultipliers.head_cm3_color_head_wm3_cheekRaiseInner_L": "shader_head_shader.maskWeight_24",
|
||||
"FRM_WMmultipliers.head_cm3_color_head_wm3_cheekRaiseOuter_L": "shader_head_shader.maskWeight_25",
|
||||
"FRM_WMmultipliers.head_cm3_color_head_wm3_cheekRaiseUpper_L": "shader_head_shader.maskWeight_26",
|
||||
"FRM_WMmultipliers.head_wm3_normal_head_wm3_cheekRaiseInner_L": "shader_head_shader.maskWeight_27",
|
||||
"FRM_WMmultipliers.head_wm3_normal_head_wm3_cheekRaiseOuter_L": "shader_head_shader.maskWeight_28",
|
||||
"FRM_WMmultipliers.head_wm3_normal_head_wm3_cheekRaiseUpper_L": "shader_head_shader.maskWeight_29",
|
||||
"FRM_WMmultipliers.head_cm3_color_head_wm3_cheekRaiseInner_R": "shader_head_shader.maskWeight_30",
|
||||
"FRM_WMmultipliers.head_cm3_color_head_wm3_cheekRaiseOuter_R": "shader_head_shader.maskWeight_31",
|
||||
"FRM_WMmultipliers.head_cm3_color_head_wm3_cheekRaiseUpper_R": "shader_head_shader.maskWeight_32",
|
||||
"FRM_WMmultipliers.head_wm3_normal_head_wm3_cheekRaiseInner_R": "shader_head_shader.maskWeight_33",
|
||||
"FRM_WMmultipliers.head_wm3_normal_head_wm3_cheekRaiseOuter_R": "shader_head_shader.maskWeight_34",
|
||||
"FRM_WMmultipliers.head_wm3_normal_head_wm3_cheekRaiseUpper_R": "shader_head_shader.maskWeight_35",
|
||||
"FRM_WMmultipliers.head_cm2_color_head_wm2_noseWrinkler_L": "shader_head_shader.maskWeight_36",
|
||||
"FRM_WMmultipliers.head_wm2_normal_head_wm2_noseWrinkler_L": "shader_head_shader.maskWeight_37",
|
||||
"FRM_WMmultipliers.head_cm2_color_head_wm2_noseWrinkler_R": "shader_head_shader.maskWeight_38",
|
||||
"FRM_WMmultipliers.head_wm2_normal_head_wm2_noseWrinkler_R": "shader_head_shader.maskWeight_39",
|
||||
"FRM_WMmultipliers.head_cm3_color_head_wm3_smile_L": "shader_head_shader.maskWeight_40",
|
||||
"FRM_WMmultipliers.head_wm3_normal_head_wm3_smile_L": "shader_head_shader.maskWeight_41",
|
||||
"FRM_WMmultipliers.head_cm1_color_head_wm13_lips_UL": "shader_head_shader.maskWeight_42",
|
||||
"FRM_WMmultipliers.head_cm1_color_head_wm13_lips_UR": "shader_head_shader.maskWeight_43",
|
||||
"FRM_WMmultipliers.head_cm1_color_head_wm13_lips_DL": "shader_head_shader.maskWeight_44",
|
||||
"FRM_WMmultipliers.head_cm1_color_head_wm13_lips_DR": "shader_head_shader.maskWeight_45",
|
||||
"FRM_WMmultipliers.head_wm1_normal_head_wm13_lips_UL": "shader_head_shader.maskWeight_46",
|
||||
"FRM_WMmultipliers.head_wm1_normal_head_wm13_lips_UR": "shader_head_shader.maskWeight_47",
|
||||
"FRM_WMmultipliers.head_wm1_normal_head_wm13_lips_DL": "shader_head_shader.maskWeight_48",
|
||||
"FRM_WMmultipliers.head_wm1_normal_head_wm13_lips_DR": "shader_head_shader.maskWeight_49",
|
||||
"FRM_WMmultipliers.head_cm3_color_head_wm3_smile_R": "shader_head_shader.maskWeight_50",
|
||||
"FRM_WMmultipliers.head_wm3_normal_head_wm3_smile_R": "shader_head_shader.maskWeight_51",
|
||||
"FRM_WMmultipliers.head_cm3_color_head_wm13_lips_UL": "shader_head_shader.maskWeight_52",
|
||||
"FRM_WMmultipliers.head_cm3_color_head_wm13_lips_DL": "shader_head_shader.maskWeight_53",
|
||||
"FRM_WMmultipliers.head_wm3_normal_head_wm13_lips_UL": "shader_head_shader.maskWeight_54",
|
||||
"FRM_WMmultipliers.head_wm3_normal_head_wm13_lips_DL": "shader_head_shader.maskWeight_55",
|
||||
"FRM_WMmultipliers.head_cm3_color_head_wm13_lips_UR": "shader_head_shader.maskWeight_56",
|
||||
"FRM_WMmultipliers.head_cm3_color_head_wm13_lips_DR": "shader_head_shader.maskWeight_57",
|
||||
"FRM_WMmultipliers.head_wm3_normal_head_wm13_lips_UR": "shader_head_shader.maskWeight_58",
|
||||
"FRM_WMmultipliers.head_wm3_normal_head_wm13_lips_DR": "shader_head_shader.maskWeight_59",
|
||||
"FRM_WMmultipliers.head_cm2_color_head_wm2_mouthStretch_L": "shader_head_shader.maskWeight_60",
|
||||
"FRM_WMmultipliers.head_wm2_normal_head_wm2_mouthStretch_L": "shader_head_shader.maskWeight_61",
|
||||
"FRM_WMmultipliers.head_cm2_color_head_wm2_mouthStretch_R": "shader_head_shader.maskWeight_62",
|
||||
"FRM_WMmultipliers.head_wm2_normal_head_wm2_mouthStretch_R": "shader_head_shader.maskWeight_63",
|
||||
"FRM_WMmultipliers.head_cm1_color_head_wm1_purse_UL": "shader_head_shader.maskWeight_64",
|
||||
"FRM_WMmultipliers.head_wm1_normal_head_wm1_purse_UL": "shader_head_shader.maskWeight_65",
|
||||
"FRM_WMmultipliers.head_cm1_color_head_wm1_purse_UR": "shader_head_shader.maskWeight_66",
|
||||
"FRM_WMmultipliers.head_wm1_normal_head_wm1_purse_UR": "shader_head_shader.maskWeight_67",
|
||||
"FRM_WMmultipliers.head_cm1_color_head_wm1_purse_DL": "shader_head_shader.maskWeight_68",
|
||||
"FRM_WMmultipliers.head_wm1_normal_head_wm1_purse_DL": "shader_head_shader.maskWeight_69",
|
||||
"FRM_WMmultipliers.head_cm1_color_head_wm1_purse_DR": "shader_head_shader.maskWeight_70",
|
||||
"FRM_WMmultipliers.head_wm1_normal_head_wm1_purse_DR": "shader_head_shader.maskWeight_71",
|
||||
"FRM_WMmultipliers.head_cm1_color_head_wm1_chinRaise_L": "shader_head_shader.maskWeight_72",
|
||||
"FRM_WMmultipliers.head_wm1_normal_head_wm1_chinRaise_L": "shader_head_shader.maskWeight_73",
|
||||
"FRM_WMmultipliers.head_cm1_color_head_wm1_chinRaise_R": "shader_head_shader.maskWeight_74",
|
||||
"FRM_WMmultipliers.head_wm1_normal_head_wm1_chinRaise_R": "shader_head_shader.maskWeight_75",
|
||||
"FRM_WMmultipliers.head_cm1_color_head_wm1_jawOpen": "shader_head_shader.maskWeight_76",
|
||||
"FRM_WMmultipliers.head_wm1_normal_head_wm1_jawOpen": "shader_head_shader.maskWeight_77",
|
||||
"FRM_WMmultipliers.head_cm2_color_head_wm2_neckStretch_L": "shader_head_shader.maskWeight_78",
|
||||
"FRM_WMmultipliers.head_wm2_normal_head_wm2_neckStretch_L": "shader_head_shader.maskWeight_79",
|
||||
"FRM_WMmultipliers.head_cm2_color_head_wm2_neckStretch_R": "shader_head_shader.maskWeight_80",
|
||||
"FRM_WMmultipliers.head_wm2_normal_head_wm2_neckStretch_R": "shader_head_shader.maskWeight_81",
|
||||
}
|
||||
|
||||
|
||||
# Methods
|
||||
def import_head_shaders(shader_scene_path, shaders_dir_path, masks_dir_path, maps_dir_path):
|
||||
import_shader(shader_scene_path, MESH_SHADER_MAPPING)
|
||||
|
||||
resolve_scene_shader_paths(SHADERS, shaders_dir_path)
|
||||
|
||||
set_mask_textures(MASKS, masks_dir_path)
|
||||
set_map_textures(COMMON_MAP_INFOS, maps_dir_path)
|
||||
set_map_textures(MAP_INFOS, maps_dir_path)
|
||||
|
||||
connect_attributes_to_shader(SHADER_ATTRIBUTES_MAPPING)
|
||||
|
||||
|
||||
def import_shader(shader_scene_path, mesh_shader_mapping):
|
||||
print("Shader scene imported")
|
||||
cmds.file(shader_scene_path, options="v=0", type="mayaAscii", i=True)
|
||||
try:
|
||||
items = mesh_shader_mapping.iteritems()
|
||||
except:
|
||||
items = mesh_shader_mapping.items()
|
||||
for meshName, shaderName in items:
|
||||
for lodLvl in range(0, 8):
|
||||
try:
|
||||
# Apply shader to all meshes based on LOD level
|
||||
resolved_mesh_name = meshName + str(lodLvl) + "_mesh"
|
||||
shader = "shader_" + shaderName
|
||||
cmds.select(resolved_mesh_name, replace=True)
|
||||
mel.eval("sets -e -forceElement " + shader + "SG")
|
||||
except:
|
||||
print("Skipped adding shader for mesh %s." % meshName)
|
||||
|
||||
|
||||
def resolve_scene_shader_paths(shaders, folder_name):
|
||||
for shader in shaders:
|
||||
node_name = "shader_" + shader
|
||||
if not cmds.objExists(node_name):
|
||||
continue
|
||||
file_shader_name = cmds.getAttr(node_name + ".shader")
|
||||
shader_folder_name, shader_file_name = os.path.split(file_shader_name)
|
||||
shader_folder_name = folder_name
|
||||
cmds.setAttr(
|
||||
node_name + ".shader",
|
||||
shader_folder_name + "/" + shader_file_name,
|
||||
type="string",
|
||||
)
|
||||
|
||||
|
||||
def set_mask_textures(masks, folder_name):
|
||||
for mask in masks:
|
||||
node_name = "maskFile_" + mask
|
||||
|
||||
if not cmds.objExists(node_name):
|
||||
continue
|
||||
|
||||
file_texture_name = cmds.getAttr(node_name + ".fileTextureName")
|
||||
texture_folder_name, texture_file_name = os.path.split(file_texture_name)
|
||||
texture_folder_name = folder_name
|
||||
cmds.setAttr(
|
||||
node_name + ".fileTextureName",
|
||||
texture_folder_name + "/" + texture_file_name,
|
||||
type="string",
|
||||
)
|
||||
|
||||
|
||||
def set_map_textures(map_infos, folder_name):
|
||||
for mapInfo in map_infos:
|
||||
node_name = "mapFile_" + mapInfo[0]
|
||||
if mapInfo[1]:
|
||||
node_name = "baseMapFile_" + mapInfo[0]
|
||||
|
||||
if not cmds.objExists(node_name):
|
||||
continue
|
||||
|
||||
file_texture_name = cmds.getAttr(node_name + ".fileTextureName")
|
||||
texture_folder_name, texture_file_name = os.path.split(file_texture_name)
|
||||
texture_folder_name = folder_name
|
||||
cmds.setAttr(
|
||||
node_name + ".fileTextureName",
|
||||
texture_folder_name + "/" + texture_file_name,
|
||||
type="string",
|
||||
)
|
||||
|
||||
|
||||
def connect_attributes_to_shader(shader_attributes_mapping):
|
||||
print("Connecting attributes to shader...")
|
||||
try:
|
||||
items = shader_attributes_mapping.iteritems()
|
||||
except Exception as ex:
|
||||
print(f"Error: {ex}")
|
||||
items = shader_attributes_mapping.items()
|
||||
|
||||
for frm_attribute, shaderAttribute in items:
|
||||
if cmds.objExists(frm_attribute) and cmds.objExists(shaderAttribute):
|
||||
cmds.connectAttr(frm_attribute, shaderAttribute, force=True)
|
||||
|
||||
|
||||
def create_lights(lights_file_path, orient):
|
||||
print("Creating lights...")
|
||||
cmds.file(lights_file_path, defaultNamespace=True, i=True)
|
||||
cmds.xform("Lights", ro=orient)
|
||||
cmds.makeIdentity("Lights", apply=True)
|
||||
|
||||
|
||||
# Define all paths
|
||||
dna_path = f"{DATA_DIR}/mh4/dna_files/Ada.dna"
|
||||
gui_path = f"{DATA_DIR}/mh4/gui.ma"
|
||||
aas_path = f"{DATA_DIR}/mh4/additional_assemble_script.py"
|
||||
ac_path = f"{DATA_DIR}/analog_gui.ma"
|
||||
light_scene = f"{DATA_DIR}/lights.ma"
|
||||
shader_scene = f"{DATA_DIR}/shader.ma"
|
||||
shaders_dir = f"{DATA_DIR}/shaders"
|
||||
masks_dir = f"{DATA_DIR}/masks"
|
||||
maps_dir = f"{DATA_DIR}/maps"
|
||||
output_scene = f"{ROOT_DIR}/output/Ada_rig.mb"
|
||||
|
||||
try:
|
||||
start_time = time.time()
|
||||
|
||||
# open new scene
|
||||
cmds.file(new=True, force=True)
|
||||
|
||||
# import DNA data
|
||||
dna = DNA(dna_path)
|
||||
|
||||
config = RigConfig(
|
||||
gui_path=gui_path,
|
||||
analog_gui_path=ac_path,
|
||||
aas_path=aas_path,
|
||||
)
|
||||
build_rig(dna=dna, config=config)
|
||||
import_head_shaders(shader_scene, shaders_dir, masks_dir, maps_dir)
|
||||
create_lights(light_scene, ORIENT_Y)
|
||||
|
||||
# save scene
|
||||
cmds.file(rename=output_scene)
|
||||
cmds.file(save=True, type="mayaBinary")
|
||||
|
||||
print("--- Import finished in %s seconds ---" % (time.time() - start_time))
|
||||
except Exception as ex:
|
||||
print("Error building scene", ex)
|
@ -49,8 +49,7 @@ ADD_COLOR_VERTEX = False
|
||||
DNA_DIR = f"{DATA_DIR}/dna_files"
|
||||
BODY_DIR = f"{DATA_DIR}/body"
|
||||
CHARACTER_DNA = f"{DNA_DIR}/{CHARACTER_NAME}.dna"
|
||||
ANALOG_GUI = f"{DATA_DIR}/analog_gui.ma"
|
||||
GUI = f"{DATA_DIR}/gui.ma"
|
||||
|
||||
UP_AXIS = "z"
|
||||
if UP_AXIS not in ("z", "y"):
|
||||
raise ValueError("UP_AXIS can be 'z' or 'y'")
|
||||
@ -182,7 +181,7 @@ def create_head_and_body_scene(mesh_names):
|
||||
|
||||
cmds.file(BODY_FILE, options="v=0", type="mayaAscii", i=True)
|
||||
if UP_AXIS == "y":
|
||||
cmds.rotate("-90deg", 0, 0, "root")
|
||||
cmds.joint("root", edit=True, orientation=[-90.0, 0.0, 0.0])
|
||||
for facial_joint, neck_joint in zip(FACIAL_ROOT_JOINTS, NECK_JOINTS):
|
||||
cmds.parent(facial_joint, neck_joint)
|
||||
|
||||
@ -287,14 +286,14 @@ if __name__ == "__main__":
|
||||
# Loads the builtin plugin needed for FBX
|
||||
cmds.loadPlugin("fbxmaya.mll")
|
||||
|
||||
# this fixes warning when calling this script with headless maya Warning: line 1: Unknown object type: HIKCharacterNode
|
||||
# This fixes warning when calling this script with headless maya Warning: line 1: Unknown object type: HIKCharacterNode
|
||||
mel.eval(f"HIKCharacterControlsTool;")
|
||||
|
||||
# generate workspace.mel
|
||||
# Generate workspace.mel
|
||||
mel.eval(f'setProject "{OUTPUT_DIR}";')
|
||||
|
||||
# Export FBX for each lod
|
||||
|
||||
cmds.upAxis(ax=UP_AXIS)
|
||||
dna = get_dna()
|
||||
for lod in range(dna.get_lod_count()):
|
||||
export_fbx_for_lod(dna, lod)
|
||||
|
@ -6,7 +6,7 @@ Follow the steps:
|
||||
|
||||
1. Start Maya
|
||||
2. open maya scene (do 2.1 or 2.2)
|
||||
2.1. Open existing maya scene generated from dna or
|
||||
2.1. Generate new scene using build_meshes or
|
||||
2.2. start DNA Viewer GUI (dna_viewer_run_in_maya.py)
|
||||
- Select DNA file that you want to load and generate scene for
|
||||
- Select meshes that you want to change
|
||||
@ -49,7 +49,7 @@ from os import path as ospath
|
||||
|
||||
CHARACTER_NAME = "Ada"
|
||||
|
||||
# if you use Maya, use absolute path
|
||||
# If you use Maya, use absolute path
|
||||
ROOT_DIR = f"{ospath.dirname(ospath.abspath(__file__))}/..".replace("\\", "/")
|
||||
OUTPUT_DIR = f"{ROOT_DIR}/output"
|
||||
ROOT_LIB_DIR = f"{ROOT_DIR}/lib"
|
||||
@ -79,7 +79,7 @@ from dnacalib import (
|
||||
VectorOperation_Add,
|
||||
)
|
||||
|
||||
from dna_viewer import DNA, RigConfig, build_rig
|
||||
from dna_viewer import DNA, RigConfig, build_rig, build_meshes
|
||||
|
||||
|
||||
def load_dna_reader(path):
|
||||
@ -142,9 +142,9 @@ def run_joints_command(reader, calibrated):
|
||||
rotation = cmds.joint(joint_name, query=True, orientation=True)
|
||||
joint_rotations.append(rotation)
|
||||
|
||||
# this is step 5 sub-step a
|
||||
# This is step 5 sub-step a
|
||||
set_new_joints_translations = SetNeutralJointTranslationsCommand(joint_translations)
|
||||
# this is step 5 sub-step b
|
||||
# This is step 5 sub-step b
|
||||
set_new_joints_rotations = SetNeutralJointRotationsCommand(joint_rotations)
|
||||
|
||||
# Abstraction to collect all commands into a sequence, and run them with only one invocation
|
||||
@ -154,7 +154,7 @@ def run_joints_command(reader, calibrated):
|
||||
commands.add(set_new_joints_rotations)
|
||||
|
||||
commands.run(calibrated)
|
||||
# verify that everything went fine
|
||||
# Verify that everything went fine
|
||||
if not Status.isOk():
|
||||
status = Status.get()
|
||||
raise RuntimeError(f"Error run_joints_command: {status.message}")
|
||||
@ -163,7 +163,7 @@ def run_joints_command(reader, calibrated):
|
||||
def run_vertices_command(
|
||||
calibrated, old_vertices_positions, new_vertices_positions, mesh_index
|
||||
):
|
||||
# making deltas between old vertices positions and new one
|
||||
# Making deltas between old vertices positions and new one
|
||||
deltas = []
|
||||
for new_vertex, old_vertex in zip(new_vertices_positions, old_vertices_positions):
|
||||
delta = []
|
||||
@ -171,7 +171,7 @@ def run_vertices_command(
|
||||
delta.append(new - old)
|
||||
deltas.append(delta)
|
||||
|
||||
# this is step 5 sub-step c
|
||||
# This is step 5 sub-step c
|
||||
new_neutral_mesh = SetVertexPositionsCommand(
|
||||
mesh_index, deltas, VectorOperation_Add
|
||||
)
|
||||
@ -180,7 +180,7 @@ def run_vertices_command(
|
||||
commands.add(new_neutral_mesh)
|
||||
commands.run(calibrated)
|
||||
|
||||
# verify that everything went fine
|
||||
# Verify that everything went fine
|
||||
if not Status.isOk():
|
||||
status = Status.get()
|
||||
raise RuntimeError(f"Error run_vertices_command: {status.message}")
|
||||
@ -202,14 +202,20 @@ def assemble_maya_scene():
|
||||
makedirs(OUTPUT_DIR, exist_ok=True)
|
||||
|
||||
dna = DNA(CHARACTER_DNA)
|
||||
config = RigConfig(
|
||||
gui_path=f"{DATA_DIR}/gui.ma",
|
||||
analog_gui_path=f"{DATA_DIR}/analog_gui.ma",
|
||||
aas_path=ADDITIONAL_ASSEMBLE_SCRIPT,
|
||||
)
|
||||
build_rig(dna=dna, config=config)
|
||||
##################################
|
||||
# This is step 2 sub-step 1
|
||||
# use this block only if you need to assemble of scene from step 2.1
|
||||
# config = RigConfig(
|
||||
# gui_path=f"{DATA_DIR}/gui.ma",
|
||||
# analog_gui_path=f"{DATA_DIR}/analog_gui.ma",
|
||||
# aas_path=ADDITIONAL_ASSEMBLE_SCRIPT,
|
||||
# )
|
||||
# build_meshes(dna=dna, config=config)
|
||||
# This is end of step 2 sub-step 1
|
||||
##################################
|
||||
|
||||
# this is step 3 sub-step a
|
||||
|
||||
# This is step 3 sub-step a
|
||||
current_vertices_positions = {}
|
||||
mesh_indices = []
|
||||
for mesh_index, name in enumerate(dna.meshes.names):
|
||||
@ -217,15 +223,15 @@ for mesh_index, name in enumerate(dna.meshes.names):
|
||||
"mesh_index": mesh_index,
|
||||
"positions": get_mesh_vertex_positions_from_scene(name),
|
||||
}
|
||||
# loaded data - end of 3rd step
|
||||
# Loaded data - end of 3rd step
|
||||
##################################
|
||||
|
||||
##################################
|
||||
# modify rig in maya, 4th step
|
||||
# Modify rig in maya, 4th step
|
||||
##################################
|
||||
|
||||
##################################
|
||||
# propagate changes to dna, 5th step
|
||||
# Propagate changes to dna, 5th step
|
||||
reader = load_dna_reader(CHARACTER_DNA)
|
||||
calibrated = DNACalibDNAReader(reader)
|
||||
|
||||
|
@ -10,7 +10,7 @@ IMPORTANT: You have to setup the environment before running this example. Please
|
||||
"""
|
||||
|
||||
|
||||
# this example is intended to be used in Maya
|
||||
# This example is intended to be used in Maya
|
||||
|
||||
import dna_viewer
|
||||
|
||||
|