Managing rig and mesh (assets)

Issue #306 resolved
engetudouiti created an issue

At current when convert MHX rig, mesh and rig change new rig and new mesh data (vertex group .. ). I understand it is reasonable, but at same time some-time (or for me actually often), I need to retrun default rig and meshes. to add now morph, or tweak some.

I know I just need to save current scene with deferent name, etc,, but if Make current scene as library blender file (it only use as assset library blend file), you may hope to keep both. (no need to serch different name blend etc,, to append or link or modify morph again, then convert )

Then I request “keep rig and mesh” option, when use convertMHX. with good collection name. ideally I may hope to keep 2 collections MHX , DazRig under character collection. (it may have individual mesh collection)

or I may hope to see 2 collecion will be generated.. (Character_name) _ MHX , (Characeter_name) _ DazRig

Character_name = your set armature name(armature object) . if when convert as MHX it auto duplicate and set these 2 collections, actually user really easy exchange and go-back I suppose. (so we can keep asset clean, without serch around other blend file ^^;)

Of course if you are clever enough, you may keep clean your assets blend files, but I am really lazy and often forget which blend file include coverted or default or how I changed etc,, then hope to keep 2 mesh and rig when convert in one blend file, . (I hope Thomas forgive me to request things we can do it manually,,, ^^;)

Then blender will auto rename meshe with not cute .001 numbers, I hope if you can auto rename meshes with _MHX for object names,, when convert as MHX…

like Hair may convert as Hair_MHX etc.. (I suppose it may not cause issue?)

XXXbody will convert as XXXbody_MHX,, so user can just see name and understand, it is MHX converted mesh … ^^;

Comments (23)

  1. engetudouiti reporter

    And I think same thing I often hope, when merge meshes. About merge rigs, it should happen when we import scene, then even though I do something wrong, I only need to re-import same scene.

    But after merge grafted mesh, it not. (you already do many things for each meshes), so if there is option to keep body and grafted meshes In collection, and generate new merged mesh as XXXX_md (merged) not bad. ( you do it by duplicate and merge then rename )

  2. Thomas Larsson repo owner

    This isn’t really doable, because the original rig is changed to mhx. The situation is different for rigify. There a new rig is created (or actually two, the Daz Importer adds a metarig and then Rigify creates the rigified rig). But to make mhx, no new rig is created, but instead the old rig and meshes are changed destructively. So they cannot be kept.

  3. engetudouiti reporter

    I suppose it is not difficult things as you discribed..

    I know MHX not make meta-rig, then I do not plant to edit it manually, just use auto-convert. as same time, I means,, untill convert MHX, I may duplicate each meshes, and rig..

    Then simply convert as MHX duplicated one (I often rename rig, after convert to clear see)

    As you said it should be destructive (mesh and rig change ) so I hope to keep original, in same scene.

    eg If I add new shape keys for original,, I may convert MHX again in same scene.

    (then same blend file always keep 2 rig and mesh set,,with keep same shape keys I suppose)

  4. engetudouiti reporter

    Only thing I actually needed, is when duplicate collection (default rig and meshes)

    then rename rig as rig_mhx and mesh_mhx, shapekeys jcms may change target.

    and I need to apply armature modifier for rig_mhx once.

    after that I use convert rig_mhx to mhx rig. then default rig and meshes keep as same as before. (I suppose plug in only convert current select rig and meshes which use the rig as armature moridifer target, I suppose)

    only thing I need to care is,, duplicated rig not used for duplicated mesh armature modifier target.. (I do not know if there is setting , maybe I need manually change modifer targett) and remove old one for duplicated meshes.

    And diver link change, so I need to confirm with use your offered functions (Retarget mesh driver)

    Then finally I could keep 2 rig and mesh separaely in same blend scene.

    (so I epxect if you can clean up- these work flow,, by python,,)

  5. Alessandro Padovani

    I don’t know if this may help, didn’t check it myself

    1. import the same figure three times, so you get three figures on the scene that are the same
    2. leave the first alone
    3. convert the second to mhx
    4. convert the third to rigify

  6. engetudouiti reporter

    I am now see problem, when I duplicate mesh and rig then try to convert MHX.

    (untill it, I confirm change armature target, and change driver target,

    so now I have MHXrig (but not converted still) with each duplicated mesh (name with MHX)

    it can pose, and can load pose duf. I confirm shape key work with UI morphs, (custom morphs too), and face units work..

    But actually (Maybe thomas said it), when I select the new duplicated rename rig, then convert MHX, it not work (can not pose correctly, really see strange deform ^^;)

    So my question is, why it happen? of course I tried same thing with non rename and non duplicate version, it work.

    So rename rig and mesh cause problem when convert MHX?

  7. engetudouiti reporter

    Alessandro the your menitoned step may work, but if you means I import same duf (not append from other blend file), it means I need to import morph and adjust etc 3 times ^^;

    If you means, try it with append,, I may hope it work so. (I have thought), but about converted MHX or Rigi-fy, I afraid we need different procedure, (so use proxy is one way, I could see it work without problem)

    Actually I do not know when convert MHX may fail (without erroer) but not pose correctly (weight map seems somehow corrupted, or constrain etc I feel).

    Thomas ,So rename armature, or attached mesh is matter? I may miss test, then try same thing twice, but after all I got corrupted figure,, about duplicated rig and meshes (with rename with MHX)

  8. engetudouiti reporter

    I do not know why duplicated version only fail to convert ^^; Thomas teach me please.

  9. engetudouiti reporter

    So my preferable work-flow should be,, (if you hope to see same 2 character with MHX and def-rig, can pose separately)

    !. set default rig character import morph etc,, then save it as defaultrig.blend

    2. convert as MHX, without duplicate. after convert, I can rename mesh and rig, (I suppose so), eg rig_MHX, mesh_MHX

    3. append default rig and mesh collection, from defaultrig.blend (collection may work),

    It should work , I suppose…( I can not imagine if it not work correctly), but after all to edit morph etc,, I must need to do same step (that means open defaultrig.blend, then import morph etc,, and convert then rename and save as MHXblend.

  10. engetudouiti reporter

    I think the work-flow worked (should be) I must need to set object, armature, mesh-data, armature-data labell name keep clean.. it take some minutes.. (when you have many meshes in same rig) for 2 rig character sets.

    Or it can really easy mess-up when append,, but anyway, the procedure seems work at current.

    Then it seems not work , duplicate and conver MHX, so I hope after convert MHX, auto rename armature and meshes (data, armature) clean with MHX prefix (auto process)

    I can use batch rename add on etc,, but I think add on auto set good labell name, for each ID data, when covnert, it make things stable. (afer all I may often use convert mhx with default rig, when I edit something for 2 blend file, so may not hope rename often,,)

    (though it depend original mesh and rig label name,, if it is not good, mhx version not clean too.)

    I test new 2.92 alpha library view (set Assets for collection) etc,, but at current it make me more complex to append collection without duplicate ^^; (when append, I need not make assets I suppose,, )

    Then this is mix test, but if I use as asset library, I may separate rig body mesh only file, and each cosset collection file (need mhx and def version) (it not include rig, I may need not i suppose)

  11. Thomas Larsson repo owner

    This is my own workflow:

    1. Import the character.
    2. Prepare is in various ways (fix materials, load morphs, merge geografts, convert hair etc).
    3. Save the blend file.
    4. Save it again with a different name.
    5. Convert to mhx or rigify.

    So now you have two different versions of the character which you can append or link into your scenes. If you want to improve the character later, do it in the first file, and do the conversion to mhx again. That work must be repeated, but it is only a single step (or two if you make mannequins), unlike step 2 above which amounts to a lot of work.

    To somehow go back to the original rig from mhx is not feasible.

  12. engetudouiti reporter

    I see . Thanks Thomas confirm. I said somehow complex, then you may think why I ask same thing often , but basically I understand now the work-flow is only stable way which we use it as principal. (though I still do not know why duplicated mesh and rig then convert to mhx seems not work, but maybe it depend current code to convert MHX by script as stable, so I do not request it now)

    we may save the MHX,or rigi-fy version .blend files after step 5 and use it to real work.

    The main character edit file should be the step 3 saved blend file. and need to keep it separately.

    Then I still hope some options to clear divide mesh and rigs.

    1 option which auto change MHX rig version character rig name, and each mesh name with suffic (after convert ), to serch items with append or link easy. I understand good user keep blend file name clear, (eg character.blend and character_mhx.blend) And I usually do so, but sometimes, I can not believe my-self, the mesh are mhx version or default versions.about each set,

    I suppose we can edit object name, armature name, without problem (it not break MHX version functions, )

    So if option can auto-set name or labells for MHX version differently, when append or link mesh between 3 or 4 same rig blend files, it make things more clear.

    Basically to set name and labell clean and how manage blend file is user duty, but sometimes I just hope to use auto version ^^;

    2 option which may simply duplicate and keep mesh when we merge grafted items. only about body and grafted items. I usually set different name for merged mesh, but about this case, I only need manually clean up, merged one name, so it is not matter, if script set character mesh.001 for merged mesh. (I may prefer to keep merged one and not merged one separately, after all when I render, most of work will be done in different file, so file which need to keep , only remain original and merged version)

    I suppose it is more useful basic options for most of user. Though we only need duplicate and keep both, but if there is option, I never fail it.

  13. engetudouiti reporter

    Then what I hope to talk is , good way to manage same character hairs or clothings if you like to change costume hairs shoes, often. 😀 I think there is some room to improve it with blender new asset library , (user can make asset lbirary easy, about same body character, after import duf scene (which include assets, so hope to think nice work-flow or some useful function which can controll from add -on UI)

  14. engetudouiti reporter

    Wao Though it is alpha stage, and to create data structure take some minutes (it depend how many scene and set assets for your library), new 2.92 asset library viewer offer some basic library system finally ^^ (though you may better make different copy scene to test asset system 2.92 only)

    (it take minutes to show those items, then I simply did not notice it actually worked , ^^;)

    Do you already play with it?

  15. engetudouiti reporter

    I found some simple problem it seems add some un-necessary step. but the viewer may be enhanced, so I do not request it at current.

    when import duf and merged rig once, add on seems auto lock all transform. it is basically OK. but if you make library (mesh only), then you append as Assets (for 2.92) ,in scene, current Asset library system not locate it to world center. (it seems only work , drug and drop, so all items seems locate as they like.) then I use clear transform with select all, but lock location deny it ^^;

    I tried to use collection assets, the problem is , it link, not append. then for my purpose I may not use it often. (I hope to keep it editable)

    So I need to un-lock them once, and drug and drop, then art + G clear transform for each items. (I am making library, which only include costume mesh with transfered jcm shape keys now, so it matter, but it may be improved by blender side I suppose. (just load it with transform value and each pivot)

  16. Thomas Larsson repo owner

    Implemented in latest commit. It wasn’t as hard as I thought. Blender’s duplicate operator does most of the work except retargeting drivers. But the rigify code already did that. A keep option is added both to make mhx, rigify, and meta, and seems to work well with the options I tested. Everything is put in a new collection and meshes in a subcollection. I’m not trying to duplicate any fancy collection structure more than that.

  17. engetudouiti reporter

    I really thanks,, I have been making same character asset library files for 2 type rig, (at current hair, under wear, and 3 full sets of character type, and base_body.blend (I use it as base for all scene of current character) then it was somehow tedious work. then hoped if I can keep both set in one file. (after all I use it as library, so only append or link or override to pray scene)😀

    Then I understand, why I may better to keep mesh with rig in library,, because if I only save each asset mesh with remove character rig, , it lost all driver expression link removed armature obj or bone (jcm) . so retarget driver not work any-more for jcms. Then when append mesh, it need to re-transfer jcm from current body. it is not flexible.

    If I save mesh (which already transfer jcm and shape key with rig driver) with pray scene character rig, in library flie, I can keep driver expressions. (and can keep custom group props of rig)

    so when I append the object, (clothing), it come with the saved scene rig, then I only need to change armature modifier target, to current scene rig, then click “ retarget driver” for jcm driver and shape key driver work well. (I really thanks you remain the function, most of user may not use often)

    And I understand, why daz assets (improted in blender) may difficult to manage ,when I make all bones posable, after import pose controller type morph, it change rig. then we needed to change driver expressions . For asset library work, the saved scene rig and current scene rig need to have same hieralchy to keep driver expression , then I can use “retarget driver”

    I still serch best work flow to manage many assets , with simple step to use for current scene. (minimum data, and minimum step) then ideally merge rig still work after customize character… (though I think it seems difficult..) anytime I need…

  18. engetudouiti reporter

    So now I test it , yes it is what I hoped thanks. Then I hope, if it not overwrok, could change mesh and armature (not object, but data) name (clean up with prefix) too , so I can be more lazy ^^;

    Though I do not think it effect something.. (but it is good for view)

  19. engetudouiti reporter

    OK I hope to keep default rig and name (and data name) but, plug in need to convert default rig to all conversion work correctly, (not duplicated one), so current status is good ehough. (at least can keep default rig and mesh as plefix add name).

    ideally, I hoped,, default rig duplicate default rig.001, then after convert default rig,

    change defualt rig asn default rig_mhx. then return default rig.001 to default rig again.

    (why it is better, because if it work so, we can use “default rig” again for conversion MHX. then still keep “default rig” without change name.

    current way can not make it work so I suppose.. maybe next time I convert MHX from Cpolice_RIG_DAZ, mhx version use the name, and new default version (duplicated one) change name as Cpolice_RIG_DAZ_DAZ I suppose. (without Thomas consider it already)

  20. Log in to comment