How to create a waving flag with LightWave 3D ClothFX

Happy Independence Day! July 4th – Spirit of 1776

Today I’ll show you how to create a waving flag with LightWave 3D ClothFX. I used this approach to create a 3D animated greeting for Independence Day as a social media marketing meme. The flag textures used for this 3D animated waving flag is based on a new and improved version of the colonial “Betsy Ross” flag graphic that I created in a previous blog post.

Creating the waving flag 3D model

How to create a waving flag - 3D flag model

Before we can wave the flag we need a flag to wave. Creating the model is easy enough. Create the pole and attachment strings on the first layer. On the second layer simply create a rectangle with a medium fine mesh for use as a subdivision surface. In order to prevent the corners from rounding too much simply slice the top and bottom rows near the top and bottom edges. Set the surface to double sided and apply the texture maps for color, bump, specular, translucency, etc. Parent this flag layer to the pole layer so that the flag moves with the pole.

Creating the connection points of the waving flag model

In order to keep the flag attached to the pole you need to anchor some points. Create a selection map of points that will be anchored to the pole. In this case I selected sliced down the row of polygons along the pole edge to create added geometry. I selected three points around each of the two grommets, two points along the pole and one point where the string penetrates the grommet hole. This selection map may then be used to tell ClothFX which points are fixed.

Applying FX_Collision to the Flag Pole Object

I applied an FX_Collision dynamic object to the Pole layer. I created a new Group named Flag for all the flag dynamic objects to share. I set Radius 0, Bounce 100%, Friction 200 and Fix 50.

Applying ClothFX to the Waving Flag Object

I applied ClothFX to the flag object layer. On the Etc tab I selected the Cotton(thin) Preset. This provided a good starting point.

On the Basic tab I set the Group to Flag. I selected the ConnectionPoints pointset selection map on the Fix popup menu to fix the flag to the pole. I then lowered the Sub Structure to 900 to allow a bit more deformation of the mesh than the default setting.

On the Collision tab I set the Collision Dectect to the Colonial Flag/surface. I set the Offset to 20mm, Bound 110%, Friction 200% and Fix Force 50%. I set Self Collision and Double Side to the Colonial Flag/surface.

On the Advanced tab I lowered the Stretch Limit to 1% to prevent the flag from appearing too rubbery. I increased the Compress Stress to 90% to allow more natural folding and crumpling of the surface.

Making the Waving Flag Blow in the Wind

I added two FX_Wind generators set to the Flag group. I used two different Winds so that I could control the main wind direction separately from the rippling of the flag. Wind (1) was used to control the main wind direction. I turned off the Falloff and set the power to 100%.

On the Vector tab I then used envelopes and textures to control the vectors.

I used Noisy Channel modifiers to randomize the main wind direction and strength.

Because the Wind (1) X would be the main component of the wind to have the flag stretch from left to right in the frame I set the X value higher than the Y and Z. I applied a Noisy Channel modifier to it with a Scale of 30 and a speed of 0.1.

I applied a Noisy Channel modifier to the Y channel with a Scale of 20, Speed 0.125 and Phase 0.5

I applied a Noisy Channel modifier to the Z channel with a Scale of 30 and Speed 0.2.

I also applied a Turbulence texture to Wind (1) to add a little more turbulence to the main wind directions.

I used a separate Wind (2) generator to control the side to side rippling of the flag. This way I could turn each Wind generator on one at a time while working out the settings for each. I turned the Falloff off and set the Power to 3000%

I used a texture to create the rippling of the flag motion.

I used a simple ripple texture on the Z channel by scaling the X and Y to 0.

DreamLight Constellation Network Render Controller

DreamLight Constellation 3D Icon LogoDreamLight® Constellation is our cross-platform network render controller that combined with DLI_SNUB-Launcher™ makes configuring, launching and controlling LightWave 3D ScreamerNet LWSN for standalone, batch, network and internet rendering, drag-and-drop-dead-easy™.

Created by Michael Scaramozzino - LightWave 3D Artist Profile
Author of Creating a 3D Animated CGI Short & Mastering LightWave ScreamerNet

DreamLight wrote the book: Creating a 3D Animated CGI Short. See what we can do for you.

Leave a Reply