Can you use cloth modifier to create .anm file?

Discussion in 'Track Modding' started by Nibiru, Jun 21, 2016.

  1. Nibiru

    Nibiru Registered

    Joined:
    Dec 24, 2011
    Messages:
    1,200
    Likes Received:
    1,295
    Yes I have already checked this out. Thats where I got the idea of using bones and following the cloth animation. Thanks bink, and keep up the great work on the aiw thing.

    I have now finished the one flag, but I have a few more ideas of objects I want to do the same thing with but if it going to take the amount of hours it took to do this one flag then im not sure if ill spend the time.

    All I can think is this is why we havent seen many new animations from modders. The process needs a faster way than this. We will all benifit :)
     
  2. Gijs van Elderen

    Gijs van Elderen Registered

    Joined:
    May 1, 2014
    Messages:
    1,393
    Likes Received:
    469
    An other attempt to animate a flag. To joints this time.

    Steps:
    Create Cloth flag animation.
    Create cache
    Create joints.
    Contrain each joint to the vertex
    Bake the animation to the joints. (So you don't have to manually set each joint with keyframes. It's done automatically this way)
    Remove the joint contrains to the vertex.
    Remove the Cloth. It's not needed anymore.
    Bind the flag mesh to the joints.
    Find a +/- loopable sequence on the timeline.
    I've exported it as animated FBX 2012 ==> https://www.dropbox.com/s/zs2h3lfl51rzagp/Flag1Flag1.fbx?dl=0 (Note: Maya is set in cm, so you might need to scale it up x100)

    I've checked it in FBX review. And it is working. :)

     
  3. Woodee

    Woodee Registered

    Joined:
    Oct 4, 2010
    Messages:
    4,010
    Likes Received:
    1,071
    Is this not something that can be animated like trees in the wind (in dev mode only at the moment)?
     
  4. Bink

    Bink Registered

    Joined:
    Nov 20, 2011
    Messages:
    523
    Likes Received:
    2
    In maxScript it was very roughly something like:

    1. Make flag to user's input spec (overall & sub-surface sizes),
    2. Set-up a space warp (to affect vertex positions),
    3. Create a cache,
    4. Record for a user adjustable time,
    5. Morph all vertices back to the start time positions (over a number of frames),
    6. Make the (3dsMax) animation,

    It also set-up, sized, and made skin & bones somewhere in the sequence.

    As you can see from the posted files... it outputted a seamless animation.

    There was enough planned randomness in the process so that each flag animation was different (even at the same settings).
     
  5. Nibiru

    Nibiru Registered

    Joined:
    Dec 24, 2011
    Messages:
    1,200
    Likes Received:
    1,295
    Thanks bink. I will play around with your method and see how I go.

    I'll report back later in the week
     
  6. Nibiru

    Nibiru Registered

    Joined:
    Dec 24, 2011
    Messages:
    1,200
    Likes Received:
    1,295
    No its not woodee
     
  7. Nibiru

    Nibiru Registered

    Joined:
    Dec 24, 2011
    Messages:
    1,200
    Likes Received:
    1,295
    Nice work Gijs.
     
  8. Bink

    Bink Registered

    Joined:
    Nov 20, 2011
    Messages:
    523
    Likes Received:
    2
    So... I looked at the code... and I was wrong.

    The cloth modifier works well... it was the garment modifier that is buggy (but it looks like I made it an option in the program).

    I just tried out clothThing rev 47, and it took about a miniute or two to make the flag / wind / cloth / bones / animation file shown below.

    I'll try to make a video of it's operation if I still feel motivated after lunch.

    Might be worth it to release this thing (?)... although I'd rather not support it, as it would take time away from aiw~thing.

    View attachment 20235
     
  9. Nibiru

    Nibiru Registered

    Joined:
    Dec 24, 2011
    Messages:
    1,200
    Likes Received:
    1,295
    Do it release it!!!! :) .....I'm sure with the video you wont need to support this.
     
  10. Bink

    Bink Registered

    Joined:
    Nov 20, 2011
    Messages:
    523
    Likes Received:
    2
    I made about 12 cloth animations this afternoon.. and I now remember why I didn't release the script. You need to have studied the cloth modifier, and space warp wind pretty thoroughly to make something useful. If you haven't, it's more likely to crash Max than make your cloth animation. I'd rather not have to hear about it.

    But it can make nice, seamless cloth animations when 'dialed in' for something specific... so..

    It would be better to start a new thread in track modding called "Flags, Banners, Signs, Tents -- Cloth Animations"... and just post a bunch of each.

    Script allows for dictating which edge or edges of the cloth are not moveable... so it does more than just flags.

    Today's stuff:

    Flags (1 edge immobilized):
    1m x 0.75m
    2m x 0.25m
    2m x 0.5m
    2m x 0.75m
    2m x 1.5m
    3m x 1.125m
    3m x 2.25m

    post hung banners: (2 edges immobilized):
    12m x 1m (lite wind)

    walkover or wall banners (4 edges immobilized):
    12m x 1m (lite wind)

    canvas or plastic signs / tent sides (4 edges immobilized):
    6m x 3m (lite and medium wind versions)

    I'll make some more tomorrow, and try to fill in some other sizes that might be useful, and start posting them.

    Might be good to have some vertically hanging flags and banners too [top (or top & bottom) edge immobilized].

    Any suggestions?
     
  11. Nibiru

    Nibiru Registered

    Joined:
    Dec 24, 2011
    Messages:
    1,200
    Likes Received:
    1,295
    Thanks bink

    The flag I just made while testing this is a vertically hung flag (top and bottom) immobilized

    Other ideas I had were banners hanging over walls and grandstand railings (near track edge)with a dummy collision object behind to simulate the wall or railing behind it. only the top corners immobilized

    large spectator banner with a pole left and right that sticks in the ground.

    tent walls that gently sway and lift up as a gust of wind goes through it.
     
  12. Bink

    Bink Registered

    Joined:
    Nov 20, 2011
    Messages:
    523
    Likes Received:
    2
    Nibiru... yea.. easier to do banner with railings behind it... (rather than walls behind). I can just select the vertices to immobilize (as if railings behind it). This would be good for walk-overs too. Give me the dimensions you want (overall, and railing spacing), and I'll make you some.

    You see... all I have done is automate what is a full day's manual process with this script (down to 1.5 minutes). Even if you do it manually in Max, if you don't know how to set the tons of controls for wind, cloth, bones, morph, volume select modifier,in max... or.. if you go beyond the number of verts that your memory can handle, it will crash.

    Since most people have & will never try all these steps manually, my script would be blamed for the problems these modifiers cause on their own in Max.

    Any how... give me some suggestions as to the rectangular sizes (in meters) that you guys would find useful, and I'll make them.

    Until then... I'll start making & posting some generic stuff that should be useful.

    I'm thinking that a few animations for each size of flag would be useful... so... if you have a few flags next to each other, we don't want them doing exactly the same animated moves.

    I use max 11... but will post them in max10 format... so anything greater than (or equal to) max 10 should be able to import & run the animations in max, and export them to rf.

    You will of course need to make & apply your own textures.... and set your own rf exporter settings (although.. I'll re-post the instructions).

    I'll get started.
     
  13. Nibiru

    Nibiru Registered

    Joined:
    Dec 24, 2011
    Messages:
    1,200
    Likes Received:
    1,295
    I understand where your coming from bink, you could leave a message like you have and state USE AT OWN RISK :)

    Anyway I really appreciate the help your giving. All I will need now is

    Railing Banner = 1m x 3m Railing vertical spacing is 1.125m Height = 1m with 2 horizontal rails 0.5m apart.

    Crowd Banner 2 sizes 3m x 3m and 3m x 5m

    Thanks again bink...I love your work :)
     

Share This Page