Fake physics effect driven by vertex color

Hi,

I’m a rigger day to day and at my last job I had to (using the red channel) paint verts on the clothes for our characters to have physics drive them in unreal… the effect wasn’t true physics, more adding a stretchyness to the verts driven by the animation.

I’m at a new place now and I’d like to do the same thing to make cloth movement a little nicer but I can’t find anything to describe how to set this up in unreal. Sorry for the vague title i’m really not sure what this physics system is called but I’m hoping someone can direct me to the correct documentation

The effect you are referencing to is usually achieved by moving vertices in a vertex shader. It is commonly named as World Position Offset animation in UE4. To use it, you would have to set up some kind of system, that would drive them. A simple sine wave would do for start. This is done in material editor. Vertex color is usually used to control the strength of the effect.

Here is a link to the tutorial that covers the basics of creating such material.

In any case, this type of animation is driven by parameters that are passed to the material.

Thanks!

Ironically I’d already found this same tutorial to work from, great for textures, I’m not sure what I’d need to plugin to have the verts react to the animation… though I plan to experiment to see what works to get the effect I’m after

I’m just looking to get minor wobble on loser clothing of my character, it’s slightly loose but not enough to warrant having its own bones to drive it

What to plug into WPO slot entirely depends on what effect you are after.

Depending on what you are trying to fake the simulation for, there may be better solutions. For example, if it is a character’s cape, you’d probably better use regular skinned mesh. Its bones could be driven by physics.

but not enough to warrant having its
own bones to drive it

Then you are on right path. I’m not exactly sure how to approach this either, but I would probably pass character’s velocity to the material as float, and would multiply that by amplitude of some sort of wave(sine would do, but triangle wave would be probably be better).

This wave would control Z axis motion of loose things on the character. I would also use two vertex channel to define what parts of the mesh would move and their individual phase offset. For example, vertex color red channel would control which parts of the mesh are influenced and how strongly. Green channel would define phase offset shift for various elements.

Probably one could do something more advanced, but that is first thing that came to mind.

There is also an amazing tool for MAX users that is designed for vertex animation, but not It is not for skinned meshes.

If that was of any help to you, please toss me a vote and mark the answer as correct.
I’m farming karma for the badge ≧◉◡◉≦

I think you may have cracked it… I’d experimented with pass a sine wave though the verts and was getting a fairly un -inspiring result using the world offset nodes for flag vert animation.

It never occurred to me to bring in character velocity in to drive the wave… which in hindsight i should have though off as I’d been using pink on my vert color because I knew I’d need to channels to get the vert color data from.

I think you may have cracked it… I’d experimented with pass a sine wave though the verts and was getting a fairly un -inspiring result using the world offset nodes for flag vert animation.

It never occurred to me to bring in character velocity in to drive the wave… which in hindsight i should have though off as I’d been using pink on my vert color because I knew I’d need to channels to get the vert color data from.