Diving board bending, object hook


(jfarm) #1

I’m trying to animate the equivalent of a diving board:
fixed at one end, and free to move at the other. When a diver
is at the free end of the board, her weight pushes the end of the
board down, and the board curves. From the docs, it sounded like
an Object Hook with Falloff was exactly the thing to do this.
By moving a hooked Empty downward, I should be able to bend the
end of the board downward too.
But no matter what I’ve done so far (resetting object origins,
clearing hook offsets (transforms)), it is always the middle of
the board that moves with the “parent” object, instead of the end
of the board.

So after messing with it a couple hours, and Googling and searching
forums, and still not getting it to work the way I want, I’m
feeling pretty stupid, since this seems like it should be Blender 101
easy. I’m hoping someone can point out my error, or maybe suggest
an alternative. (Though, my “diving board” has ~3000 vertices,
so I’m not sure if I want to get into vertex keying!)

Here is a simplified example of what I am doing and seeing:

Start Blender, delete the cube
Top view
Add>Mesh>Cylinder (with 3D cursor near origin)
Front View
Size Z (SKEY ZKEY)to increase height of cylinder
(e.g. about 5X for a total height of 10 units)
Grab Z (GKEY ZKEY) to move cylinder up, so base is near zero
WKEY 3 times to subdivide cylinder (to create vertices along its length
so there are some vertices to move to make the bend)
Tab to exit Edit Mode
LMB click near top of cylinder to move 3D cursor there
Add>Empty. The Empty should appear at the 3D cursor, near top of cylinder.
RMB select the cylinder again.
Tab to enter Edit Mode
AKEY as needed to select all vertices (all yellow)
CTRL-RMB to select the empty
CTRL-H to add object hook, “To Selected Object” (i.e. to hook to the Empty)
Go to the Object buttons (F7), Hooks panel
Set Falloff to 3.0

Tab to exit Edit Mode
RMB to select the empty (if not already selected)
GKEY Grab the Empty and move it left or right.

Instead of the top end of the cylinder moving with the Empty,
the MIDDLE of the cylinder moves. (Also, there is a dashed line
running from the Empty to a point in the center of the cylinder.)
It is as if Falloff is using the distance of each vertex from
the mesh median point, instead of the distance from the hook object,
when computing the fall off of the displacement; maybe somehow I need
to get that reference point moved.

What am I doing wrong?


(GreyBeard) #2

In the 2.40 alpha2 there are buttons labled Recenter and Reset in the hook modifier panel. I tried your example and it worked as expexted. Unfortunatlly it won’t work for a diving board – the curve produced is the wrong way around. Perhaps do a curve deform.

GreyBeard


(jfarm) #3

Thanks GreyBeard! That gets me unstuck. There’s a work-around for the curve going the wrong way.

For future readers of this post: I downloaded 2.4, and using the Recenter button (now under Editing (F9) on the Modifiers button panel), with the 3D cursor at the end of the cylinder, eliminated the bend-in-the-middle problem seen in 2.37. With the Empty at the free end, the curve is indeed the “wrong” way (wrong for what I want–Blender is doing it correctly), as GreyBeard said–the steep part of the curve is at the far end from the Empty. But if I make the cylinder the parent of the Empty, and then make another object a parent to the cylinder, and place both at the “fixed” end instead of the free end, then by moving the other object opposite from how the empty is moved, their motion cancels out at the “fixed” end, and the “free” end bends with the right curvature (i.e. curvature increases toward the free end). In fact, the other object doesn’t have to be at the fixed end, it can be anywhere–it could be the diver on the end of the board, which is convenient!

For this to work, the motion of the Empty and the diver object must cancel at the fixed end of the board. The easiest way is to put the empty exactly at the fixed end, set the Falloff distance to be the length of the board, and make diver motion and empty motion exactly opposite. However, by moving the Empty and/or changing the Falloff distance, it should be possible to use different parts of the Falloff curve to adjust the way the board bends (e.g. eliminate the rather sharp bend in the last segment). When doing this, the motion of the Empty would have to be adjusted in order get motion at the fixed end of the board to cancel to zero.


(jfarm) #4

Even though the object hooks now behaved as desired in Blender 2.4, and that’s what I ended up using, I tried a couple other things too, that I’ll leave here as two other breadcrumbs in case they are useful to anyone.

  1. Per GreyBeard’s suggestion, I tried using a deform curve–it mostly worked, but when I parented the board to the curve, the board would shift and change length slightly. After a few tries, I gave up on this approach.
  2. It eventually dawned on me that thanks to Blender’s orthogonality, I could apply an object hook to a lattice, use the hook to deform the lattice, and let the lattice deform the board. By extending the lattice past the fixed end of the board (so the board only occupies one half of the lattice) before making the lattice the parent to the board, I could work around the bend-in-the-middle problem of Blender 2.37 object hooks. This worked quite well for a single board. Sadly, I actually have two pivoting “boards” with one the parent of the other (sort of like a simple robot arm), and parenting the lattice to the child board makes the board lose its connection to the parent board. So although the lattice would have been perfect because it would apply the same deformation where the boards meet, keeping them together at the attach point, I would have had to change the way I animate the 2nd board to a much more complicated combination of position and rotation, instead of just rotation. With object hooks I can keep the parent-child relation between the two boards, though I had to fudge the Falloff distances of the two hooks to keep the boards (different lengths, of course!) from separating at the joint during deformation.