Results 1 to 8 of 8

Thread: Batch rename morph maps, in Rename Vertex Maps, tool for character animators

  1. #1
    TrueArt Support
    Join Date
    Feb 2003
    Location
    Poland
    Posts
    8,286

    Talking Batch rename morph maps, in Rename Vertex Maps, tool for character animators

    Hi!

    I would like to inform that a new Modeler plugin Rename Vertex Maps has been released.

    Rename Vertex Maps, is the most useful to batch rename morph maps from one naming convention to another naming convention, or from one language to another language.
    Renaming 60+ typical morph maps in character object can be annoying and frustrating spend time. Especially if they are in a foreign language.


    Product website:
    http://renamevertexmaps.trueart.eu

    This tool accepts regular expressions in filters, search and replace strings,
    therefor it allows impossible conversions in plain "replace source string by target string".
    The tool previews the renaming process before it completes. Eventual errors in the syntax are presented to the user.

    e.g.
    to replace the all sub-strings "_L" which at the end of name, user should use "_L$" as search string.
    If replacement string is (Polish language equivalent word) "_Lewy" (or "_Left", "_Gauche" or "_G" if you're Frenchmen)
    Eye_L, Arm_L, Hand_L, Leg_L, etc. etc.
    will be converted to:
    Eye_Lewy, Arm_Lewy, Hand_Lewy, Leg_Lewy.
    or
    Eye_Left, Arm_Left, Hand_Left, Leg_Left
    or
    Eye_Gauche, Arm_Gauche, Hand_Gauche, Leg_Gauche
    or
    Eye_G, Arm_G, Hand_G, Leg_G


    (plain "replace by" would generate in some cases wrong results, like I showed on the video! "_Lip" and "_Lips" also have "_L".. but aren't at the end of sentence)

    e.g.
    to reorder sub-strings, which have two groups, separated by character "_", user should use (.*)_(.*) as search string and "$2_$1" as replacement string.
    XXX_YYY
    will be converted to:
    YYY_XXX

    e.g.
    to replace the all "_" by spaces, user should use "_" as search string, and " " as replacement string.
    to replace sub-string by nothing, just leave replacement string empty.


    There is pretty nice on-line regular expression checker at
    https://regex101.com/
    where you can learn nuances of regular expression and verify syntax.


    Once created set of rules, can be stored as preset. Presets are saved in LightWave configuration folder for later use, or exchanged by people.
    The next time you will find similar named source object from 3rd party application, or artist using the same naming convention, you can pick up preset, preview changes and voila.

    Please watch video carefully, with subtitles enabled.



    Best Regards!
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	RenameVertexMaps Panel 1.png 
Views:	158 
Size:	72.0 KB 
ID:	148727  
    Last edited by Sensei; 09-20-2020 at 02:31 PM.

  2. #2
    Curmudgeon in Training Ma3rk's Avatar
    Join Date
    Mar 2003
    Location
    Near Beaverton, OR
    Posts
    2,028
    Consider this a sale Sensei as soon as my next check comes in.

    I know your tools are Modeler related, but don't suppose you have anything similar in the works for bone renaming do you, since it of course would need to do weight map renaming too?
    Last edited by Ma3rk; 09-20-2020 at 02:10 PM.
    Earth can't be flat otherwise cats would have pushed everything off the edge!

    The Big Apexx System:
    AMD RYZEN THREADRIPPER 2990WX Processor (3.00GHz)
    64GB
    2x NVIDIA Quadro RTX 4000 8GB 32 Core

  3. #3
    Electron wrangler jwiede's Avatar
    Join Date
    Aug 2007
    Location
    San Jose, CA
    Posts
    7,146
    A few suggestions:

    1. Per Ma3rk above, allow arbitrary object (or at minimum, bone/z-bone/joint) searching/renaming as well.

    2. Allow option to indicate whether targeted map name "exists" in a pref-set directory or path-set, content dir, scene (for objs), etc. -- both w.r.t. source naming, and target renaming (also useful to show if name already exists / in-use).

    3. If not already possible (wasn't clear), allow option to also rename matching disk file names, if present (and matching source name per #2), to target rename. Here too, likely want indication of and "overwrite/skip/abort" option for target name collision.

    No worries if too much work, just can easily imagine how the above could be useful in various renaming scenarios.
    Last edited by jwiede; 09-20-2020 at 05:27 PM.
    John W.
    LW2015.3UB/2019.1.5 on MacPro(12C/24T/10.13.6),64GB RAM, NV 980ti

  4. #4
    Curmudgeon in Training Ma3rk's Avatar
    Join Date
    Mar 2003
    Location
    Near Beaverton, OR
    Posts
    2,028
    <Psst!> Careful not to spook him.

    My dilemma is with FBX export. As I was telling someone else privately, this new tool will help greatly on the morphs that are exported as they don't adhere to the dot naming convention used in LW. As it is now, they're all in one group making it quite awkward to find items at times.

    My FBX knowledge is limited in that it's always pretty much just been a one way trip from Daz to LW. Daz won't even import it's own FBX. I suspect much of the issues are due to what they have & haven't implemented.

    In Daz however, everything starts out nicely named & labeled. Upon export though, many things get often renamed &/or slapped onto a Null AND renamed, Cameras in particular.

    Click image for larger version. 

Name:	HierNaming-diffs-mit-FBX.jpg 
Views:	16 
Size:	299.0 KB 
ID:	148728


    This hasn't been too much an issue with most humanoid bi-ped characters. But some older models and many quadruped figures though rely on morphs from a base figure such as a dog to get similar breeds. Within the DAZ interface, the Rig itself will also "morph". That however doesn't/can't get exported; just the geom morphs.

    As such, I'm having to bake certain morphs then adjust the rig. But if you need to mirror the hierarchy, here comes the fun part: Instead of having a good, distinct prefix as you did, you're left with a rather pathetic prefix of just an "l" or "r" and not even a "_". So, when ya go mirror the left side to the right, you get things like "rCorrar" from "lCollar". Really, really helpful. Needless to say, I'm not even going to touch the face rigs w/ 64 bones a side.

    But what would even motivate someone to "dumb-down design" an exporter to do that in the first place? Maybe it's just me, but it's times like that ya just want to lead them off behind the barn, to have a little chat with your friend Guido for say 20 mins. or so.

    So there's the challenge.
    Earth can't be flat otherwise cats would have pushed everything off the edge!

    The Big Apexx System:
    AMD RYZEN THREADRIPPER 2990WX Processor (3.00GHz)
    64GB
    2x NVIDIA Quadro RTX 4000 8GB 32 Core

  5. #5
    Super Member Kryslin's Avatar
    Join Date
    Feb 2009
    Location
    Prescott, IA
    Posts
    1,649
    Jweide: WRT #1 above, I believe there are several batch renaming scripts for layout out in the wild; Michael Green has one that has been very useful over the years.

    However, I suspect I'll be purchasing Sensei's plugin, because I do have a use for batch renaming vertex maps of all sorts...
    --------
    My Scripts for Lightwave
    Intel Core i7 960 @3.20 Ghz, 24 GB ram, EVGA 6GB GTX980Ti "Classified" driving 2 x HP LA2405.

  6. #6
    TrueArt Support
    Join Date
    Feb 2003
    Location
    Poland
    Posts
    8,286
    Thank you for your input.
    Based on your opinions, I realized that a warning system might be a good idea to let you know that the vertex map will have a duplicate name.

    In this example, replacing _L with nothing results in the same names as those already existing:


    In this example, replacing _L and _R with nothing leads to the same names as the existing ones, and duplication between the ex-_L and ex-_R morphs:


    Obviously, if vertex mappings is applied to the same vertex in two morphs, one cancels second one, and we lose data. Which we should avoid (or at least be aware it may happen).

    Introduction of warning column to the listview also allowed better information about mistake in regular expression syntax.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	RenameVertexMaps Panel 2.png 
Views:	76 
Size:	77.8 KB 
ID:	148731   Click image for larger version. 

Name:	RenameVertexMaps Panel 3.png 
Views:	78 
Size:	119.3 KB 
ID:	148732  

  7. #7
    TrueArt Support
    Join Date
    Feb 2003
    Location
    Poland
    Posts
    8,286
    Changes made in the 1.1 (25-Sep-2020)

    - Fixed unhandled exception after entering wrong regular expression.
    - Fixed per-polygon vertex map rename i.e. UV maps.
    - Disallowed to create preset with the same name twice.
    - Better error handling. Information what kind of mistake user made is displayed in special column 'Warning'.
    - Display warning that after rename there will be created duplicate of existing vertex map.
    - Added support for conversion to uppercase and lowercase (replace string \U, \L and \E)



    In this video I showed how to convert names which were the all uppercase, to just the first letter uppercase, and the rest lowercase, in each group-word.


    Search string e.g.
    ^(\w)(.*)_(\w)(.*)_(\w)(.*)$

    Replace string e.g.
    \U$1\L$2_\U$3\L$4_\U$5\L$6


    \w matches any letter, digit or underscore. Equivalent to [a-zA-Z0-9_].

    \U transforms text to uppercase until either end of string or a \E is encountered.

    \L transforms text to lowercase until either end of string or a \E is encountered.

    \E terminates any of the previous \U or \L transformations.
    Last edited by Sensei; 09-26-2020 at 09:49 AM.

  8. #8
    TrueArt Support
    Join Date
    Feb 2003
    Location
    Poland
    Posts
    8,286
    On this video tutorial I showed new features of v1.1.

    At the beginning batch converted the all morphs to uppercase-only names to simulate import of such morphs from 3rd party source.

    Then showed how to configure search-replace RegEx strings to convert uppercase-only to 1st letter uppercase and the rest of each word to lower case.
    so e.g. BROW_RAISE_OUTER_L is automatically changed to Brow_Raise_Outer_L
    (and 68 others morphs maps in my example character as well)


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •