Modify Daz character rig for Unreal skeleton
To use Daz characters in UE5 for larger scenes rendering or playing in game environment, there are two different approaches, either retarget the animations from other source into Daz rig, or change the Daz rig to Unreal compatible rigs.
The advantage of using Unreal skeleton in UE5 is that animations and animation blueprints can be used out of the box, with additional bones like face rig and breast bones which don't affect the hierarchy, also lots of store bought assets, blueprints and plugins are based on Unreal skeleton.
This thread is continued from an older thread about "Merging Geograph from Daz character with Diffeomorphic" https://www.daz3d.com/forums/discussion/541216/merging-geograph-from-daz-character-with-diffeomorphic#latest
Comments
Experimented different methods for this and came up with working solution of using AutoRig Pro to Rig the G8.1 character with UE4 skeleton, if apply the Unreal A pose to Daz character before auto rigging, Daz G8.1 can be converted to game ready character without any retargeting needed.
Also there is a new Youtube video about a Blender plugin Game Rig Tools that can rig any character with the UE5 Manny/Quinn skeleton, going to experiment this plugin with Daz characters.
Took me quite a while to watch and understand this video, this involves lots of manual rigging work compared to the simple AutoRig Pro method which is already working as post on this thread: https://www.daz3d.com/forums/discussion/541216/merging-geograph-from-daz-character-with-diffeomorphic#latest but it's more customizable would try this new plugin and see how that works with UE5 Control Rig.
Have you tried Eufy yet? I did some initial tests today and it seems to work. I just need to figure out how to re-copy shape keys now. Diffeo does a great job importing them, I just lose them in the conversion process and the bones are all renamed to match UE4.
Seems like Uefy2 is needed to convert Daz rig to UE4 and keep the original weights. Other plugins typically throw the original weights and rebind the new armature to the mesh.
Its Youtube playlist for Uefy2 is very useful to learn character rigging for Unreal, the plugin worked for some initial tests, need more tests for shapekeys and compatibility with Diffeomorphic, because it's designed to use with DazToBlender bridge as described from some of the comments: "The workflow shown in this video assumes you used the Daz to Blender bridge and followed all the steps in the order shown. Doing so results in specific names for bones and vertex groups along with other options. If you imported the character a different way you will probably need a custom mapping for the bone names as shown in the video:
---------------------------------------------------------------------------------------------
The bone names imported by Diffeomorphic are exactly the same as imported by DazToBlender, no custom mapping needed if using Diffeomorphic. Also using Diffeomorphic can avoid extra process of unrig the unneeded controlling rig provided by DazToBlender, and using Diffeomorphic can avoid the extra process to transfer back shapekeys. The next post describes the summary of the workflow using Diffeomorphic, Rigify, Uefy2.
Before converting the G8.1 character with Uefy, the morphs need to be converted to shapekeys with Diffeomorphic: Advanced Setup -> Morphs -> Convert Morphs To Shapekeys, because the deforming skeleton will be swapped to the new Unreal skeleton, the morphs can't be controlled from Diffeomorphic.
Don't follow some instructions from the videos to delete the shape keys then transfer them back. Use Diffeomorphic Setup -> Apply Rest Pose to apply the mannequin pose to the character and keep the shapekeys. Also don't use the Uefy "Extract Mesh", instead delete the mesh's armature deform modifier then parent to the new Rigify rig, this way the shapekeys are preserved and don't need the extra process to transfer them back.
----------------------------------------------------------------------------------------------
Summary of the workflow using Diffeomorphic, Rigify, Uefy2:
Create UE Mannequin:
Create original Unreal mannequin rig as reference skeleton:
In Object mode: Shift-A -> Armature -> Uefy Script -> Reference Skeleton -> UE4 Mannequin Proxy (A-Pose)
Import Character:
Import G8.1 character with Diffeomorphic
Refresh List to pick the armatures of the character and the reference Mannequin.
Unrig Armature so that the deform bones are not constrained for Uefy script to pose them
Merge bone weights and reduce bones
Translate the character bone names to match mannequin bone names
Automatically roll the matched bones to mimic bone orientations of mannequin reference
Adjust some bones position to better match the mannequin
Use Uefy to automatically pose the character to match the Unreal reference skeleton
Create Metarig:
Generate metarig using Uefy G8.1 preset for the character
Use Uefy to automatically pose metarig to match the Unreal reference skeleton
Check and tweak the metarig bone joints to precisely match character's converted deform bones
Create Controlling Rig:
Generate controlling rig from the metarig using Rigify for the character
Detach the character meshes from its own armature and parent them to the new Rigify rig
Hide the character's own armature as it's done with the purpose, new deform skeleton will be generated from Rigify rig
Build Skeleton:
Build new mannequin skeleton from the Rigify rig.
During the build skeleton process it automatically swaps the Rigify rig's hidden deform rig to the new mannequin skeleton.
Make Animations:
New animations for the converted skeleton are based on Blender orientation.
Export the new character into Unreal with this Blender orientated skeleton.
This character is used to receive animations made from Blender.
Export Converted Character:
Roll the new skeleton to match Unreal axis orientation (After this step it's not compatible with Rigify and can't be animated)
Export the character again into Unreal with Unreal orientated skeleton.
This character can use Unreal animation packs without retargeting.
Export Animations:
Export Blender animations and choose the Blender orientated skeleton to receive new animations.
Retarget animations to the other character which has the Unreal orientated skeleton.
How did that Uefy method work for you in UE5? I switched back to the retargeting approach instead of converting G8.1 to Epic skeleton for several reasons:
> G8.1 body morphs are referred to Daz A pose not Unreal A pose, morphs are off shape in UE5 with Epic skeleton.
> Converting every Daz character results in each one using the same Epic skeleton but different in body proportions, the clothes would clip with diffrent Daz characters in UE5.
> Converted body weight is not perfect, the result in UE5 always has distorted toes and fingers no matter how precisely I tried to match the G8.1 skeleton to the Mannequin skeleton reference.
> The original G8.1 JCMs are important and the animation quality is horrible without this, especially for some adult animations that use crazy body poses.
> G8.1 skeleton or any custom skeleton can be used with ALS4 and other Anim BP assets with heavy modifying but acheivable. To make new animations for G8.1 in Blender I switched back to Autorig Pro and Quick Rig to rig G8.1 and keep original G8.1 deform bones, also because Autorig Pro has superior animating and retargeting features.
Uefy2 is still useful though for some of the functions it provides, for example the metarig presets to rig characters with Rigify, the merging weights function and the auto bone name mapping function for general purpose of converting rigs.
----------------------------------------------------------------------------------------------------
Suppose the G9 or G10 could just use Epic skeleton instead, that would make Daz characters absolutely superior to other alternatives.
I'm just sticking with the G8 rig for now. It looks like the DAZtoUnreal bridge uses it with different bone names. Mixamo animations are easy enough to retarget to it using Expy. My next experiment is to use UEtoRigify and see if I can retarget the UE animations to the character in Blender that way. It just looks way easier to leave the skeleton alone and try to retarget animations in Blender. Also, the JCM animation blueprint supplied by DAZtoUnreal should still work with the export from Diffeo, but I'm guessing will need some bone renaming. I'm still early in the process of getting a solid workflow but this is what I'm going with for now. I'm also going to explore the Quick Rig approach you mentioned. If you could expand on why that works better than just using the G8 skeleton, I would really apprecaite it.
I've spent a lot of time trying to figure out shape keys and I think I'm going to just re-sculpt the ones I need in Blender to export to Unreal without using the 'preserve volume' in Blender. I'm hoping that will give the same results. Blender has released a small add-on that allows us to make shape keys and store them in a separate mesh, similar to Maya. Initial results look promising.
https://studio.blender.org/training/blender-studio-rigging-tools/pose-shape-keys/
Quick Rig can make controlling rig for the original Daz characters and keep the G8 skeleton intact, with the preserve option instead of the convert option. If using the Diffeomorphic Advanced Setup -> Convert Morphs To Shapekeys before exporting FBX to UE5, the original shapekeys work fine without the preserve volumn option and I don't need to resculpt the shapekeys. Uefy has the Unreal A pose that I need for retargeting Unreal animation packs to G8 skeleton, and I feel more convenient using Autorig Pro to animate and retarget than Rigify.
It's better and easier to keep G8 skeleton than converting it to Epic skeleton, also because the original skin weights work best with unconverted G8 skeleton.
I already sent several animated Daz characters and monsters into UE5 using Autorig Pro for retargeting, and Quick Rig for making new animations and found that other plugins are unnecessary for this, would update some screenshots demonstrating the workflow later.
--------------------------------------------------------------------------------------------------------------------------
The new version of Autorig Pro retargeter doesn't need the Unreal A pose or any rest pose for source skeleton, because it can automatically match the target rest pose to the source rest pose, by adding a temporary pose preset to the source instead of needing to change the source skeleton rest pose, this is similar to UE5.1 retargeter which can apply pose preset to temporarily modify either the source or the target rest pose.
Check these tutorials for retargeting with Autorig Pro:
The tutorial for rigging existing skeletons with Quick Rig:
Attached the steps of adding controlling rig for G8 with Quick Rig and keep the original G8 skeleton unchanged with skin weights and shapekeys, and some images demonstrating the retargeting process.
Just wanted to add that Autorig Pro has effectively turned Blender into a universal Character& clothing system for me that has made any further investment in any specific character eco systems moot.
Its retargeter has liberated me to use nearly any figure mesh I need for an animation.
With easy retargeting from mixamo or iclone /CC3
There are only four Daz genesis figures used in this recent starwars fan trailer I did.
The rest are free models from sketch fab that animate butter smooth and do not have the extra burden of having a fully realized person under their armor.
Very nice animations using characters from different sources. Prefer to use the Daz characters with body skins under the clothes, because most of the human characters in my game can be ripped off their clothes and have naked actions. If enable the clothes simulation feature with UE5 chaos physics it can solve most clothes clipping issues, it needs to use the expand all morph in Daz before exporting to make clothes simulation correct.
Great information. Thank you both!
Just adding that I agree with @wolf359. I mean daz is great for character creation in that you can morph the figure and kitbash the outfits to get what you need. But then she's not even close to being ready for animation, let alone games. After making the character more work is needed to optimize the rig, textures and mesh.
That's also why I don't fully understand the expensive "interactive licence" they sell in daz. At the very least the price should be much cheaper since the figures do not fit games.
The pros and cons of using Daz figures as game characters based on my experience:
Pros:
> Daz provides naked characters with customizable genitals, this is superior to other alternatives.
> The outfits made for Daz characters are the best over the alternatives.
> The face and body morphs can be used in game to enable players to shape the characters.
> Characters can be morphed into animals or monsters while sharing the same skeleton, thus the monsters could use human animations after retargeting with their own monster rest poses. This is demonstrated in the retargeting course from CGDive.
Cons:
> Too many textures are used and they need to be merged for better game performance, fingernails to arms, toenails to legs, ears, eye sockets, lips to face, etc.
> The materials are not native to game engines. Textures need to be converted e.g. bump maps to normal maps, roughness, specular, ambient occlusion need to be created or converted. I use the characters imported from Diffeomorphic for the merged genitals, correct morphs and bone orientations, and copy materials from DazToUnreal imported characters. Additional material functions and texture conversions are still needed to improve the results.
> The G8 skeleton needs retargeted animations to make the characters usable in game, and retargeted animations are not as good as original animations, though the AutoRig Pro gives the best retargeting results compared to other methods.
I agree that the interactive licenses are too expensive for the extra work needed to make game ready characters.
When retargeting animations to G8 skeleton, the Diffeomorphic imported G8 deform bones are constrained by drivers and by default using bone rotation limits, the constrains need to be unlocked to achieve accurate retargeting results.
The Uefy2 has very useful remove rig tool called Unrig Armature which can be used to Diffeomorphic imported G8 skeleton, to unlock the bone limits and other hidden constrains before starting the retargeting process.
The other very useful tool from Uefy2 is the Fix Mannequin script, this should be used after importing UE5 FBX source animation into Blender, because the Automatic Bone Orientation option of the Blender FBX importer doesn't correct feet and toes orientations when importing FBX. Using this script gives accurate feet and toes motions specially for the high heeled characters, after matching these bones of the source skeleton rest pose.
Attached images showing how to make perfect retargeting results exactly the same as source animations.
You can lock/unlock in the pose tab. The constraints are always imported and enabled/disabled according to the switch.
I think @Padone was also talking in terms of the type of game
(or film ) Characters who are covered head to toe and never change throughout the game or film.
A prefect example are something like the clone troopers in my recent video.
or any of the major star Characters of AAA game franchises Like HALO master chief ,Gears of war etc.
It makes absolutely ZERO sense to have a RL Avatar or Daz genesis figure, each wearing multiple conformers,
to be dressed in such armor.
Particularly for me now that I am choosing to rig my own Characters with ARP to have them lightweight and all compatible with my various external mocap resource options.
The more I study professional pipelines for games and animated films, the more I understand why the big studios always build their assets from scratch.
There is a huge uproar by the aspiring game developers ,over in the Reallusion community, right now about the content pricing for use of RL content in games.
I tried that and found unlocking the bone limits is not enough for retargeter to correctly generate retargeted animation frames. If retargeting to the deform skeleton, this skeleton should not be constrained by any rig, so it needs to unrig it before retargeting.
Auto Rig Pro supports IK retargeting features that can retarget animations into the IK rig instead of the skeleton, in this case the Daz rig or the Rigify rig doesn't need to be unrigged, and the rig can be used to modify the original source animations.
Indeed and has builtin profiles for:
perception neuron and Rokkoko suits
Mixamo( all flavors)
UE mannequin
unity skeleton
and Reallusion Character creator imotion.
And it has a dedicated rig prep tool for export to UE4 & Unity
You invest in ARP & the animation layers plugin( $69 USD total)
and you very nearly have the equivalent of Maya & MOBU inside Blender for Biped Characters
Found it doesn't need to unrig the skeleton from Diffeomorphic if retargeting to the deform skeleton, what needs to be changed is to disable drivers in pose mode while selecting all bones and unlock the bone limits, for the retargeted animations to match the mannequin, as shown in the attached images.
Keeping the G8 skeleton rigged by Diffeomorphic during retargeting is necessary to generate JCM curves.
If the G8 skeleton is also rigged by QuickRig and preserving the G8 skeleton, it can be used to create new animations for Daz characters, and it generates the JCM curves.
When the G8 deform skeleton is constrained by QuickRig, it has to retarget to the controlling rig created by QuickRig. Save the version before rigging with QuickRig for retargeting animations to deform bones, this creates the most accurate results.
---------------------------------------------------------------------------------------------------
Edit: Don't disable all drivers from Diffeomorphic as some drivers are used to drive JCMs, instead disable the drivers for the selected bone axes as shown with the upadated images attached.
The Pose Shape Keys plugin doesn't work for converting DQS JCMs into SQS JCMs for game engines. Because it only corrects the shapekeys for the specific keyframe, the updated JCMs are relative to the current body shape in that keyframe, for other frames in the animation the shape is distorted.
Most of the Daz JCMs are still useful when used in UE5, except the pJCMShinBend morphs, disable these JCMs or make alternative JCMs from scratch, and bake other useful JCMs into animations would have nice results.
---------------------------------------------------------------------------------------------------------------
The method of baking JCMs into animations was deprecated, it's better to modify the DazToUnreal Genesis8JCMPostProcess.
The retargeting method described above is useful to send animations along with original or custom JCM morphs into UE5, and the Genesis8JCMPostProcess can be used to drive the imported JCMs.
----------------------------------------------------------------------------------------------------------------
Using the post processing Anim BP is surprisingly simple, just copy all nodes from Genesis8JCMPostProcess to the new Anim BP for the Blender imported character, and assign the new Anim BP as post processing Anim BP for the skeletal mesh, then the JCMs have been solved for the custom made characters :)
----------------------------------------------------------------------------------------------------------------
There are minor changes needed for the new Post Process Anim BP, because the original mapping nodes in the Anim BP are designed for DazToUnreal imported characters, the rotation axes and angle ranges need to be modified according to the Blender imported characters' local bone axes. Attached new image showing an example of the needed changes.
@catmaster Thank you!
I want to ask another question. In blender, ifthe body mesh has two modifiers, they are subdivision and armature. When armature on the top and subdivision on the bottom, like picture 1, if bone bends, mesh will be smooth. On the contrary, like picture 2, the mesh will be not ideal and it is a little rough. Howerver, when we export it to Unreal, we must apply subdivision modifier first, and it will cause the problem. So how to solve this problem? Maybe just apply subdivision and smooth weights?
I use the plugin SKkeeper to apply modifiers and keep shapekeys before exporting to UE5, subdivision 1 is enough to convert Daz characters to HD meshes. The plugin applies subdivision as the same order in the modifier list, and the results in UE5 are very good.
https://blendermarket.com/products/skkeeper
It seems the HD meshes in UE5 still have the smooth problem when the fingers are moved, baked HD meshes are required to smooth base resolution Daz characters but can't smooth the skin deform. The problem is because the applied / baked subdivision doesn't smooth the skin deform.
To smooth this like in Blender the game engine needs to have its own smoother like the CatmullClark in Blender, because smoothers are application specified and can't be imported. There's SubDiv modifier for static meshes in UE5 modeling mode, but Unreal doesn't offer any tools for smoothing skeletal meshes, because the meshes are triangulated during import to Unreal, and smoothing modifiers can't be used during runtime for game performance. Modifying the skin weight of the fingers may be required to smooth the skin deform.
Thank you!
(Edited by mod to fix reply)
Made a G8 char, exported with DazToUnreal, it looks well for a first import, I have all JCMs, but I'm missing the Genesis8JCMPostProcess blueprint, I see only Genesis81ArKitExample and Genesis8FaceFXexample when I try to open the Post Process Anim Blueprint.
I enabled the Engine Content and Plugin Content.
What do I need to do in order to have the Genesis8JCMPostProcess? Thanks!