Rigging

Rigging101 » Rigging128

slicing onions (6 posts)

About This Topic

Tags

No tags yet.

  1. goose0403

    offline
    Member
    Posted 6 years ago
    #

    please help .i want to create a rig that allows slicing objects into smaller pieces as in the movie ratatouille where the chef is cutting and slicing vegetables.

  2. Brad Clark

    offline
    Member
    Posted 6 years ago
    #

    I created a script that does this in Max but you can do it in Maya almost the same way.

    I will first tell you how I went about doing it.
    I was given a manual process that was being done by artists.
    I took that process and did it by hand myself so I understood what was needed and I could watch the script editor/recorder for commands.
    I would copy /paste them as comments in to a new script as a wireframe_peudo code outline to fill out proper as I went.

    Any commands that I could not get to record or needed more info on etc I would look up and type notes for.

    This process was built around placing a cutting object/plane that would mark the cut angle/position and direction. I would create a new object for each cut needed.Its position feeds the values of the cut/slice tool.

    Added options for duplicating the object and spacing them as needed for mulit cuts.

    Once the first cut happens we create two new objects, I rename both of them in order from right to left of the cut (this has to be relative to the cut object not world space)right.

    The new objects gets the holed capped. I had to then find that new face and auto uv it.

    If there are more cuts to do, I would look for more cut objects, check the cut object postion with the boundbox center pivot for the second new object (cut left) and if there is a cut plane that is going to cross the objects and can cut, we select the second new object and cut again, cap/fill the hole and uv it, then check, if nothing left to cut, end and clean up.

    Because we check local position of cutter against the object being cut we can have cuts placed any direction and orientation and it will cut the correct direction and name the objects in the order of the cut.

    I will say that the ordering and naming of the objects was the hardest part is sorting the array of objects to get the new names and checking for new cuts, because you have to grow the selection array with each new object created to make sure any cross cuts are checked for and cut correctly.

    This process would have been easier in Maya for some things but I hope this gives you at least one idea or way to do the cuts.

    Brad Clark
    Motion Editor/Animator/Character TD...Austin TX
    Co-Founder / Mentor @ http://www.RiggingDojo.com
  3. Javier "Goosh" Solsona (admin)

    offline
    Key Master
    Posted 6 years ago
    #

    This is something that character TDs would not end up doing (at least not at work)
    This would be taken care by Character FX. And their stuff is done by magic!!

  4. Brad Clark

    offline
    Member
    Posted 6 years ago
    #

    I forgot to add in there that in my pseudo code, I had many initial //magic comments:)
    Looking back at my code for that, I now think that some kind of rig elf did the work for me because I am not sure how I figured it out:)

    To quote a TD friend of mine, as I tried to explain something to him once...he cut me off and simply said. "Right, right..Magic..got it!"

  5. goose0403

    offline
    Member
    Posted 6 years ago
    #

    Thanks Brad .
    You made my work easier.

  6. Brad Clark

    offline
    Member
    Posted 6 years ago
    #

    Glad to help, only ask that you keep us updated on how your tool is coming along.

Reply

You must log in to post.

Rigging101 » Rigging128
1,099 posts in 307 topics over 110 months by 188 of 8,226 members. Latest: fashionpvp, d2q4p5z2j, gasheldonl