Page 1 of 19 12311 ... LastLast
Results 1 to 15 of 276

Thread: How to change a rig in 45 scene files?

  1. #1
    Super Member vncnt's Avatar
    Join Date
    Sep 2003
    Location
    Amsterdam
    Posts
    1,574

    How to change a rig in 45 scene files?

    I knew this was going to happen some day.
    I need to update a character rig in multiple LWS files.
    Even more than once.

    I can't help it - it's the way this project is running.
    So I beg the LightWave3D group for a technical solution.

    A simple script (at least on the outside) that is executed during opening of the scene file in Layout, that loads the rig from one centralized rig file, and applying all previously defined animations to that rig.
    Not only for one character but six!

    PLEASE PLEASE PLEASE build a solution for this before I start crying.

    Any (technical) suggestion will be appreciated.

  2. #2
    Goes bump in the night RebelHill's Avatar
    Join Date
    Nov 2003
    Location
    jersey
    Posts
    5,770
    I wouldnt go holding your breath for a solution inside LW... If you want to get the animations from the existing rigs and copy them to the new, you can use mutlimotion... Itll be a bit of time to wade through, but should help... http://thespread.faulknermano.com/_t...tiMotionGN.zip Alternatively I think your only other option will be to make yourself a script that creates/applies the necessary rig changes that can then be run on each scene to create the appropriate changes there.
    LSR Surface and Rendering Tuts.
    RHiggit Rigging and Animation Tools
    RHA Animation Tutorials
    RHR Rigging Tutorials
    RHN Nodal Tutorials
    YT Vids Tuts for all

  3. #3
    Super Member vncnt's Avatar
    Join Date
    Sep 2003
    Location
    Amsterdam
    Posts
    1,574
    The Replace -> With Object / With Layer / With Null commands leave the current motion of that object as it is.

    It might be possible to quickly enhance that same code and add a "Replace -> With Hierarchy" function.

    If that new function could:
    1 - search in the external LWS file for a parent object with the same name (as the selected object)
    2 - copy all motions of the parent object and all child objects into memory
    3 - delete all child objects of the selected hierarchy parent
    4 - load all child objects of the hierarchy parent object from the selected LWS
    5 - and finally pasting all motion from memory to every object in the hierarchy, skipping missing objects

    then it might solve the entire problem without developing an entire new referencing system.
    And if it's not too much to ask a (master- or object-) plugin that will trigger this update function for that particular object when loading a new LWS.

    One of the biggest issues is that Replace does not handle bones.

    Speaking of plugins.
    I don't know if an Object Replacement script can access child objects and bones (and is able to keep the motion intact) but this also might be an interesting starting point.

    Sounds like this is too big to try and program it for myself.
    Last edited by vncnt; 08-01-2013 at 07:28 AM.

  4. #4
    Goes bump in the night RebelHill's Avatar
    Join Date
    Nov 2003
    Location
    jersey
    Posts
    5,770
    The problem with maintaining animation across hierarchies is the fact that space (and local co-ords) are inherted from parent items... So having a "copy" of a hierarchy that has a new item in the middle somewhere will (potentially) change the values that need to be applied to the ensuing children of the new item. This is evident, for example in the multimotion plugin... You could probably addd some code to that even to create a "replace hierarchy" type function... but it would only work for the simple case where hierarchy changes involved no alterations to inherted spaces... Having a tool to do the general case would be much mroe involved.

    But def for the situation you find yourself in, the quickest out is to make a script that performs the required rig modifications, and run that in each scene where you need to alter the rigs.
    LSR Surface and Rendering Tuts.
    RHiggit Rigging and Animation Tools
    RHA Animation Tutorials
    RHR Rigging Tutorials
    RHN Nodal Tutorials
    YT Vids Tuts for all

  5. #5
    Super Member nickdigital's Avatar
    Join Date
    Nov 2006
    Location
    Burbank, California USA
    Posts
    4,576
    Messiah let's you modify a rig to some degree. I realize that doesn't help you though.

    As RH said the motion dump/load is going to be your best option now.

    You're replace with hierarchy idea sounds neat but you could also do a LFS.

    I wouldn't wait on a solution from the LWG as your request is pretty involved. The system would have to know what items to match motion too or which data to split. For example if you have a bone with rotation on it and choose to split it, are you dividing that rotation value across the bones?

    I hope you're getting compensated for these changes. Requesting a major change like that during the process should come with consequences.
    My opinions and comments do not represent those of my employer.
    Profile piece
    2010 Reel
    'The X's' Reel

  6. #6
    automator of tasks xchrisx's Avatar
    Join Date
    Jul 2003
    Location
    Nevada
    Posts
    593
    Blog Entries
    6
    I agree with nickdigital and rebelhills advice. Making a script to make the necessary changes that are unique to your rigs is probably the best solution (if not only solution other than doing it by hand). I have had to make motion loaders and savers in the past and if its just motion that needs to be transferred, its not that hard. However, if the rigs contain expressions, motion modifiers, etc then this is a very tall order as a lot of stuff cannot be accessed via scripting.
    My Lscript Collection | LinkedIn
    3D Generalist IGT

  7. #7
    Super Member nickdigital's Avatar
    Join Date
    Nov 2006
    Location
    Burbank, California USA
    Posts
    4,576
    Can ChronoSculpt help? Just deform the base pose of the existing animation.
    My opinions and comments do not represent those of my employer.
    Profile piece
    2010 Reel
    'The X's' Reel

  8. #8
    Depending on the setup of the rigs and the scene, I would consider putting some research into lscript commander (built in Lightwave function), especially if there isn't much scripting experience under your belt. It doesn't replace actual scripting, but it can be invaluable for creating quick command macros in a way that makes sense to the average user. It also makes for a great learning tool.

    Also, Matt's Coord Tools are not only insanely useful in themselves, but also greatly expand the kinds of things you can do with lscript commander.

    Finally, for the sake of completeness I'll outline two bugs about lscript commander that are annoying and users should be aware of:

    1) Off-by-one errors converting to lscript... IE: things like "same as item" constraints.

    2) file paths that get converted to lscript do not convert properly. Filepaths require 2 "\" characters in lscript to function (IE: C:\\myobjectfolder\\myobject.lwo )
    Last edited by Ryan Roye; 08-01-2013 at 07:23 PM.
    Professional-level 3d training: Ryan's Lightwave Learning
    Plugin Developer: RR Tools for Lightwave

  9. #9
    Registered User
    Join Date
    Oct 2005
    Location
    USA
    Posts
    1,243
    Quote Originally Posted by RebelHill View Post
    The problem with maintaining animation across hierarchies is the fact that space (and local co-ords) are inherted from parent items... So having a "copy" of a hierarchy that has a new item in the middle somewhere will (potentially) change the values that need to be applied to the ensuing children of the new item. This is evident, for example in the multimotion plugin... You could probably addd some code to that even to create a "replace hierarchy" type function... but it would only work for the simple case where hierarchy changes involved no alterations to inherted spaces... Having a tool to do the general case would be much mroe involved.

    But def for the situation you find yourself in, the quickest out is to make a script that performs the required rig modifications, and run that in each scene where you need to alter the rigs.
    Just offset all children of the new hierarchy item with inverse transform of that item and it should work even if that new item introduces transform of its own.

  10. #10
    Super Member vncnt's Avatar
    Join Date
    Sep 2003
    Location
    Amsterdam
    Posts
    1,574
    Quote Originally Posted by nickdigital View Post
    Can ChronoSculpt help? Just deform the base pose of the existing animation.
    I suspect ChronoSculpt is meant as a post-production tool - when the simulation or animation has failed somehow.
    I'm not willing to animate an entire project and fixing problems (at the end of the production process) that should have been fixed in the first place.

    In this case I created the setup for 45 shots with their photo backgrounds. Some of them will be replaced by similar video. And at this stage not a lot of animation has been applied. I've already defined many main poses and size/perspective/lighting in relation to their backgrounds. Now I've discovered that the bones in the collar area should not move with the head or neck. It causes bad deformations around the collar that need to be compensated manually. The solution is to reparent that group of bones incl. their controls. I could easily ditch any animation in the collar area that can not be matched between the old and the new rig.

    Currently I've modified 9 scenes already completely by hand (while wiping away my tears).
    It's not an easy job when many Genoma items have very generic names and many bones have child bones that have child bones and objects themself, many levels deep. Btw I've enhanced the results of Genoma so re-generating is not an option.

    When I look for comparison to NLE software, these days they can handle deleted/moved/renamed/transcoded/reformatted source files without flagging the project file as corrupt. How? Just by starting a dialog with the user to diagnose the situation and apply proper actions for each mismatch the software encounters.
    I don't expect LW to solve every mismatch I create myself but at least let me in charge while handling any problem.

    I think that LightWave should have a method to loosen the object/bone hierarchy from the animations and to increase tolerance for orphaned motion envelopes. Maybe something can be learned from techniques as found in plugins like Nevronmotion. I don't know.

    Referencing to a master LWS for the rig or any other hierarchy (or a Replace -> Hierarchy function) would be a very welcome and especially practical addition. For many of us I suspect.

    Untangling the LW architecture could open the door for many new features (like a completely renewed animation system).
    Last edited by vncnt; 08-04-2013 at 11:42 AM.

  11. #11
    automator of tasks xchrisx's Avatar
    Join Date
    Jul 2003
    Location
    Nevada
    Posts
    593
    Blog Entries
    6
    If it is literally just a reparenting issue (I gathered from your post), then it can be easily done in Lscript and possibly even done with LS Commander.
    My Lscript Collection | LinkedIn
    3D Generalist IGT

  12. #12
    Goes bump in the night RebelHill's Avatar
    Join Date
    Nov 2003
    Location
    jersey
    Posts
    5,770
    yeah... as chris says... If its just a reparenting issue then its a piece of cake...

    Code:
    generic
    {
        SelectItem("ItemName");
        ParentItem("ParentItemName");
        //Repeat for as many "items/parents" that need reassigning
    }
    LSR Surface and Rendering Tuts.
    RHiggit Rigging and Animation Tools
    RHA Animation Tutorials
    RHR Rigging Tutorials
    RHN Nodal Tutorials
    YT Vids Tuts for all

  13. #13
    Super Member vncnt's Avatar
    Join Date
    Sep 2003
    Location
    Amsterdam
    Posts
    1,574
    Ah, that looks interesting. Thanks!
    I'll do some experiments tomorrow at work.

    Many years ago I've used C and C++ and recently in Unity/Sony Vegas Pro some C# and JS but I have absolutely no experience with LScript or Python.

    This will be a good moment to start using & reading about LScript/Python.

  14. #14
    Goes bump in the night RebelHill's Avatar
    Join Date
    Nov 2003
    Location
    jersey
    Posts
    5,770
    well thats LS... which uses C style {} for code block definitions rather than indentation (which I just use out of habit/for easy reading)... Oh, and btw... if ur selecting BONES use SelectByName("name"); (not selectItem)
    LSR Surface and Rendering Tuts.
    RHiggit Rigging and Animation Tools
    RHA Animation Tutorials
    RHR Rigging Tutorials
    RHN Nodal Tutorials
    YT Vids Tuts for all

  15. #15
    Super Member vncnt's Avatar
    Join Date
    Sep 2003
    Location
    Amsterdam
    Posts
    1,574
    Reading the part in the LScript section of the manual about Item Animation it should be possible to save Motion data to one or more separate files (like Keyframer does) for every object/bone that belongs to the hierarchy, delete the motion data from all objects/bones in the hierarchy for all frames except at frame 0 (it should keep the "rig pose" forever), save the current LWS. Then Quit program, Open Scene or Clear Scene.

    And then reload the Motion data for the entire hierarchy during loadscene for any object (at the top of the hierarchy) that has this LScript attached.

    This would handle de offloading/reloading of Motion data.

    Now to get the "centralized rig file" option:
    - start each hierarchy with a null
    - attach the LScript to that null
    - run a dialog to define another LWS that contains the rig
    ---> and maybe even define an object that contains the hierarchy
    ---> (auto-)define a path to store the Motion data for this "instance"
    - save this scene (with only the null + this LScript + definitions) before continuing

    Execute at every loadscene:
    The null object with the LScript attached detects it needs to load items from external LWS.
    - load items within a hierarchy from an external LWS and attach that hierarchy to itself (the null with the LScript).
    - load Motion data from the predefined path (as saved earlier) for every keyframe != frame 0
    - for every unidentified motion channel: ignore, or purge, or create a null with that motion data, or ask user

    Voila: rigs and animations completely separated.

    Does this sound silly or infeasible?
    Last edited by vncnt; 08-06-2013 at 09:08 AM.

Page 1 of 19 12311 ... LastLast

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
  •