• To improve security, we will soon start forcing password resets for any account that uses a weak password on the next login. If you have a weak password or a defunct email, please update it now to prevent future disruption.

Tool Daz Morph Transfer Script for G8M Clothing.

Madmanator99

Member
May 1, 2018
225
452
Hey,

Alright, you all must be familiar with the excelent Fit Control packs by Zev0. But maybe you want more, maybe it's not enought, so you turn off limits, but it goes crazy, in all directions. Maybe you are a dev for an adult game, and those morphs are "just not" bulging enought, or sliding enought.

Well, you can make your own morphs that you can transfer to any clothing you want with this simple script.

I did not reverse engineer Zev0's script, I made my own based on the documentation available (Fuc*ng None!), alot of trial and errors, and it is why it's realy, realy basic, but it gets the job done.

The point of this thread is not to explain how to make the morphs (there will be a very short explanation), but to explain how to transfer them with a script, and I will mostly focus on the male genitalia area.
Them pants/shorts/briefs need a proper bulge yo!

So, let's get started!

All the clothing morphs will be transfered from the main figure, and for this thread, the example will be G8M.
The morphs are made by exporting the G8M figure at the the base resolution, then modifying it (sculpting as some people prefer to call it), then importing it back as a morph in Daz3d.

Once that is done, you will have new morphs for your figure. Below are a few examples of very basic morphs I made while testing the script.
You don't have permission to view the spoiler content. Log in or register now.

These are just example of the kind of modifications that can be done.

Now comes the fun part! This is the piece of code that I came up with, it's not pretty, it's not efficient, it doesn't check for errors, it assumes that you Know what you are doing, but it will not modify your assets. It is only active for the current session, unless you decide to save the morphs for the piece of cloth, or save the scene with the morphs loaded (and technically, you would want that).

Code:
var nodesource = Scene.findNodeByLabel( "Genesis 8 Male" ); //Let's find the G8M
var nodetarget = Scene.getPrimarySelection();
var morphlist = [ "Morph erect", "g8mcrotch1", "g8mcrotch2", "g8mcrotch3", "g8mcrotch4" ]; //Let's find the morphs to transfer by name
var magic = new DzTransferUtility(); //Let's get started

magic.setSource( nodesource ); //Start of blablabla
magic.setTarget( nodetarget );
magic.setTransferBinding( false );
magic.setTransferSelectionMap( false );
magic.setTransferFaceGroups( false );
magic.setTransferRegionGroups( false );
magic.setTransferMaterialGroups( false );
magic.setTargetReplacesSource( false );
magic.setFitToFigure ( false );
magic.setAddSmoothModifier ( false );
magic.setParentToFigure ( false );
magic.setSmartLeftRightHandling ( false );
magic.setConsiderLinesAsRigid ( false );
magic.setUVSpaceProjection( false );
magic.setUseNearness( false );
magic.setMorphTransferList ( morphlist );
magic.setOverrideExistingMorphs ( false ); //End of blablabla
magic.doTransfer(); //Do It!

var magic2 = new DzSceneHelper(); //Setting stuff up for the clothing
for( var i = 0; i < 5; i++ ){ //"i =0" and "i<5" means "i" can have 5 values, 0, 1, 2, 3 and 4, and that just means there are 5 morphs to transfer. I used 5, you can use more or less.
    if ( nodetarget.getLabel() != "Genesis 8 Male"){ //makes sure that you don't have the figure selected, you must have the clothing selected when you run the script.
    var morphtarget = magic2.findPropertyOnNodeByLabel( morphlist[i], nodetarget ); //some stuff to find stuff
    morphtarget.setHidden (false); //.... and everything else below just sets some properties for the newly transfered morphs.
    morphtarget.setMin (0.0);
    morphtarget.setIsClamped ( true );
    morphtarget.setCanAutoFollow( false );}
}
That's alot of magic huh, well I just used that name because I was losing my mind while trying to figure this out, but you can change it to anything you want.
Not only that, but do you see the line "var morphlist = [ "Morph erect", "g8mcrotch1", "g8mcrotch2", "g8mcrotch3", "g8mcrotch4" ];" ?

Well those are the names of the 5 morphs I was testing, but you can use your own, and as many as you want/have, just make sure you spell the names correctly in the script, and adjust the value of "i" as needed.

Also, I may have set way too many variables, but it worked for me, as in, I tried to replicate the fact that the Fit control pack morphs are hidden at first, and then they become visible, and that works with this basic script, as long as you setup your original morphs as hidden, like the Fit control. That's a detail. If you are a solo dev then you don't need to hide your morphs.
But if you work in a team environment, then that could be handy. In any cases, to make it visible, the "morphtarget.setHidden (false);" takes care of that.

One more thing, in the Fit control morphs, those morphs are set to very basic minimums, so even if you turn on "Show hidden" in Daz, and you try to crank them up, they won't go past 1%. But this script sets the new transfered morphs to full 100%.

There is no undo so far, like I said, it is realy basic, the only way to undo is to delete the piece of clothing and loading it back.

Also to transfer the morphs, make sure you have the clothing selected, and that the figure matches the name you have in the script ("Genesis 8 Male"). And that it has the morphs listed in the script!

The good thing is that you can edit this script on the fly, so if you character is name ... "Sebastian" in the daz3d scene list, then edit this script on the fly, and run it.
The same goes for your morphs, once you make morphs that you like, then change the names in the morphlist line.

In any case, this is just to show how to do a morph transfer with a script, once stuff is setup.

A few examples of the morphs I tested in action:
You don't have permission to view the spoiler content. Log in or register now.

Feel free to ask questions, I hope someone finds this interesting.