Sign in to follow this  
Hunter789

How to approach the animation of a windsock?

Recommended Posts

Hunter789    113

Hello!

 

The project I'm working on requires to display to the user the direction and the strength of the wind in the environment. Two things come to mind for this: a traditional flag, or a windsock, the kind of white/orange cone-ish thing used in airports.

 

I'd like to see what would imply implementing the windsock option.

 

The project is a 3d simulation. We use OpenSceneGraph (OSG) as our rendering engine, and OpenDynamicsEngine (ODE) as our physics engine.

 

I'd like to know how I should tackle this as I'm little confused now. I'm aware that there is the concept of mass-spring systems that exist, but I'm not completely sure it applies to this. Maybe it's more of cloth simulation related?

 

Even if we have a physics engine (because I'm guessing this could be done with it), I'd like to see if there would be a way to do this mostly by using shaders (for the sake of learning how to do it, and because we might change our physics engine soon). We don't need to have physics interaction between the windsock and other scene components, it's simply needed as a visual reference.

 

How could I tackle this windsock? Any kind of pointers/resources are welcome smile.png

 

Thanks!

Share this post


Link to post
Share on other sites
Tangletail    2915

I can give you a few tricks.

 

A. Physics. I am not sure if ODE has support for forces. But I believe Bulletphysics does. This is expensive however.

 

B. 3D animation. You use a regular canned animation. This can be generated from blender pretty easily using real physics. You'll probably need to use bones to simulate it, as vertex morphing is pretty expensive.

 

C. 3D animation blending with displacement maps. You hold a few animations that you blend between. One for dead. One for max. And then a few animations in between. You blend them as your wind grows more intense. As for the displacement map. You can use it with to simulate ripples among the verticies hardware side. Or better yet, generate a normal map from it.

 

You procedurally generate the map, Sawtooth with a bit of modification should do the trick.

Share this post


Link to post
Share on other sites
Norman Barrows    7179

dynamic mesh procedurally generated, or done in a vertex shader. cloth/physics model of your choice drives it. perhaps one driving a hoop bones system as used on skinned mesh dresses and robes, or one that manipulates vertices directly. basically its a wind vs cloth physics simulation.

Share this post


Link to post
Share on other sites
monophonic    295
If you don't need to implement physics for exercise, how about a weather vane? A rigid shape that only rotates around the up vector is quite simple to implement. The traditional rooster shape is instantly recognisable to the majority of Hollywood movie watching world to boot.

Share this post


Link to post
Share on other sites
Krohm    5031

Seconding suggestion of using a deformation vertex shader.

As long as the 'strength' and direction of the wind is more or less on the right scale, I don't think you need to run a full-scale simulation of this.

Share this post


Link to post
Share on other sites
Hunter789    113

Hey all thanks for suggestions!

 

I think I'll start by looking into an animation with a displacement shader. I'll have a bit more control over the overall look, and as it's been said, less of a burden on the physics engine.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this