Better resources for WPO usage / vertex displacement

I’m looking for something that can help me better understand why everything I try to do when it comes to displacing vertices outside of the usual formulas never works as I expect.

In this instance, I’m using a vector field gradient to displace vertices in the direction the gradient calls for.
Stuff seems to work, but then if you look close it really doesn’t. My neutral area (RG .5/.5) is being displaced sideways instead of staying put.
I’m using RotateAboutAxis and it somewhat works, I think the issue is the pivot point.

Anyway, I’m looking for any/all learning resources that can (even with custom) help me to actually do what I want in a shader…

Top of the list would be detecting the adjacent mesh vertex so that a distance can be calculated and used within the material. Given how WPO works i’m fairly certain this isn’t possible without some pivot point or vertex color to isolate it.

I’m concocting a pivot paint system for this… I think it’s the only way really.

WPO takes in a vector 3 and displaces the vertex according to the the vector, meaning if you didn’t want it to move then the value should be 0,0,0.

If you wanted it to move 1 meter down in Z then you use 0,0,-100.

If you wanted the mesh to expand 1 meter along its vertex normals then you would multiply the vertex normal by 100 and plug it into WPO.

In your example, R0.5,G0.5 would move the vertex half a centimeter in X/Y. If you need 0.5 to be the “do nothing” point then you will have to make it 0 by doing 2x-1. You only listed RG (v2) though, I’m not sure what what actually happens to the third channel when you plug in a v2… for the sake of your sanity you should probably just append 0 to it to make it a v3.

I agree that the documentation is not terribly helpful in this case.

I would assume you are correct, you’d probably need to precalculate the distance to the nearest vertex and store it as data some way. If you only needed the distance then you could store it in a single vertex color channel, if you needed a vector to it then you could use RGB.

But if you needed the distance and direction to every adjacent vertex… you’d need a much more elaborate solution.

A vector field it’s it’s own thing that works based on a UV.
A uv has a range of 0 to 1 providing direction.
.5,.5 is therefore the Neutral area - the center of the UV, or No movement.

This is being used as a normalized value in the pivot rotation and works fine (with x2, -1 to get it into the correct range).
What isn’t working is the Pivot for each vertex.
And OR Niagara is pulling a fast one on my and altering the color of the particle that defines the texture, which I suppose is possible.

However the question isn’t really about my specific use case, as much as needing more resources to learn new/better approaches to common questions like distance between arbitrary X and Y.

And in the end it wa a Niagara issue. the sprite is somehow lighter in color then it ought to be. I had to add a x2 to the emissive in order to get the correct effect.
I just hope I remeber about it when they fix whatever the display/capture issue was …

. Bump.
still looking for better WPO usage resources/tutorials/examples/etc.

primarily, need better documentation on StaticMeshMorphTargets inside materials