2

enter image description here

The flat linear Mesh is displaced and animated and i added Geometry Nodes so that the balls always stay on top of the other mesh. But is it possible to rotate the balls individually according to the deformation of the other mesh?

This is the render but the balls all rotate in the same speed:

enter image description here

quellenform
  • 35,177
  • 10
  • 50
  • 133
Felix
  • 21
  • 2
  • Just a question: Don't the points position change all the time when you distribute them on a moving mesh? – quellenform May 07 '22 at 17:38
  • No the stay the same but move along the z axis according to mesh – Felix May 07 '22 at 18:21
  • The balls always stay exactly on top of the wave – Felix May 07 '22 at 18:23
  • 1
    OK, I understand. Please share your blend file with us, I am not quite clear about the structure and what exactly should be rotated in which case and how. ...or supplement your question with an explanatory sketch – quellenform May 07 '22 at 18:32
  • How do you animate the plane? With geometry nodes or by key frames? This is important to know, because you need the speedvector of the plane to calculate the rotational speed of the balls. – André Zmuda May 08 '22 at 07:08
  • If your question has been solved, please be so kind and mark the answer that contributed to the solution as "Accepted answer". This will make it easier for others to see which path leads to the solution, and the question will no longer show as unsolved. Thank you! Here you can find more information: What should I do if someone answers my question?. If you still haven't gotten a solution to your question, please be kind enough to address it. – quellenform Sep 16 '22 at 14:58

2 Answers2

3

I would try this approach:

Use a curve line, raycast this to your displaced plane and then you can move and rotate your balls according to that curve with the help of the sample curve like this:

enter image description here

i didn't fit the rotating speed to the movement exactly...but i think you can fiddle that out (or even solve mathematically)

node setup:

enter image description here

enter image description here

Chris
  • 59,454
  • 6
  • 30
  • 84
3

Generating a landscape for testing, where near the Y=0 the plane is flat, and it gets more wobbly further from Y=0:

Wobbly Plane custom group:

You can calculate distance traveled towards each point on the X axis by using Accumulate Field node.

Distance custom group:

You can now create a mesh line for instancing balls, and align it with the plane geometry, so the balls slide not only on the plane, but precisely on the edges of the plane. Since interpolation will be used later, this step might not be necessary...

Align Instancer custom group:

Now use raycasting to drop the balls on the plane and also read the interpolated distance (how much a ball has travelled on the surface).

Drop Down custom group:

What's left is a very simple custom group Object Info:

Perhaps the magic number 157.075 should be calculated there... I got this number by multiplying π by .5 - as that's the radius of the ball, and then by 100 - I honestly don't know where the 100 comes from. I'd appreciate if someone would explain.

I also added a shader to display the distance on the wobbly plane with 10 cm increments:

Markus von Broady
  • 36,563
  • 3
  • 30
  • 99