World Position Offset / Vertex animation Question for UE4

Hey guys,

I’ve been mulling over this for a few days trying to find a solution to no avail. I came across a few similar questions posted here but nothing that quite answered my question.

I am trying to recreate this as a reference:

White blood cell chases bacteria

In UE4 the white blood cell would be controlled using the WASD keys by a player, I would like the mesh to morph towards the direction the player is moving to.

Through my research I have looked at using the World Position Offset but I don’t know how to or if it’s possible for that matter to have the world offset to point towards where the player is moving to (perhaps using an empty actor that rotates around the player mesh).

I also looked at procedural meshes using Houdini (I don’t have a commercial licence yet) but that is far from my scope of knowledge for the moment but if it’s the better solution please do suggest it, I am willing to learn.

Finally I came across Vertex Animations which once again I would not know how to tackle. Of course there is the standard animations but that would require a lot for each direction and transition which seems in-efficient.

Any advice would be appreciated, even a nudge in the right direction would help cheers.

You could use an empty / dummy actor / component that would set a vector3 which would then be sent to the cell material via a Material Parameter Collection. Then, subtract that position from the object (cell) position to get the direction, and then multiply the world position offset towards that direction. You can control that using noise maps so it’s not that “perfect” :cherry_blossom:

Okay awesome cheers, I’ll look into and give it a little try later this afternoon and see if I can get it to work. By noise maps do you mean creating my own that would be custom to what I need or to use the Noise Node that Unreal comes with since it has a bit more functionality?

Agreed though the noise map won’t be perfect but I think it would fit the job well enough for me in this instance.

1 Like

Yeah you could use both, mapping that noise into worldspace or object space. Perhaps try triplanar mapping even.

So I couldn’t quite get the effect I was looking for as demonstrated in the video I linked in my question. And since we have basic movement for our characters atm, we haven’t implemented a proper blueprint that I could add to, also the pawn is locked in our source control since our programmer is using it.

But I managed to get a shader I was happy with for the time being, it has around 410 instructions which could be costly, a fair chunk of it comes from the noise node. I uploaded it here in anyone is interested:

World Offset Material

I can’t take full credit, most of the credit goes to Tiko, anyone interested you can find them on Artstation,

But I did add to the node tree, tweaked the parameters, added my own textures made in Substance.