Animated Flag

Select your particles and add two fields, a Turbulence and Uniform. For the Turbulence field you want to create and expression on the phaseX value of “turbulenceField1.phaseX = frame;” and set the Attenuation to 0 and Frequency to 1.5. This will add a more natural ripple to the effect of your flag when it is blowing so it does not just blow straight out with the uniform field. For the uniform field you want to turn Attenuation off and change the Magnitude to 8. This will be used as your wind for the flag to blow and act naturally when you play your animation. You can animate the value of the Uniform field's Magnitude to animate your flag blowing. Another option would be to use an Air Field in place of the Uniform to generate natural wind that you can animate blowing from side to side.

You may have noticed that your flag intersects itself when it moves. This is a limitation of the soft body simulator where it does not have particle-particle collisions, but there is a way to fake it. To get around this you will select your particle object and add a Radial field. Then select your particle and the Radial field and use the pull down “Fields > Use Selected As Source Of Field”. Your Radial field will now become parented under the particle object in the Outliner. Open your particle object (+) and select the Radial field. Change the applyPerVertex to on, and maxDistance to 2. Now when you play your animation the particles will act as if they have a tiny force field around them so they do not inter penetrate themselves.

Now it’s time for our flag pole. Create a NURBS cylinder in the front viewport to use as a pole. Then once you have your pole created and in place, use the pull down menu “Particles > Make Collide > Options”. Change the Resilience to 0 and the Friction to a value between .1 and .2. Resilience is how “bouncy” you want the collision to be, and Friction is how much you want the particles to stick to and grab your collision object. Since a flag material is not bouncy and you want some friction but not much, values of 0 and .1-.2 respectively will be fine.

Select your particles and enter the Dynamics Relationship Editor (Windows > Relationship Editors > Dynamic Relationships…) Select the “Collisions” radio button and click on the NURBS surface shape for your flag pole to link it to the particle collisions node.

Now your particles collide with the flag pole and respect this collision. However, you may notice the penetration again. To fix this you want to select your flag pole and in the “Outputs” section of the channel box open the “geoConnector” node and change the tessellation factor to 500. Now the collision will read the surface more accurately and you will get a realistic reaction to your flag interacting with its pole.

Back - Page 2 Next - Page 4
Jump to Page: 1, 2, 3, 4