is this possible? (set velocity no keyframing)

Been digging around trying to figure this out, but maybe I should make sure it’s even possible before continuing. Keep in mind I’m a python newbie.

What I want to do is set an object’s velocity with python/drivers so that when rendering with motion blur in cycles the object appears to be moving, and doing this all via coding ie no keyframes.

Is this possible?

Do you mean that you don’t want it to move at all, just use velocity for motion blur… or that you want motion, just not by using keyframes?

Especielly if you’re a python newbie, the potential to make your life easier seems pretty low.
But you can type expressions directly into keyframe fields to quickly create drivers.
For example, in X location: “#frame * 1.2”.

Thanks for the tip on typing expressions into fields, didn’t know that.

this, yes. Ultimately my goal is to be able to render a turntable of an object in mid motion. What I could do is render a frame, move the camera, render and repeat (I would be rendering the same frame number over and over since I want to render the object at a specific time.) I was hoping to be able to tell blender that this object has a certain velocity in some direction, then no matter what frame I’m on it will render the same motion blur, that way I can animate the camera without keyframing the object. Think of bullet time but rendering the motion blur too. It’s hard to describe but hope that makes sense.

Here are some examples maybe they can illustrate what I’m trying to do.
I have a monkey head which is moving along the z axis, the current frame is currently between those two keyframes.
Then I turn on motion blur, render, save then move camera, repeat. I don’t actually change frames in the playhead, I want the motion blur of the head to be the same from any angle. It works, but its a very time consuming and clunky process. I’m hoping there’s a way to feed into the cycles engine some data saying the head is moving X fast in Y direction without actually using keyframes.




I don’t think you can do that in Blender without creating keyframes. The reason why is that when you enable Motion Blur or add a Vector Blur to the compositor Blender has to evaluate 3 frames (or more) instead of one. The Blender render system actually moves the play head forward and backward in time to get the new and old positions of objects in the scene. But the new events generated are generated in a locked state so drivers and frame change handlers can not alter objects on those new and old frames. The net result is the vector blur/motion blur can not tell that an object is in motion when it is controlled by python code.

This is one of the more serious problems with the Blender event/render architecture (IMHO).

The solution is just to create keyframes on-the-fly. Or to bake your animation before you render.

Thanks Atom, I was thinking that was the case after some experiments, but I have found a workaround. Using a render_pre handler lets me make keyframe changes while still using motion blur in the way I want. I’ll post some results on blender tests soon, thanks