13
$\begingroup$

I want to see the propagation of a compressional wave in a cube. I meshed a cube along Y and just added wave in this same direction as follows:

Screenshot of wave

But only the first and the last Y normal surfaces move while the rest of the cube remains completely still. How do you get all the surfaces to move to illustrate the propagation of a compression/dilatation wave through the cube?

$\endgroup$
4
  • $\begingroup$ You may have to delete the surrounding geometry, that is all the short edges. $\endgroup$ – ZargulTheWizard May 17 at 13:08
  • $\begingroup$ i do not think that this is possible...but...surprise me! ;) $\endgroup$ – Chris May 17 at 13:13
  • $\begingroup$ In which direction do you want the compression? Longitudinal (along Y), or transverse (in XZ) ? $\endgroup$ – Robin Betts May 17 at 14:32
  • $\begingroup$ longitudinal, along Y. For transverse it's ok. $\endgroup$ – Newenda May 17 at 15:15
16
$\begingroup$

For illustration, you could pass an Empty down the length of the cube, create a vertex group in the cube, (say, 'Prox',) and give the cube a Vertex Weight Proximity modifier, modifying the weights in the group by the proximity of the Empty.

Here, we see the Vertex Weight Proximity modifier, affecting the 'Prox' group, targeted on the plain-axis Empty, and the consequent weights (made visible in the 'Overlay' settings,in Edit Mode).

enter image description here

Those weights can then be used to control other modifiers. For longitudinal compression, you could parent a plane to the Empty, and give the cube a Shrinkwrap modifier, projected in + and - of the length-axis (mine is X) towards the plane, weighted by the 'Prox' group:

enter image description here

If, for example, you wanted a leading compression front, rather than contraction on both sides of the plane, you could get the shrinkwrap to project on one side only.

This, though, is as shown:

enter image description here

For transverse compression, you could use a Displace (along normals) modifier instead of the shrinkwrap.. no need for the plane:

enter image description here

If you needed something more mathematically exact, I'm sure there will be a Geometry Nodes solution. For that, maybe you could provide your wave function.

$\endgroup$
7
  • $\begingroup$ Warp modifier could let you skip the proximity, if what you want is just a loc/rot/scale transformation. $\endgroup$ – Nathan May 17 at 15:30
  • $\begingroup$ Hi @Nathan! I'm not very experienced with Warp .. please post an answer if you have time, if not , I'll have a play with it when I do. $\endgroup$ – Robin Betts May 17 at 15:33
  • 1
    $\begingroup$ Woooooowwwwwwwww $\endgroup$ – Chris May 17 at 15:38
  • $\begingroup$ It kind of demands animation demo, and I've never figured out a good, easy enough way to show that here-- do you viewport render and convert to gif using a different application? Gif is so painful.... $\endgroup$ – Nathan May 17 at 15:48
  • $\begingroup$ @Nathan is right.. Warp gives you the choice of a custom falloff curve, which might be just what would suit this case. I use Bligify to convert viewport animations (Linux) $\endgroup$ – Robin Betts May 17 at 15:49
8
$\begingroup$

A warp modifier is a nice way to do this:

enter image description here

It measures the transformation from one empty to another empty, and then applies the transformation to the mesh in a given radius, with a specified, even custom curve, falloff. The radius is measured from the "object from" object, which can then be animated along the length of the curve. I typically parent the "to" object to the "from" object. The scale of the "to" object is shown in my sidebar; that's the transformation the mesh is undergoing.

enter image description here

$\endgroup$
5
  • $\begingroup$ Cheers! Must get my head round this one. $\endgroup$ – Robin Betts May 17 at 15:59
  • $\begingroup$ Hi Nathan, nice idea. Where is your second empty on your example ? thx $\endgroup$ – Newenda May 17 at 17:52
  • $\begingroup$ They're both at the same location. Both are selected in the still; the active selection is the "to" and the secondary selection is the "from." $\endgroup$ – Nathan May 17 at 18:03
  • $\begingroup$ tks, But in the blender new version, empty properties is different and dont offer the same menu at all... and cant find a tuto about that.. i.goopics.net/JqKra.png $\endgroup$ – Newenda May 17 at 19:23
  • $\begingroup$ The modifier isn't on the empty, it's on the mesh. That's version 2.92, the latest release, and there haven't been any differences to empties for a long time anyways. $\endgroup$ – Nathan May 17 at 19:29
5
$\begingroup$

To add to the very functional answers already here, I would use a Lattice modifier with a moving Lattice object.

This allows for not only compression waves, but also transverse waves and even spacially asymmetric combinations of transverse and compression waves with arbitrary waveforms:

enter image description here

$\endgroup$
1
  • $\begingroup$ I honestly don't know why my answer is attracting so much UV.. I think both yours and @Nathan's suit the OP better. You have to play with the lattice a bit, to understand the difference between transforming it in Edit and Object mode, but in the end it can do everything in my answer, more simply. $\endgroup$ – Robin Betts May 18 at 18:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.