Prelewd ships with an animation retargeting system, which allows you to replace the characters in an animation with any other character model (even if it has vastly different proportions). You can use any Source Engine model for this, for instance any of the models available on https://sfmlab.com/ (you have to be logged in and enable "Show adult content" to see NSFW models) or other sources.
Here's a step-by-step tutorial on how to set up a new model:
- Install the model to Prelewd by extracting the files to "Prelewd/addons/imported/"
- Launch Prelewd and open the animation you want to use the model for
- Right click on the actor you want to replace, select "Model" in the radial menu and then "Custom"
- OR, if you don't have the radial menu, right-click into the viewport, select the actor from the drop-down menu, then select "Model" and then "Custom"
- A new window should pop up with a list of all available models. Navigate to the model of your choice and select it by double-clicking the icon.
- Prelewd will now go through all of your installed retarget rigs and check if any of them are compatible with the new model. If it finds a match, you should immediately see the character replaced with the new model and you're done (in which case you can skip the rest of the tutorial). In general, he more retarget rigs you have installed, the higher the chance that Prelewd can find a match.
- If Prelewd could not find a match, the retarget editor will open and you will have to create the retarget rig by hand (you will need some basic knowledge about how models and skeletal rigs work). In this case, continue with the skeletal retargeting section.
The retarget editor consists of two panels:
- The model viewer on the right-hand side, which shows the original actor on the left, and the new actor that you wish to retarget onto the original actor to the right
- and the rig settings on the left, which shows all of the mapped bones/flexes and other settings.
To fully retarget a character model onto another, you need to map both the bones and the flexes (facial morphs) between the two models. You can skip the flex mapping, in which case facial animations will not work, skeletal remapping should always be present, however.
You can try pressing the "Auto-Retarget" button, which will attempt to find and associate matching bones/flexes automatically, however depending on the models, this feature can be unreliable and will most likely require manual corrections. The following sections describe how to apply the mapping manually.
Make sure the "Mode" in the retarget editor is set to "Skeleton". By clicking on one of the bone names, you can associate that bone with an equivalent bone of the other actor. Not all bones require a match, usually you'll want to match all bones that are important for the animation, like spine, arm and leg bones, it is perfectly valid to leave a bone blank, however. To reset a bone (i.e. unmap it), right-click on it.
Once all important bones have been mapped, you should see both actors play the same animation in the viewport. Don't forget to press the "Save" button once you're done.
Below is an example from an older version of Prelewd, the approach is still similar though:
And here is a more recent example via PFM:
If the "Mode" in the retarget editor is set to "Skeleton", press the button to switch to the "Flex Controllers" mode. You may have to click once into the viewport to refresh it, then you should be able to see the faces of both actors in a closeup. Retargeting flexes is a bit more tricky than bones, so the approach is somewhat different.
You'll see a list of available flexes, once again, only the ones that are used by the animation are important. You can right-click into the viewport, select "Flex Animation", and then select the item starting with "pfm_" to see which ones are used.
To map one of the flexes, right click on it and click "Add Mapping", then click on the "+" icon to the left. Now select a matching flex from the other actor, if one is available.
Once you're all done, press "Save" to save the retarget rig, which will save it to "Prelewd/addons/filmmaker/retarget_rigs/" as a ".udm" file. The file can be opened and edited manually in a text-editor, but using the retarget editor is the recommended method of creating or editing retarget rigs.
You can upload the udm-file and share it with others, just beware that the directory structure has to remain intact.