Download

Grass spread away from player material?

Hello, I’ve been struggling with this for some time, can’t get it looking right.
Trying to make grass move away from the player.

I’ve tried using Pivot Painter, but that seems to move the entire grass mesh, which gives some very ugly results:

(Even if it’s masked to only the top to move, it doesn’t look great as it all moves at once)

Then I tried another method with PivotAxis and RotateAboutAxis nodes. It looks much nicer as each blade/vertice moves on it’s own,
but if you stand in the center of a blade of grass, the vertices spread apart making it super fat.

Is there some way to keep the vertices together? So I can paint this patch of grass and have each blade bend on it’s own like above?

OR
Are there any other ways you’ve seen for a mesh to spread apart like the second example or any ideas?
Would love for the grass to split up like that but I can only find examples on the first, where the whole mesh moves at once.

Any info is appreciated!
Thanks!

One method I see the most is a spherical mask based on the player position(driven from Blueprint), and that mask drives the vertices scaling down to 0,0,0. It looks okay in first-person, but haven’t seen it in third-person. Might be worth a try.

Yeah that’s how both the above materials work, using a spherical mask and player position. Actually bending the grass is the real problem though. I can’t figure out a way for each piece to bend (instead of just the whole mesh) without it splitting apart.

Bump, anyone?

Only by using triangular faces I think…

create a gradient from the bottom to the tip of your leaves (in range from 0 to 1) and multiply this with your bending strength.

For further information check https://developer.nvidia.com/gpugems/GPUGems3/gpugems3_ch16.html

And what? He uses spherical mask and pushes vertices from character position. There is no way to push whole grass blade in vertex shader, because there is no method to mask it in this case.
Two vertices will move in different directions if you stand between them.

Only solution, as I said above, is to use triangular faces for every blade. 2 vertices at the botton, and 1 on top.
In this case only top vertex will be pushed.