Home Technical Talk

help animating a flag in maya

Hello polycount people,

Im trying to animate a very simple and lowpoly flag in maya, for an iOS game, using unity3d.
The process im trying and not being very succssesful, is rigging the flag with 7 joints, aplying an ik spline to it, then aplying a wave deformer to the spline. But this way the base of the flag moves, and a i cant make the base vertices to stay in place and just the rest of it move, so i can bake the animation and export.

Anyone can give me a thought, idea or even teach me from scratch what im trying to do?

Thanks

Heres the model:
flag.jpg

Replies

  • fade1
    Options
    Offline / Send Message
    fade1 polycounter lvl 14
    7 bones sounds pretty much, unless you have closup views of the flag. for very small flags, sometimes using a normalmap and animate the uv's, looks fine.
    if you really want to use bones, you need to subdivide the mesh a little more. make sure your root joint has 100% influence on the verts at the pole, so they stay in place. i

    for a simple animation, just animate all y rotation of the joints. for example 60 for +5 degrees to -5 degrees and loop it. then move the keys of child joint1 10 frames forward, child joint2 20 frames and so on. this offsets everything and you have a basic wave animation to start from...
  • arrangemonk
    Options
    Offline / Send Message
    arrangemonk polycounter lvl 15
    also using the normalmap for animating the vertexes is good
  • ahtiandr
    Options
    Offline / Send Message
    ahtiandr polycounter lvl 12
    you can just make simulation and then bake it. There are tons of tutorials like that if you use google.

    Here is one of them :
    [ame="http://www.youtube.com/watch?v=2iUX-I1Z-hM"]Maya nCloth Dynamics Tutorial: Creating A Tattered Pirate Flag (Intermediate Level) - YouTube[/ame]
  • fade1
    Options
    Offline / Send Message
    fade1 polycounter lvl 14
    as far as realtime content is concerned, ncloth does not work. realtime content usually needs bones for animation. blendin vertices is way to expensive as far as my experience goes. (nCloth is great for animating cloth by the way...but not for realtime)
    there may be a way to set up a complex rig, but i guess this is a little too much for this problem.
  • ahtiandr
    Options
    Offline / Send Message
    ahtiandr polycounter lvl 12
    There is always way out. I just made a quick test.

    Create plane
    add ncloth
    create locators along the middle edge
    parent locators to verts
    parent bones to locators

    result:
    bones are moving with the simulation and only 5 mins spent on this

    THe next step is to skin the lowpoly mesh to the bones and bake simulation and export to the engine.

    I can place better breakdown later with final result and scene file if you are interested .

    PS. I did some of the simulations in a bit same way for my UDK models


    Here is my test preview

    scaled.php?server=225&filename=flagsimulationtest.gif&res=landing
  • MikeF
    Options
    Offline / Send Message
    MikeF polycounter lvl 19
    ahtiandr wrote: »
    There is always way out. I just made a quick test.

    Create plane
    add ncloth
    create locators along the middle edge
    parent locators to verts
    parent bones to locators

    result:
    bones are moving with the simulation and only 5 mins spent on this

    THe next step is to skin the lowpoly mesh to the bones and bake simulation and export to the engine.

    I can place better breakdown later with final result and scene file if you are interested .

    PS. I did some of the simulations in a bit same way for my UDK models


    Here is my test preview

    scaled.php?server=225&filename=flagsimulationtest.gif&res=landing

    +1 exactly how i'd do it aswell.
    i use this technique all the time for getting various n-based simulations into unity
  • fade1
    Options
    Offline / Send Message
    fade1 polycounter lvl 14
    @ahtiandr
    never tried it that way, but sound nice.
    how do you parent a locator to a vert? do you use clusters?
  • ahtiandr
    Options
    Offline / Send Message
    ahtiandr polycounter lvl 12
    Well I tried clusters but it didnt work. Then I decided to look for some scripts which could allow me to do that but then I just found that maya has a feature called "point on poly" in constrain options and it worked well. I used maya 2011

    scaled.php?server=17&filename=pointonpoly.jpg&res=landing
  • fade1
    Options
    Offline / Send Message
    fade1 polycounter lvl 14
    oh. i think i should have been able to find that myself. ;)
    that's a neat trick for baking, thanks. i will try that out as soon as we have some cloth stuff in our games again.
Sign In or Register to comment.