Closed 1165048017 closed 1 year ago
I just commented out the line where it says build_rig and u r good to go!
@djiangvfx Thank you; I did the same thing, and it worked. BTW, how do you deal with the modifications of blendshapes as descripted in Question2 ? Transfer the BS through FBX file? ^_^
I do not believe blendshape is part of propagate scene changes example script as the joint command only calls for:
SetNeutralJointTranslationsCommand() SetNeutralJointRotationsCommand()
for blendshape delta, you would need to use
SetBlendShapeTargetDeltasCommand()
which is not part of the example script
personally, in my pipeline, I have stored any component of the asset outside the dna for flexibility in the pipeline
dna will only hold the accurate rig logic to be used in RL node inside of maya as well as the SKM in the engine, the mesh, blendshape and skin info is seperated from the original dna
however for max portability, it will be nice to pack the entire asset inside the dna, but it is still not fully achieve as dependency such as the shader and textures, how the rig assembles, as well as any other attaching asset won't be able to packed inside the dna.
@djiangvfx I tried to convert dna to json and then convert it back. In json file, I saw so many informations including blendshapes. I will try to modify blendshapes in json file and then convert it to dna file to see if it can be worked in maya and UE. The shader and texture is not important for me currently, I just want to repair some blenshapes and the base mesh's vertices. Thank you, I will come back after trying this.
have you tried integrate SetBlendShapeTargetDeltasCommand() into your function and did not work? I can provide an example code once I am at my workstation
@djiangvfx Hi, I have tried to modify the blendshapes and lod0's base mesh in my dna file. It is very strange, because the modifications seem to work in Maya, but didn't in UE.
I just wonder if the way I import DNA to UE is wrong or the blendshapes in UE can't be overwrote?
I have supplied my metahuman mbb file which can be imported to metahuman creator website and also the original dna and modified dna! I will keep trying to make all the modifications in dna work in UE, or maybe the FBX is the only way to port the modifications into UE. https://1drv.ms/f/s!Algxor64B8ZTpg-tRv9lzb9cyauQ?e=vYglU7
Sorry! I can't crack open the file right now! But on top of my head, you have to make sure the blendshape target name matches, in maya it defaults to be the expression name, but in unreal u need to tokenize the mesh name and rename each target for example:
brow_down_L head_lod0_mesh__brow_down_L
you either have to toggle "mesh name to blendshape channel name" in the extra options of the dna viewer when you build the rig
or on an already built metahuman asset, if nothing is renamed, you can run the following script before exporting your SKM
`lod0Blendshapes = cmds.ls("*_lod0_mesh_blendShapes")
for bsNode in lod0Blendshapes:
bslist = cmds.listAttr(bsNode+'.weight', m=True)
print (bslist)
nodeName = bsNode.replace("blendShapes","_")
for each in bslist:
cmds.aliasAttr (nodeName+each, bsNode+"."+each)`
@djiangvfx Thank you for informing me that. I just want to change my metahuman through dna file not fbx file. I don't want to export fbx file from maya , and then import this fbx and the corresponding dna file into UE. It seems like that you make your modifications work in UE by reimporting/importing both fbx and dna files? However, I tried many times and finally found that UE can only get bone modifications from DNA . Maybe as this issue descripted, if we want to import blendshape modifications, we need both fbx and dna file as well as your procedures.
From my understanding importing dna into UE will only embed the rig logic onto an existing skm. Any modification to the skm component of the asset including neutral mesh, skin, bs minus rest bone position is done via stand skm workflow.
Ideally ur skm bindposition still align with the dna’s neutral bone position…
However I could be wrong. I never figured if you can import the entire skm of the head via dna file. There is a function in the dna calibration tool to export fbx files from dna which further justify my thought of needing fbx with the dna to embed the dna onto proper skm.
maybe someone from 3lateral can clarify this!
david
@djiangvfx Yeah. Currently, I think you are right. I have tried the scirpt to export fbx, everything goes right. But I hate fbx file as all the informations are already in dna.
Maya loads dna to an empty project everytime, so all the things including bind pose, blendshapes are both from dna. But UE has an initial skeletal mesh for metahuman, only the rig logic part can be overwrote when reimport a modified dna file, the changes related to blendshapes and mesh vertices will not overwrite the existing informations in UE.
Hope UE can make dna system more complete ^_^
@djiangvfx Hi, I have developed an UE5.2 plugin. With this plugin, you can transfer dna's modifications directly into metahuman in UE. As we discussed before, the dna has all the informations including basemesh/morphs/skinweights/joints, so the simplest way is to read these informations in UE and change the skeleteal mesh. I will publish it in UE Marketplace.
Sounds amazing! Thank you
On Sat, Aug 12, 2023 at 9:51 AM Bingo @.***> wrote:
@djiangvfx https://github.com/djiangvfx Hi, I have developed an UE5.2 plugin. With this plugin, you can transfer dna's modifications directly into metahuman in UE. As we discussed before, the dna has all the informations including basemesh/morphs/skinweights/joints, so the simplest way is to read these informations in UE and change the skeleteal mesh. I will publish it in UE Marketplace.
— Reply to this email directly, view it on GitHub https://github.com/EpicGames/MetaHuman-DNA-Calibration/issues/29#issuecomment-1676001811, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM2PERVI7TLXQI4MBH67XQTXU6X77ANCNFSM6AAAAAA25KEGIU . You are receiving this because you were mentioned.Message ID: @.***>
@djiangvfx , Hi ,here is the video for preview. I will close this issue as I have solved it by developing an UE plugin.
have you tried integrate SetBlendShapeTargetDeltasCommand() into your function and did not work? I can provide an example code once I am at my workstation
Hi djiangvfx, I know I am late and this issue is resolved (1165048017 has a plugin on the marketplace now) . But please could you post an example. I am struggling with exactly this and it would be a great to see how this is done using the DNA tools .
Thank you, b
have you tried integrate SetBlendShapeTargetDeltasCommand() into your function and did not work? I can provide an example code once I am at my workstation
Hi djiangvfx, I know I am late and this issue is resolved (1165048017 has a plugin on the marketplace now) . But please could you post an example. I am struggling with exactly this and it would be a great to see how this is done using the DNA tools .
Thank you, b
Hi, @djiangvfx I have made a tutorial about the DNAUpdater plugin and another tool to modify dna file! you can see here for English: https://youtu.be/GPRjWz9aGsQ Here for Chinese: https://www.bilibili.com/video/BV1wu411A7J8?t=1.0
have you tried integrate SetBlendShapeTargetDeltasCommand() into your function and did not work? I can provide an example code once I am at my workstation
Hi djiangvfx, I know I am late and this issue is resolved (1165048017 has a plugin on the marketplace now) . But please could you post an example. I am struggling with exactly this and it would be a great to see how this is done using the DNA tools . Thank you, b
Hi, @djiangvfx I have made a tutorial about the DNAUpdater plugin and another tool to modify dna file! you can see here for English: https://youtu.be/GPRjWz9aGsQ Here for Chinese: https://www.bilibili.com/video/BV1wu411A7J8?t=1.0
Thank you for the English version Bingo. I just wanted to see how the SetBlendShapeTargetDeltasCommand() works in Maya . So was hoping David would post an example.
Cheers, b
This script shows 5 steps need to be done:
I tried this but meet some problem:
build_rig(dna=dna, config=config)
in step3 will reload DNA and overwrite the maya scenerun_joints_command(reader, calibrated)
for name, item in current_vertices_positions.items(): new_vertices_positions = get_mesh_vertex_positions_from_scene(name) if new_vertices_positions: run_vertices_command( calibrated, item["positions"], new_vertices_positions, item["mesh_index"] ) save_dna(calibrated) assemble_maya_scene()