Editable Motion Trails 3D

Please read the Caveats and Limitations section before buying.

Provided under GNU General Public License

Support the Blender Developer Fund!



Most Recent Update: 01/26/20: New Features

  • Feature: Trail Offset Support
  • Bugfix: Relative trail parenting to a bone now works
  • Convenience: ESC no longer deactivates trails. Removed to avoid conflict with other Blender modal operators.

Caveats and Limitations:

  • For efficiency, only changes to the local channels of the trail target is seen in real time. Changes to a trail target’s parent hierarchy or constraint dependencies will not be seen. You’ll have to refresh the trail to view such changes. Exception: By creating multiple trails of a bone hierarchy, you can mark other trails as a hierarchy dependency so it updates with the parent.
  • You should never delete any trail control. This is undefined behavior. You can create and delete keys through normal blender means. The exception is if you saved your file while the trail was active. On reloading the file, you can safely delete the persisted trail controls. For convenience, R-Click the collection its in and Delete Hierarchy.
  • Depending on your PC, you may not be able to transform the controls while the animation is playing, especially at 60fps.
  • Do no animate the controls. The addon automatically deletes animation on controls to prevent undefined behavior. Turn off auto keying.
  • Although controls are Blender objects, they are pooled and reused. Treat them as volatile. Animating, constraining, and reparenting them is undefined behavior.
  • I mentioned that when handles are FREE and you retime them, the curve is preserved. This works as long as the time of handles do not pass adjacent handles or keys. If you do, Blender modifies the curve to prevent cases where, at a single frame, there are multiple curve values. Basically, blender doesn’t allow you to create loop-de-loops. In terms of retiming, the curve-preservation property is lost.
  • Be careful to not select time controls when trying to transform the curve as a whole. The addon will treat this as if you’re attempting to retime. It’s convenient to disable time controls in this case.
  • Dense keys lead to a problem of clutter. The current solution is to turn on selection sync to sync key and handle selection between the graph editor and motion trail controls. You can also hide specific Co, handle and time controls separately and individually. If anyone has better ideas, I’m open to suggestions.

Hello everyone. For the past year, I’ve been working on making a 3D viewport editable motion trail for Blender 2.8x.

MotionTrail3D allows you to author arcs in 3D world space. The 3D-controls are normal Blender objects. They’re selectable and transformable through normal Blender means. As you modify the local channels, the 3D trail will also update in real time, even if the animation is playing.

To install the script, first unzip the folder. In Blender, Go to File > User Preferences , select Add-on Tab, then press Install Add-on and then select the python(.py) addon file. Enable it by selecting the checkbox. To enable it as default, press Save As Default. To create a trail, the button can be found in: 3D View -> (N) Tools Panel -> Motion Trail 3D tab

If you have any questions, comments, or feedback, you can email me at [email protected], reply here or PM me.

Note: I’ll be adding media and more information to this post throughout the next few weeks. I still need to create proper documentation and tutorials. Thank you for your patience and understanding.

The addon supports both object and pose bone animation. It uses the timeline preview range to determine which part of the animation to show. You can undo/redo and even edit the trail while the animation is playing. This is based on your PC, the animation itself, the rig, and the rendering fps. At 30fps seems ideal for editing while the animation is playing.


Making changes directly in the Graph Editor is synced with the viewport trail too.

Creating and deleting keys should be done through normal Blender means.
The trail renders using each key’s interpolation type (Const, Linear, Bezier).
Trail controls are implemented as normal Blender Empty Objects. You can select and transform them through normal Blender means. Select multiple controls then freely translate, rotate and scale the controls.ctrl_world_xform
Based on each handle’s type, the behavior of the trail control changes. Handles of type Auto, Auto Clamped and Vector (linear) are automatically handled by Blender. The trail controls will snap back to their original position if you attempt to edit them.
(Auto) (Vector)
For Aligned handles, moving the Co control will move the handles with them. Moving either handle will preserve the alignment by modifying the paired handle if its also set to Aligned.
For Free handles, they will not move along with the Co control.
Retime keys by using the time controls. Dragging them screen left time offsets them to earlier in the animation, similarly for dragging screen right.

Below, notice the property of retiming Free handles and Aligned handles. Retiming free handles preserves the world-space curve. Retiming aligned handles preserves the world-space speed through the key.
There’s also tracking points!


Rotation controls! Track the orientation by creating 3 tracking points for the XYZ axes. Only Euler and Quaternion rotation modes are supported. Scaling the Quaternion controls will affect the interpolation through the key. Note: The rotation controls double as their own time controls. Dragging them screen left/right retimes them.
rot_ctrl2
There are also different rotation write modes for better rotation compatibility control.rotation_compatibility
These options prevent the written rotation from passing 180 degrees from the specified target. Extended allows you to rotate past 180 and isn’t relative to any particular key or handle. Timeline Frame will sample the rotation curves at the current frame for the 180 degree limit.
.
Relative parenting. You can choose which object or bone to view the trail relative to. Use this for camera-space editing!

And last but not least, you can view the effect of FCurve modifiers. The addon samples the curve for the rendered points. Any modifier’s effect can been seen.


Frequently Asked Questions:

Can select but can’t move controls?

Change the affected key’s interpolation type to Bezier and handle types to either Free or Aligned.

Based on each handle’s type, the behavior of the trail control changes. Handles of type Auto, Auto Clamped and Vector (linear) are automatically handled by Blender. The trail controls will snap back to their original position if you attempt to edit them.

Can select and move the controls but the trail doesn’t update?

Make sure you’re using Blender 2.81. This happens with Blender 2.80.

Can’t select the controls?

Make sure the mode isn’t locked and then make sure you’re in Object Mode.

Controls are implemented as Blender objects.

How to install:

To install the script, first unzip the folder. In Blender, Go to File > User Preferences , select Add-on Tab, then press Install Add-on and then select the appropriate python(.py) addon file. Enable it by selecting the checkbox. To enable it as default, press Save As Default. To create a trail, the button can be found in: 3D View -> UI Panel -> Tool -> Motion Trail 3D


Thank you for reading this far. Let me know what you think! If you have any questions, comments, or feedback, you can email me at [email protected], reply here or PM me.

32 Likes

Oh! That’s a super Christmas gift. Thank you very much.

wow amazing,

anyway just curious about performance for production environment, for example heavy rig or multiple rig animation.

Thanks for the support guys

Performance-wise, the dependencies are:

  • Timeline preview range length.
  • Total keys in the preview range.
  • At time of activating the trail or parenting, the rig itself. At these moments, the addon seeks through the frame range to do some caching.
  • Rendering fps affects total rendered samples
  • Rig dependencies related to the trail target. The addon will move the target as the curve is manipulated through the viewport controls. This means the rig is frequently updated as you drag a control.
  • Multiple viewports means the trail gets rendered multiple times.

The addon has been out since around March 2019 and no one has mentioned performance problems. If you do find it too slow, let me know. Send me links to rigs you want me to test with, especially animated ones. It’s easier to optimize when I have concrete examples to check against and I’ll see what I can do.

1 Like

I was in a car during all day long. I didn’t had the chance to try it.
I’ve a question… is there a way, or special mode to edit looping keys . I mean start and end frames at the same time. Or shall we do it as usual in graph editor.
I think not. But as I don’t have a computer in front of me… it was an idea.
Thx again for this addon.
I ll try also to combine it with free ik addon…

Currently there is no special support to do that. However, controls are normal Blender objects. You can multi-select trail controls to transform them together, even snap them together. If you think it’d be more convenient to have that built in, I can add support for it.

Oh! Using individual origin to rotate the tangents together is not something people do in an intuitive manner I think.
But perhaps I m wrong.
I was thinking more of a loop key declaration. That automatically pass the variables in a “ping pong” way.


Is this what you meant?

2 Likes

Exactly what i mean. Wen you make a walk cycle. Climb run.etc… you are always looking for a non visible transition in between start and end.
I ll do that like that also. Perhaps it s not necessary.

looped_walked
When I made a walk cycle, the first and last keys are the same of course. But then you just remove the last frame from playing in the preview range to get the seemless loop. It also requires the key pair to have equal world-space tangents to ensure the speeds through both keys are the same.

For better context on the above animation:

This looks very useful, thanks for developing. I will definitely buy it when a new animation job comes along.

Please keep us posted about updates.

We are agreed
The idea was for me to automate this fastidious process when you are fine tuning the loop

I just bought it and have been using it for a few minutes in Blender 2.81a and so far is working really great. Fantastic addon, i really like it so far!!

1 Like

Updated the main post with a new bugfix list and moved Caveats and Limitations to the very top. Please read them before you buy the addon. Notably, you can only have one trail active at a time. It’s been a while since I’ve considered this limitation. Give me some time and I’ll look into supporting multiple trails. If I do, consider that the limitation about modifying the parenting hierarchy and dependencies is unlikely to change.

4 Likes

In all honesty, it’s a bit sad to see core features like this monetized as addons, especially when the Blender devs are in the process of trying to implement them.

Please go away. This feature is not in Blender, this wonderful user spent countless hours of their time to work on it and is asking a pittance for it in return. Well worth the chump change I’d say.

1 Like

Imo, they are piggybacking on countless hours of work done by volunteers who asked for nothing in return.

Blender devs are still able to implement their own core motion trail. I’d love if they do because my implementation isn’t the best and has it’s issues. They’d be able to make it more efficient, create more robust trail controls (mine uses Blender objects and has lots of code to compensate for this hack), and I hope they do things that are in my current list of Caveats and Limitations. I’m an animator who just happens to know how to code so I just made myself one.

As far as piggybacking, I understand the frustration. Bart Crouch’s older motion trail is the big one we all hoped would eventually get updated to 2.8x. You’re more than welcome to compare features of his and mine to see how much I could’ve copied from him. At best we only share the concept of creating a viewport motion trail. From what I understand, his implementation did not support pose bone animation and it did not actually render a world-space trail, just the local channels. These are two core things my trail offers that his does not. Correct me if I’m wrong. I’ll go check to verify these last two points.

Payment vs Free. If this was a one off thing where I upload the addon and leave without maintaining it, this addon would be free. But for as long as I’m going to publicly maintain a difficult code-base and work with people to add features everyone would like, I feel the need to be compensated. If you disagree, that’s alright.


Edit: I was wrong. Crouch’s implementation does work on pose bones and does render their world space trail, as long as the armature has an identity transform. Apologies for the misinformation.

Edit2:(Bart Crouch’s addon from August 27th 2017, can be found in Blender’s source. I just used the most recent version that wasn’t modified for 2.8x reasons. The armature has an identity transform.)


This is to show a simple case for his addon that doesn’t work for bones. Maybe it’s hindsight, but I’m curious why this was never fixed. The solution is to read the bone’s world matrix, strip off it’s local xform, and replace it with inv(stripped bone world matrix) * control world. That leads to the controls working as expected, moving with the mouse in world space.

3 Likes

found an update for 2.8 here.

1 Like

Thanks for the link. For bones, it seems to crash. Looking at the code, one of the problems is that they call scene.frame_set from a draw callback resulting in an infinite loop. This worked fine pre Blender 2.8x. That didn’t fix the freeze but I know that’s one of the reasons. It happened in my script when I updated from 2.79b to 2.8x.

Comparing the code, the only significant update is that they updated the rendering. All the math appears the same so the above GIF problem would still happen.