Inject HD Shape By Xin (Steps Please?)
norvum
Posts: 6
Diffeomorphic can export out an HD mesh but it has none of the morphs.
I attempted to apply the Multires mod in blender and then transfering the shape keys but my lips are fused with the teeth.
Not to mention it seems like there is a way to get HD Morphs with the HD mesh.
https://bitbucket.org/Diffeomorphic/import_daz/issues/438/inject-hd-shape-to-xin-and-thomas
I've tried the above but can't seem to get it to work.
Is there a good way to get HD Mesh with HD morphs in blender and have blender export the HD Mesh with HD morphs for other applications?
Comments
HD figures with HD morphs are extremely resource stressing and not good for animation. Same as 8K textures. So in blender you just try to don't use those figures, at least not the HD version. The default HD exporter just exports the HD shape to multires then you use the base morphs on that. This is a good approximation and works fine with animation.
If you really really have to use a HD figure with HD morphs then there's the addon by Xin but it requires extensive manual work to get the HD morphs. So it's not ideal and you really have to be committed. The instructions are in test0.7z as explained by Xin.
https://diffeomorphic.blogspot.com/p/hd-meshes-version-16.html
https://bitbucket.org/Diffeomorphic/import_daz/issues/357/blender-addon-to-generate-rigged-hd-meshes
I suppose this will become more sought after once UE5 releases nanite for skeletal meshes (SKM).
At that point without tesselation Epic will probably encourage users to use nanite on SKM.
I apperciate the pointers I'll keep diving on that path for the moment then.
Just to point out that diffeomorphic is a bridge to blender, not to UE5. Then blender does have (experimental) support for adaptive subdivision, nevertheless a scene with HD figures still doesn't fit animation. It can be good for posing for a single rendering though if you have a powerful hardware. Same as it happens in daz studio.
"Nanite for skeletal meshes" is going to be a game changer, if Xin can update his HD morphs to work with new version of Diffeomorphic.
HD morphs plugin for Blender 2.93 works ( Blender version: 2.93LTS / Diffeomorphic version: 1.6.1 stable / HD Morphs plugin: Blender 2.93 branch downloaded here: https://gitlab.com/x190/daz-hd-morphs/-/branches ) but its Blender 3.2 version does not work with Diffeomorphic 1.6.2.1090 and Blender 3.21
HD meshes baked with subdivision level 2 would be enough for the div2 morphs from Diffeomorphic HD Export To Blender, with div2 morphs the characters would have skin wrinkles and very realistic and subtle expressions.
Xin updated the HD plugin for blender 3.2 so now it works fine.
There are two repository locations both showing the same version 0.82.3:
https://gitlab.com/x190/daz-hd-morphs/-/branches
Previously downloaded the plugin here, the version for Blender2.93 partially works without geografts. The version from Blender3.2 branch does not work.
https://bitbucket.org/Diffeomorphic/import_daz/issues/814/blender-addon-to-generate-rigged-hd-meshes The zip file was listed at the end of the last post. Tried this later and this partially works with Diffeomorphic 1.6.2.1090 and Blender3.2.
- Test G8F HD mesh generation without geografts: Success
- Test G8.1F HD mesh generation without geografts: Success
- Test G8F HD mesh generation with geografts: Success
- Test G8.1F HD mesh generation with geografts: Success
- Test geograft morph transfer with generated G8F HD mesh: No shape keys transferred
- Test geograft morph transfer with generated G8.1F HD mesh: No shape keys transferred
- Test Generate HD shape keys from Morph files to generated HD mesh:
Shape keys appear on the list and custome body morphs work as expected.
Custom geograft morphs have no effects on the geografts, instead they morph on the body mesh.
Attached images below showing custom body morphs and custom geograft morphs on the generated HD mesh. (Images were shaded smooth without textures for demonstration purpose)
@acatmaster The one at bitbucket is for blender 3.2. Thank you for testing. If there's any bug you can report to Xin at bitbucket since he doesn't read here. I'm not an expert on the HD plugin by Xin so I'm not sure if those are bugs or known limitations or user errors. You better talk with Xin directly.
https://bitbucket.org/Diffeomorphic/import_daz/issues/814/
Those are probably compatibility issues, not sure why these plugins are not bundled together, also there's the very old HD Morphs plugin bundled with DAZ Importer v1.6.0 only, supposed to be working with old Blender versions.
Both Diffeomorphic and HD Morphs are being updated very frequently so the test results might not be applicable later. Currently there's a workaround to make true HD characters with working geografts using ShapeKeyTransfer with HD Morphs plugin.
Update: Use another shape key transfer plugin instead to work with Diffeomorphic and HD Morphs plugin: https://mmemoli.gumroad.com/l/tOKEh, It can transfer shapekeys from source object via sampling nearest vertices, or lining up their UV maps and transfer vertices data via UVs. It's faster and compatible with different geometry objects, transferred 100+ geograft morphs to HD meshes in seconds, tested this is the only working plugin for Blender3.2 to transfer shapekeys from low res characters to high res characters.
If import morphs for the baked HD mesh after applying multires modifier, some expressions will not work properly (Attached image below demonstrating the same expression on base mesh and baked HD mesh).
Some expressions use both bone drivers and shape keys. After applying multires modifier the vertex order is changed and Diffeomorphic shape key transfer methods no longer work, but only the bone drivers still work. The result is partially working expressions, for example when smile the lips fused with the teeth.(Also after applying multires modifier the body mesh is no longer able to merge geograft. If want to create a true HD character with HD geograft, use HD Morphs plugin with Diffeomorphic exported base mesh, instead of Diffeomorphic Export HD to Blender).
If you want true high poly HD characters with true HD morphs and merged geograft use the HD Morphs plugin and Mesh Data Transfer plugin, got that method working but very complex though.
The other typical method is to merge geograft with Diffeomorphic in Blender - export the merged mesh as .obj back into Daz - transfer a new armature into the obj to rig it - transfer skin weight to the rigged new character - transfer needed morphs into the new character - export from Daz to Unreal with DazToUnreal plugin - DazToUnreal can bake HD characters and rebuild basic materials into Unreal.
You can find working methods in another thread: https://www.daz3d.com/forums/discussion/541216/merging-geograph-from-daz-character-with-diffeomorphic#latest
You have to import the FACS on the HD mesh, not on the base mesh. If you use multires you can delete the base mesh so to avoid confusion.
Anyway, to be precise those are not the full HD morphs. That is, HD morphs get both a base morph for the base geometry (div2.dsf) and a full morph for the HD geometry (div2.dhdm). With multires you use the base HD morphs. To get the full HD morphs you have to use the HD addon by Xin.
Yes the div2.dsf works on the virtual HD meshes (Diffeomorphic Export HD to Blender, applied div2.dsf on the one that has Multires modifier, the other that has Subdivision modifier was already deleted because it's useless), but won't work on baked true HD meshes (After applying Multires on the _HD meshes). Baked true HD meshes need true HD morphs which as mentioned are the div2.dhdm files. (There is true HD vs virtual HD, the Diffeomorphic "Export HD to Blender" exports the viewport virtual vertexes of Daz, then creates Multires modifier in Blender to apply the virtual data. "Export HD to Blender" creates virtual HD, not baked true HD, the real vertex amount does not change.)
HD addon by Xin can generate HD shape keys from .dhdm files and correctly apply them to true HD meshes, which are generated by the HD addon as well.
HD addon used with Diffeomorphic has worked well with characters without genitals, but HD addon currently can't correctly convert genital morphs for the merged genitals with HD characters.
The game I'm developing has to use characters with animated and physics enabled genitals, so I can't use HD addon at current stage, instead I'm relying on Blender Send To Unreal bridge to generate smoothed normals / split normals with tangent spaces, to make the base resolution Daz characters appear smoother in Unreal. The Unreal Set Subdivision function does not work on skeletal meshes, Nanite geometry also does not work on skeletal meshes. Would keep experimenting for a while to figure out best methods for this situation.
I'm not sure what's your question about the dsf. For HD to work you need both dsf and dhdm together. Then the dsf is loaded by diffeomorphic when you check div2, while for dhdm you need the HD addon by Xin.
As for geografts, for HD figures the geograft has to be exported as a separate mesh. That is, you have to enter the geometry editor in daz studio before exporting. Please note that you don't need to subdivide the geograft if it is not HD, as most geografts aren't.
http://diffeomorphic.blogspot.com/2020/09/hd-meshes-and-geografts-revisited.html
I'll try exporting geograft as separate mesh and test HD Morphs plugin again. If it works would capture a new video of the process later.
Update: The HD Morphs plugin still can't work with Diffeomorphic using this approach, the test results were the same as before, I'm quite convinced this is the limitation of HD Morphs plugin that it can't generate morphs for genitals. (Blender 3.2.1 / Diffeomorphic1.6.2.1108 / HD Morphs0.82.3)
Understand that it has to enter the geometry editor in daz studio before exporting, because when entering geometry editor mode, the Daz viewport virtual vertices change and it separates the geograft geometry. I've tested merging geograft to the virtual HD mesh using "Export HD To Blender" and it works, this is the simpler and prefered method to merge geograft for virtual HD meshes / Multires modified meshes in Blender. Here's the several minutes video capture using this method and showing the complete workflow from Daz to Blender to Unreal, how to merge geograft to HD meshes, transfer morphs to clothes, render images in Blender, import mocap file for quick animation making, and using Send To Unreal bridge or FBX to export to Unreal: https://streamable.com/hf528h
Oops the tutorial was removed by streamable.com because of porn staff lol, but Diffeomorphic has complete documentation that users can refer to, amazing plugin that is a must have to get the best of Daz characters. HD Morphs plugin works very well to generate true HD characters with HD morphs though geograft morphs are not supported. That does not matter too much the geograft morphs can be transferred by other plugins.