Home Technical Talk

[Maya] Tank tread with mash

dlz
dlz
polycounter lvl 4
Offline / Send Message
dlz polycounter lvl 4
Hi, 
I wanted to create a mash network to make the pieces of a tank tread.
I make 2 mash networks for each piece with a distribute and a curve node each one.
These are the pieces:

i wanted the "2" piece to fit perfect between two "1" pieces but i get that result 
The "1" piece unhook when the curve gets more concave.



Any ideas of how can acomplish that?

Replies

  • Axi5
    Options
    Offline / Send Message
    Axi5 interpolator
    I haven't tried doing something like this but you will probably want something like the Orient node. Or use an aim curve.
  • Mark Dygert
    Options
    Offline / Send Message
    Yep, put the pivots at the center of the screws for each piece, and then use an aim constraint and have the tab look at the screw of the tread. You can use joints and skinning if you really want to be "correct" that way you have a mini-rig going that you can change the mesh out or make changes, if you need to.

    https://www.youtube.com/watch?v=t1LmfmAGQAI
  • dlz
    Options
    Offline / Send Message
    dlz polycounter lvl 4
    Mark Dygert one question. That process is pre mash or post mash? i mean you have to do it when you have done the mash thing or there's a way to do it with the objects and then make a mashnetwork of they?
  • dlz
    Options
    Offline / Send Message
    dlz polycounter lvl 4
    Axi5 i was testing that and no good results :/
  • Mark Dygert
    Options
    Offline / Send Message


    If you set it up right, this is what it should be doing.
    Notice the orange and pink pieces are separate from the tread.
    The pivot for the orange piece is at the vertex center of the orange screw. The orange is parented to the green. The orange has an aim constraint and is looking at the blue pivot.
    The pivot for blue is at the vertex center of the blue screw. The blue is parented to the orange.




  • throttlekitty
    Options
    Offline / Send Message
    Mark's method is the superior way to do this, especially if you want to export animation to a game engine. But I was curious how to do this in MASH, it's convenient for maya animations or to get to a quick static mesh.

    The setup here is Distribute>Curve>Transform in order. The transform node has a rotation controlled by a strength map, which I set to a ramp and is being projected along Z (the direction my camera is facing here). The plane in back was created as a map helper to both place and visualize the strength. Not really ideal since you need to more or less eyeball it and change the time slider a few times, but not too painful.

    Note that I've made this example in a bad way, the tread and links are part of the same network so they're receiving the same rotations.


  • dlz
    Options
    Offline / Send Message
    dlz polycounter lvl 4
    @Mark Dygert
    Hey, thank you a lot, the video explains the idea perfect 
    @throttlekitty
    Your solution with the strength map is mind-blowing i never thought on a strength map that way. i will try that when i have some time.
    One more thing, when you said "Note that I've made this example in a bad way, the tread and links are part of the same network so they're receiving the same rotations." You mean that i have to do two diferent mash networks for each of the 2 pieces no?

  • throttlekitty
    Options
    Offline / Send Message
    Ideally you would want two mash networks, one for the tread, the other for the link. They rotate at different rates and on different pivots, Marks gif shows that action. You only need the rotation correction for the links, the treads already meet end to end as seen in your OP.

    Also, MASH ignores translations on the input objects, but will happily use parent transforms. You can group objects if you need to make any transforms or set a custom pivot if you create a hierarchy like this. You can use the root node for the mash repro input, so you can keep adding objects as you please. (I'm discovering this is really fantastic for a boolean workflow)


  • dlz
    Options
    Offline / Send Message
    dlz polycounter lvl 4
    @throttlekitty i don't know what i'm doing wrong but this doesn't work for me :sweat:
    Thank you anyways 
  • dlz
    Options
    Offline / Send Message
    dlz polycounter lvl 4
    @throttlekitty Am i doing something wrong?


  • throttlekitty
    Options
    Offline / Send Message
    a) You don't have a rotation set in the mash transform, so it's not doing anything :)

    b) I'm still a little fuzzy on this part, but in my scene I...
    Right clicked on Map Helper and chose Create, which gave me the plane that you see in my image.
    I then positioned this behind the track, moving it around you can see the effect of the rotation/strength.
    This is after creating the strength map, I can't recall offhand what happens if you don't create a helper for positioning.
  • dlz
    Options
    Offline / Send Message
    dlz polycounter lvl 4
    @throttlekitty Sorry to ask again but still i am having problems, now i correct those things you said but its rotating all the pieces at the same time not with their individual pivot point. I have set the pivot points and hierarchy like you said thought. 
  • dlz
    Options
    Offline / Send Message
    dlz polycounter lvl 4
    @throttlekitty i know it's a lot to ask but could you record a quick video of the process? i'm really curious of how you did that with mash :P
  • throttlekitty
    Options
    Offline / Send Message
    dlz said:
    @throttlekitty i know it's a lot to ask but could you record a quick video of the process? i'm really curious of how you did that with mash :P
    I sat down to take some screencaps (don't have time for figuring out video stuff), and got confused myself! I mispoke about the order, transform should come before the curve in MASH, otherwise it tries to rotate the whole repromesh.

    I made a mess for myself with the transforms and now I'm confused about how pivots actually work in mash now that I'm recreating the scene. I think my problem is related to the aim curve I'm using. I'll try to set some time aside later and post back.
Sign In or Register to comment.