Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DazToHue-Scripts

Invokable User Scripts

DthAddMorphFrameFromSelection
DthScanFrames
DthWorkflowFromCSV
DthWorkflowExample

DthAddMorphFrameFromSelection

Invokable user script. Adds a key for a morph or property and sets keys around it.

1. Create a custom action for the script and bind a keyboard shortcut to it. 
2. Scrub to the frame you want to create a morph on. 
3. With your mouse hovering over the property in the Parameters pane, execute the shortcut.
4. The script will set that value to it's maximum (or 1), and will set the appropriate keys on the previous and next frames to get the sawtooth pattern. 

FrameDatas CSV format

This CSV format should include all the information of a ROM, in a way that can be easily modified from Excel or similar, and then applied to a Daz figure's timeline.

Each row corresponds to a frame of animation. The first column is the frame number, the second is the section name (e.g. GEN, PHY, etc.), and the third is the name of the morph to be used in Hou/UE. (These names aren't really implemented yet and are mostly left as empty strings, but hopefully eventually can be used to automate part of the Houdini side of things.)

|1,EXP,Smile, 

After these first three columns, groups of three columns specify a morph or property and a value. nodeName and propName must be Daz names, not labels. propValue is a float, not a percent, so 1 means 100% on a slider.

|nodeName, propName, propValue

e.g.

|4,,,l_toes,XRotate,-60
|306,,,|r_upperarm,XRotate,-90,|r_upperarm,YRotate,-45,|r_upperarm,ZRotate,-45|

^(Pipes just to show how the different props get read and written, the actual CSV is just commas.)

These CSVs can be generated by running the DthScanFrames script described below.

DthScanFrames

Invokable user script. Scans frames and records key frames in frameDatas CSV format.

  1. Create a custom action for the script.
  2. (Optional) Edit OUT_FILENAME in the script. By default will save to this scripts folder with Genesis9's node label.
  3. Make sure the root node and any subnodes with morphs you want to record are selected (e.g. DK9, GP9, etc).
  4. Invoke the script.

DthWorkflow.dsa

Contains functions for automating much of the DTH workflow. Included by user scripts.

DthOptions.dsa

Contains an options object used by and overrideable in the DthWorkflow scripts.

You MUST set the value for DTH_POSES_PATH to point the the DazToHue\Poses\ folder in your Daz library if you want to load ROM .dufs from the script.

Option type description
bIncludeJCM true if true, loads standard ROMs, otherwise loads only CSVs
bIncludeFAC true set true to include use the FAC version of the ROM
~~~bIncludeDK~~~ false not working
~~~bIncludeGP~~~ false not working
bDQS false set true to enable Dual Quat Skinning, defaults to linear (untested)
FACsDetailStrength 1.0
FlexionStrength 1.0
extraJSONs [string] paths to FrameData JSON files
extraCSVs [string] Legacy - paths to FrameData CSVs (only used by DthExportFBMs.dsa)
  1. Modify DthWorkflowExample to set the options you want. You MUST set sPathDthPoses for your hard drive.
  2. Make a DAZ custom action so you can invoke it.
  3. With the Genesis9 root node selected, invoke the script.
  4. The script will apply the base JCM and Mouth ROM.
  5. The script will apply the extra CSV files in order, setting the morph values as well as setting the keys on the frames surrounding it.
  6. The script will also set all key frames to linear interpolation.

Extra CSVs

Specified by an array of pathnames in the options object, these are FrameDatas CSV files that will be applied sequentially to the animation after the JCM and Mouth ROMs are applied, as of DTH1.7 this means frame 617.

These can be made using DthScanFrames.dsa and edited in Excel or any spreadsheet software, just make sure you save as CSV with comma delimiters and no quoting. I don't sanitize the CSV and do only basic null testing.

DthWorkflowExample.dsa

  1. Modify DthWorkflowExample to set the options you want. You MUST set sPathDthPoses for your hard drive.
  2. Make a DAZ custom action so you can invoke it.
  3. Select the root Genesis9 node and any node which has morphs to be set (mouth, genetalia, etc.)
  4. Invoke the script.
  5. The script will apply the base JCM and Mouth ROM.
  6. The script will apply the extra CSV files in order, setting the morph values as well as setting the keys on the frames surrounding it.
  7. The script will also set all key frames to linear interpolation.

DthWorkflowFromCSV.dsa

User invokable script, needs to be modified to select CSV files to load. Not well tested.

  1. In the script, change options.extraJSONs to the JSON files you want to load. (you can use absolute paths.)
  2. Set the total frames to 1.
  3. Select the root Genesis9 node and any nodes which has morphs to be set (mouth, genetalia, etc.)
  4. Invoke the script.

What it doesn't do

  • the script doesn't change the tear UVs. I don't think it would be hard, just have to do it.
  • doesn't set fence frames. mrpdean said (I think) we don't need them, and the script ensures proper sawtooth pattern. The functions exist if you need them, I just don't call them.
  • doesn't automatically call DazToMaya or Alembic export, nor set their settings. If anyone knows a way to do this, let me know and I'll add it. SubD and resolution are up to you, but I could add that if anyone wants it.
  • Trying to load the DK and GP ROMS from the script fails on certain morphs (possibly because of a '!' in part some of the prop paths, idk). For my workflow, I've just converted them to CSVs and apply them that way.
  • partially implemented Doesn't load the JCM ROMs via CSV, still loads from a DTH .duf file. I think it should be somewhat straightforward, though, and would allow you load and save the whole thing as one CSV.

Caveats

  • You may have to click the toggle override icon on the parameter pane slider for some morphs if they're driven by a controller and you use them in a morph frame. For instance, the DK9 shaping presets control DK_Shaft_Scale_2, which is used in one of the morph frames. (This is only when you load the CSV onto a character with shaping applied, not when you're creating a CSV which is best done on rest pose G9/DK/GP)
  • I've done no unit testing and fairly rudimentary tests in general. Save copies of everything you don't want corrupted, but any user invokable scripts should be undo-able. By default, CSV files are overwritten.
  • The timeline range isn't always set properly, but all frames seem to be applied if the operation comples. Just extend the range after the script. Might fix this later.
  • The script finds the first node with a given name, so it's possible that the wrong node will have a morph applied to it, but I haven't found that to be the case. If you do, let me know and I might have to use full paths.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors