Create an Animated Flag

Discover how to use the cloth simulator to create a “bloody good” flag animation.

Length:
19 minutes
Software:
Blender 2.54
Difficulty:
Beginner
Rate:
VN:F [1.9.17_1161]
Rating: 4.8/5 (56 votes cast)

In this tutorial you will discover how to:

  • Create your first cloth simulation
  • Tweak cloth settings to produce realistic results
  • ‘Pin’ a portion of cloth
  • UV unwrap an image onto cloth
  • Setup a wind object with randomized patterns

Many years ago, if you mentioned the word ‘fabric’ to a 3d artist you would have seen visible signs of nervousness. Just the thought of all that moving mesh was enough to make anyone’s stomach churn. But in 2006 the cloth simulator was born, allowing even the most amateur artist to create realistic cloth physics at the press of a button.

Like me! In 2009 I used this very feature to create the final shot in my short film The Ballad of the M4 Carbine. I’ve since received countless emails from people asking me how I did this so I thought I’d finally get around to creating a tutorial ;)

The finished result:

Hear that? That’s raw patriotism right there…

In this tutorial I’ll be walking you through the basics of cloth simulation and how to use it to create an animated waving flag. If you’re a freelancer this type of job is bound to crop up from one time or another, so it’s a good trick to have under your belt.

At a Glance

Screenshots from the video:

What creative uses can you think of for the cloth simulator? Leave a comment below :)

Download finished .blend Create an Animated Flag, 4.8 out of 5 based on 56 ratings

About Andrew Price

User of Blender for 9+ years. I've written tutorials for 3d World Magazine and spoken at three Blender conferences. My goal is to help artists get employed in the industry by making training accessible and easy to understand. I'm an Aussie and I live in South Korea ;)
  • http://www.facebook.com/dpreisner David Preisner

    Thank you so much for this very well done tutorial! I had no experience using Blender so I had to look up some tutorials on how to navigate, but other than that, it perfectly enabled me to do this:

    http://www.youtube.com/watch?v=wy01trW8B8M&feature=share&list=UUO8_P4l2bPM6C8VbHgJ821w

    I really like what Matt Jones did (previous responder) with the flag being attached to a moving poll. I will have to try that sometime.

  • MazZ

    Nice tutorial, I used it in the intro of this video :)
    I also used the cycles engine, does still need some tweaking though.

    http://www.youtube.com/watch?v=bUV-8TbPmV8

  • Nikhil Shetye

    hey how to get hard object like collar on same soft cloth… is there any way we can give different bending for same object at different section??? maybe using vertex group etc. thank you

  • Sumcrab

    Thank you very much for this tutorial :) I’m using v.2.65 and it is still upside down :>

  • Marcio

    Wow, great tutorial, thank you so much. Here is my video of Brazilian flag:

    http://www.youtube.com/watch?v=0FXeEM2f_R4

  • Joshua

    Hey, great tutorial.
    One thing though, I don’t know how to create the string and make it move with the flag. Can you please explain to me how to create the string and make it move with the flag as one object?
    Thanks, Josh

    • Somebody

      Onething you can do is make the pole in the same mesh as the flag, that connecting the string to a part of the flaf using alt + m for collapse. Make the pole into the vertex group for pinning so it stays stationary, make sure you don’t do this to the string. Your string should now animate with the flag.

  • http://www.facebook.com/profile.php?id=100000854932058 Timo Hellmund

    I actually do not get what you did in the 10 seconds you unwrapped and rotated the whole thing. I just do not get it right *being a raw recruit

  • Rome723

    Thank you very much for this great introduction to the cloth simulator.

    Here’s my result, the only quadratic flag in the world: the Swiss flag.

    http://youtu.be/EZHWjCpw90w

  • Matt Jones

    Oops…

    This is the latest, with various glitches fixed. Sorry for the spam…

    http://www.youtube.com/watch?v=D7DGFJoHB-g

  • Matt Jones

    This one’s slightly better than the last, in terms of shadows, camera movement etc. Btw, for anyone who complains about how your tutorials are hard to follow: grow up. This stuff is hard. There’s a lot of complicated stuff to keep straight. Andrew, you make it as easy as possible to do this hard stuff. And you have the eye of a true artist, and share those critical insights with us in a really helpful way. From beginning to end, this took me a couple of hours, following your tutorial. Can’t thank you enough. Thanks again!

    http://www.youtube.com/watch?v=Ja4XGHmXyrM

  • Matt Jones

    Andrew,

    Your tutorials are fantastic. Thank you so much. I’m saving up my cash to enroll in your Nature Academy. Here’s my attempt at an animated flag, attached to an animated raising of the flagpole.

    I know there’re still problems with lighting/shadows/texturing, etc. Any comments would be appreciated. Next up: adding whispy battlefield smoke, more realistic environmental lighting, getting the smoke simulation to match the wind driving the flag, etc… Anyway, thanks again. I’m a big fan.

    http://www.youtube.com/watch?v=jO-SV4ZtWaE

  • bluelight

    thank u andrew
    i just wanna say thank you
    coz u made me a better 3d artist witht ur tutorials!
    and i wasn’t just able to do what u did in ur tutos
    but i also did came up with my own scenes and technics thanx to ur awsome explanation to the basics
    thanx :)

  • Kaffeeteria
  • Kaffeeteria

    I’ve been watching your tutorials for the past three weeks and I learned so much that I just want to say THANK YOU.

  • http://www.facebook.com/cliff.blank Cliff Blank

    What would you do to make the waving a seamless loop? I’ve seen it done by blending the dynamic caches with an offset in Cinema4D. Just curious if it can be done in Blender.

    • Kaffeeteria

      I would add the same animation, just backwards. :)

  • Bill Smith

    Hi Andrew,
    Great tutorial. I do a local children’s show about a bunch of pirates. I needed a pirate flag for the virtual pirate ship background. Here is a scene with the flags on a pole on the ship’s railing. Thanks
    Bill

  • Bryan Vivas

    Here’s my result after doing many practices and renders, Andrew take a look to this and comment if you can please.

    http://www.youtube.com/watch?v=XW_HIh2VMbc

    Thanks for this great tutorial!

  • sean

    hi

    I would like to make an animated flag,but with our triangle club pennant.
    is it possible to do,if so could you help me please.
    it needs to be on a transparent background.

    many thanks

    Sean

    • Didier

      It is almost the same, the only diference is that you might want to select the right corners and click collision, i believe is was alt M and select center, I don’t know if you could just use either subdivide, subdiv surface or resolution modifiers but I think it would still look good with bit more vertices than used in this tutorial. Also, I believe there are som Transparent sky backgounds (so just the clouds).

  • gearsofdesign
  • Jen

    Thanks for the awesome tutorial!

  • upriser

    here is my video based on this tutorial:

    https://www.youtube.com/watch?v=k0zYJdwqo0g

  • Ben

    hey guys, when i bake the cloth sim, it looks great inside blender

    but when i go to render our the image, the flag is completely flat?

    anyone know how i can fix this?

  • http://www.solidstate3d.com Michael

    Thanks for the great tutorial. I’ve been meaning to use these cloth techniques for quite some time but have had issues in the past getting just the right setup. Your tutorial is by far the most clear I have seen and it got me up and running fast.

    Attached is a link to a video I made using your techniques highlighted in this tutorial:
    http://www.youtube.com/watch?v=NhuVSJDvjQ8

    Thanks again! Keep up the awesome Blender work! ;)

  • Matt

    Awesome! You don’t need to UV unwrap the flag. Just give it an image texture. That simplifies things a lot.

    PS
    After the tut I googled australian fag!

  • SGTHoward

    Here are my results from this tutorial. I think I need to work on it a little more but I am impressed with the results so far. These tutorials are great

    http://www.youtube.com/watch?v=EmfGvx-sju0&feature=youtu.be

  • http://monftpamwa.free.fr/dotclear/ Mut
  • Casey Jones

    LOL dude you get a drink in all of your videos haha

  • Johnstein

    I made a Blood Raven Banner

    http://www.youtube.com/watch?v=qw3ffOvG8Ic&feature=youtu.be

    Thanks a lot!

  • Digir

    I’m a beginner with this software but no luck so far. I tried using the finished blender and modifying it but the flag goes into itself and goes weird.
    btw, great tutorial

  • DeGa

    Thanks a lot for all your tutorials, really helpful.
    I’m a hobbyist 3D modeller for games and will use this for generating an animated texture.

    Is there a way to loop the animation for texture generation purpose?

  • Whitehat

    Here’s my flag…

    http://www.youtube.com/watch?v=caTgmEqOoU0

    –Whitehat

  • https://www.facebook.com/pages/blender-Works/132831550129151 tarik bagriyanik
  • Lewis

    When i try to render it just shows up as a flat flag no matter what frame im on. everything is subdivided as well. any suggestions please?

    • Hernan

      I have the same matter, i dont know why :( when i render it looks just like the normal plane but in 3D view everything works OK, i want to know how fix it

  • http://APROCKS Lolz

    Funny. I heard it was a typo when you typed in “Flag”

  • Gary
  • Gary

    You don’t know what you’ve unleashed.
    hehe

  • Connor

    quick question: my flag doesnt drop when I hit alt a, but this happened before where my plane slides through the collision cube then folds up like a taco. I’ve had experience with the cloth sim and I’m on 2.48…any tips?

  • aXel

    Issue here,
    If I increase the frames, cloth animation is not working for increased frames. I reapply the cloth simulation but still i got the same problem. It works only for 240 frames, please help.

    • Dontwalk

      I had this same issue. After hours of searching I found that you need to select your “cloth” and in the change the to the length you’d like your animation to be.

  • http://www.youtube.com/user/CroHack97 Lemonek
  • Brandon

    Hey Andrew,

    I was just wanting to know how to make proper clothing like say, a Shirt or Pants. How would you go about doing that?

    Please if you have anytime that would be muchly appreciated
    Thanks

  • http://megatron.fear@gmail.com Leon

    http://www.youtube.com/watch?v=DsfL7z_Inzo Finnaly madi it Pls Thumbs Up :D

  • Wreckless

    after attempting the tutorial and managing to m,ake a flag i tried to get background on it and a flagpole with no success
    so i downloaded andrews finished blend
    opened it in blender changed the flag image to the one i had made changed the background to the one i wanted then went in to the lines and the animation settings to make the flagpole reflect the background and look like it was on fire took some time to get what i wanted there i also changed the lighting color in all 3 lamps to match what i wanted
    hope that is what you where asking

  • http://www.3ddersler.tr.gg Kartal

    Andrew would like to ask you something: You told the flag, but how you follow that line would not show it, Is it possible to continue?

  • wreckless

    I am a first time blender user found this by chance and spent some time reading the manual before attempting the tutorial
    here is my first ever attempt at doing the tutorial sadly i could not find how to put a flagpole on or make the background move
    http://www.youtube.com/watch?v=tlIq29sWAFo

    so in the end i messed with the finished blend to make what i was trying to get although it was not the correct thing to do and i will read more tutorials and the wiki manuals i have found until i can make my own,
    i would also like to attempt to put music on it if i can find a tutorial for that
    here is the moded download blend hope you dont mind me using it Andrew
    http://www.youtube.com/watch?v=4zcCV0b71p4

  • Jamil Ahmad

    Hi all

    can any body tell me how to download this flag source codes into my site that I am preparing? I have downloaded the Blender but don’t know how to copy this flag and use some other flag.

    I am not a web expert

    Please email me also if you don’t mind
    Thank you

    Jamil Ahmad
    jamil7811@hotmail.com

  • http://www.youtube.com/user/TRexFamilyProduction TRex

    Thank you again. Here is my version of a classic,
    http://youtu.be/zvV8v3JLbGE

  • http://www.youtube.com/user/TRexFamilyProduction TRex

    Thank you again. Here is my version of a classic,

  • PKHG

    To Alfonso:
    Having done a render (Bl 2.5), there is a ‘below’ a button: Image … press it etc.

  • Alfonso

    I did the tutorial following the instruction of Andrew…But I don’t know how ti trasform this in an animation…So would someone please tell how to do that? and also how to save a photo of the rendering as Jpeg or something else…
    Thank you!

  • Pingback: june 1st « jdtech12