2
$\begingroup$

I have a deformable object (e.g. a rigged arm with a hand) in the scene. I want to take large numbers of pictures of the arm from different angles, while the arm is performing different actions. How do I automate this process and save the rendered images directly to a directory?

Would it make more sense to keep the camera in place and just animate the arm to different positions? I am doing this for data collection so I want the arm movements to be randomized and camera angles to be randomized. If this type of randomization is possible, could I also set constraints on what part of the arm is included in each image?

$\endgroup$
1
  • $\begingroup$ Do you need the frame to frame changes to be truly randomized, or just "noisy"? If the former, Animation Nodes might be the ticket. It can randomize your arm movements and also randomize the camera's location. To randomize the part of the arm that is the focus, you could point the camera to an empty, and randomize the location of the empty along a constraint curve connected to the armature via a hook modifier. If you randomize every frame, you can just render to individual frames like any other animation. Sorry this is not a fuller answer, my animation nodes experience is limited. $\endgroup$
    – risingfall
    Commented Aug 28, 2018 at 20:21

1 Answer 1

1
$\begingroup$

Okay I have a way to do this without Animation Nodes, which still might be a good solution for you.

I've created a scene with a two-bone armature and a cylindrical mesh parented to it. That's your "arm". It is animated to bend back and forth.

enter image description here

I have also added to this example a bezier curve that will follow the deformations of the armature, via a couple of "hook" modifiers. The control points of the bezier are hooked to the bones of the armature.

The camera is animated to jump around to random positions in the x, y, and z dimensions via a "Noise" modifier added separately to each of the x, y, and z directions. A different seed for each ensures that they're moving separately.

enter image description here

enter image description here

You will have to tweak the parameters of the Noise modifier to ensure it is jumping around as quickly as you like and as far as you like in the various dimensions.

Back to the curve object, I have also created an empty with a "follow path" modifier, associated with the curve. I have animated the offset value of that modifier with another "noise" modifier. Essentially this means that the empty jumps around to various positions along the curve. The curve, remember, deforms along with the animation of the armature, so basically the empty is always somewhere in the middle of the "elbow."

enter image description here

Finally a "damped track" constraint is added to the camera, which is set to target the empty.

So basically, for every frame, the camera is jumping to some random location, an empty is moving to some random location within the deforming armature, and the camera is set to turn towards the empty.

Here are the first ten frames of the animation output from this setup. As you can see, there is quite a bit of variation in terms of camera angle. Hopefully this is sufficient for your purposes.

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .