Moving a whole object (not the individual verts) in material.

Hope this is the right place to ask, I want to create the effect shown in this video where the Hexagons are displaced in the Z-axis as a whole object. However, I can’t find a way to keep the objects rigid. What am I missing? any help would be massively appreciated.

I achieved this version in blueprints and it is VERY heavy, especially in larger areas of water.

Thanks.

Plug a Time node into a Sine Node. Multiply this by a factor of your choice. Multiply this by a Float3 with an RGB value of (0,0,1) to get a vector that = (0,0,Wave). Plug this into the World Position Offset of the material. It will now move in a sine wave pattern.

You can use anything to modulate the vector, not just a Sine wave.
A panning world space noise texture would more closely resemble your video, for example. Same story, multiply the desired offset by (0,0,1) and it will apply it only in the Z direction. This sort of panning texture is often how wind is faked when controlling grass.

The WPO expects a V3 where (R,G,B) represents an offset amount in each of those directions as (X,Y,Z). By plugging in an input with (0,0,Z) you’re telling it to offset the entire mesh in the Z direction only.

If the event you only want to move part of the mesh, such as the surface, you would also multiply the result by a mask to control how strong the effect is on a given vertex. But since you want the whole mesh to move, you will not need any mask.

1 Like

Unless im missunderstanding you, unfortunatley this will create a wave effect WITHIN the individual objects, as in the verticies will animate and not the objects. Distorting them creating and effect more like this: Water test (unused) - YouTube

You are misunderstanding.

He’s applying a Z-only offset to the entire mesh, not part of the mesh.

Make a scalar var, plug it into the B/Z portion of a make3 node. Leave X/Y at 0, plug that into WPO.

Go into your material instance and you ought to see that as you move the scalar up and down, so does the entire mesh. You are not multiplying the offset math(s) by anything, no alpha’s, no masks, so the changes are pushed to the entire mesh.

Hope that helps.

Indeed. The factor that you multiply the Z by must be the same for all verts of the mesh in order for them to move uniformly. In order to make a noise texture uniform across an entire mesh, you must sample the same pixel at all vertices instead of projecting the texture normally, or else the output will differ at each point.


Here’s an example that samples the center pixel of a panning noise texture, and uses it to modulate the Z position of the mesh.
meshbounce
And here’s the result.

2 Likes

Really sorry for such a massively late responce. I appreciate the effort you put into this, thankyou. Ill mark this as the solution as it sort of was.

Your solution allows for a single mesh to be moved as a whole rather than the vertecies however when applied to multiple objects it forces them all to move in unison and not create a wave affect without messing around with them in BPs (which has the same impact on performance as just doing it 100% in Bps would).

Again, appreciate the time you took with this. and again, sorry for the late responce.

I KNEW I had a link for what you were looking for, a pintable-floor: Pintable Effect - Living Floor- [Unreal Engine 4 Tutorial] - YouTube

Also, I haven’t tried it yet, but what you are looking at is essentially a panning noise texture in your video. Just spitballing b/c I cannot test, but check the object-position of the mesh against the wave, and base your move maths on that location vs the vertice(s). If you reference the object-position it’s always the same for each vertex, single point of reference.

hi David i am wondering if you have been able to acheive your effect , i’am trying to reproduce it since 3 days with no success.
any insight is welcom, thanks!

Im afraid not, I was forced to move on from the project and havent really been able to give it more time. If you do ever figure it out though please do let me know.

thank you for your quick answer David. i found another solution but its not clean at all !

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.