1
$\begingroup$

I'm completely new to Blender and I'm currently in the process of analysing if this software is better suited than the one I'm currently using for my workflow. I'm currently using After Effect to create what I call "Motion Data", basically I use the powerful keyframe editor and expression engine of After Effect to create complex curve that rely on real world data. I'm not going to dive to much in the detail but Blender seems to be a much better alternative for my workflow as it would be easier to interface it with external sensor and device by writing script. It has all the tools I need except the one in this post title :

I absolutely need in my workflow to be able to perform math operation between multiple fcurve and see the result directly. For example multiplying / adding or pretty much any kind of linear math. From what I understand this is achievable in Blender using Driver, the limitations being that there is now way to "see" / "plot" the resulting output of the Driver. This make sense because the variable of the Driver function can be linked to the result of a time consuming simulation, so it wouldn't be practical to calculate all the output for every frame in order to display the graph. This issue is also mentioned here Possible to show Driver (scripted expression) output per frame like the graph editor does for "keyframed" parameters?

So far the only work-around that I could figure out after some research would be to create a script that would evaluate the Driver output for every frame, and then write the result as keyframe on a dummy property. But the script would have to be executed every time the Driver expression or the fcurve keyframe value change, which might pose performance issue. I'm not sure this implementation would be very practical.

Is this workaround is the only way to achieve this goal, or would it be possible to dive deeper in blender source code to add such feature to the Graph Editor and fcurve object ?

I'm open to all your suggestion. Thank for the help !

EDIT :

As asked, I'm providing a toy example of the functionality I'm trying to transverse from After Effect to Blender.

In the After Effect video, we can (barely) see that I have multiple property attached to a layer. One contains data that I've imported from an IMU, then I smooth those data in the second property. The next 2 properties contains hand-drawn curve made from keyframe, that will represent an Offset and a Gain that I want to apply to the smoothed data, and finally the last property contain the final result.

I made a Blender project that as kind of similar structure. There is a empty object (Single Arrow type) on the scene on which I created 3 custom properties. Using a python script I've imported the IMU data on the "Source Data" property, I've hand-drawn an fcurve on the "Gain" property, and the last one called "Output" has a driver that compute the "Source Data" * "Gain". But unfortunately I can't visualize the result of the "Output" property...

Why do that on Blender ?

For those interested, the goal of my workflow is the following :

  • Load and display data that come from an IMU that recorded the motion of a car for example
  • Manipulate the data to remove defect, inconsistent motion, increase or reduce motion amplitude ect...
  • Use those new data to have a live real-time control of a physical 6-axis device (A platform able to move in the 3 translations axis and 3 rotational one)

The end goal being to reproduce the motion from a real-world object on a 6 axis device.

Compared to After Effect, Blender would allow me to streamline the process by having a simulation of the 6 axis simulator that would be animated by those motion data, but it could also allow for a real-time control of the physical device on playback.

$\endgroup$
5
  • $\begingroup$ Looks like you are right. Due to specific task, I can't ready understand how it may happen. See, F-curve editor has an ability to add some math, like sin/cos functions, noise and linear functions. But there is no access to other f-curves. Drivers from this side much better, they can perform unlimited operations from different sources, but it never draws a F-curve. $\endgroup$
    – Crantisz
    Jan 11 at 12:56
  • $\begingroup$ You can add/subtract/multiply .. 'combine' existing tracks in the NLA editor.. or maybe generate a display of results using Geometry Nodes? Are you wanting to incorporate live input, or is this all keyed? $\endgroup$
    – Robin Betts
    Jan 11 at 14:06
  • $\begingroup$ @RobinBetts I took a quick look at the NLA editor and it has some nice features but still doesn't allow to view the result of the blending operation. No I won't incorporate live input, it will all be keyed. $\endgroup$
    – Eledwin
    Jan 11 at 14:53
  • 1
    $\begingroup$ Maybe give us a toy example, to try. It's an interesting question. $\endgroup$
    – Robin Betts
    Jan 11 at 15:05
  • $\begingroup$ @RobinBetts I updated the post with some example file and a bit more detail on the end goal of the project. $\endgroup$
    – Eledwin
    Jan 11 at 17:24

1 Answer 1

1
$\begingroup$

script that would evaluate the Driver output for every frame

You don't need to script this. This is a "bake action" operation. You're correct in one limitation-- it no longer reacts to adjustments in the input parameters. Another limitation is that is now sampled data, not the original expression.

A quicker alternative is "evaluate motion paths". Doesn't write to f-curve, but provides visual description of your sampled output curve, and for whatever reason, it's a lot faster than a bake. But, same limitations as baking.

enter image description here

if this software is better suited than the one I'm currently using

Blender is really good at dealing with sampled, spatial data. It is not tuned for dealing with continuous, unsampled math; it is not tuned for having a huge expanse of time contained in memory all at once.

The sampled thing, there's no real workaround. You can make your samples smaller, but you're not going to get around the fact that Blender is, inherently, about sampled functions rather than pure functions. Even when dealing with time, Blender is really only concerned with the value at a specific frame. I don't know if you can live with that.

However, the spatial thing is easily worked around by treating time as a spatial dimension instead. Rather than making an f-curve, make a curve object. Rather than evaluating your function f(time), evaluate your function f(x). So long as your data is spatial rather than temporal, you can use any number of operations on all of it simultaneously and see the immediate output. Changing data from a spatial dimension into the time dimension is pretty trivial, but changing from the time dimension to a spatial dimension is difficult.

$\endgroup$
3
  • $\begingroup$ I do in fact only use sampled data coming from an IMU, and I suppose that the fcurve are considered as sampled data using Bezier interpolation. I think I see where you are going with the idea of using spatial data rather than temporal, the idea would be to plot the output of the Driver using motion path that would draw a 3D physical curve. The issue is I would lose all the feature of the graph editor, such as scale axes, moving and zooming around ect... I'll try though to see what can be done with this approach. $\endgroup$
    – Eledwin
    Jan 11 at 17:23
  • $\begingroup$ @Eledwin Scaling, moving, zooming around etc are all also features of interacting with spatial data. I can't think of a single tool available to temporal data that isn't also available to spatial data, and spatial data has a lot of additional tools on top. $\endgroup$
    – Nathan
    Jan 11 at 17:26
  • $\begingroup$ Yes sorry you are right, I didn't express myself correctly. I meant from a data science point of view, it would be harder to do visual measurement on the resulting curve. For example if my data came from an accelerometer, I would need to know at frame X what is the acceleration of the resulting curve, then do adjustment to my Gain if it's to high. It would probably be possible, I would just need to draw some axes, tick label ect... in other word, recreate a graphing app inside Blender 3D viewport. $\endgroup$
    – Eledwin
    Jan 11 at 17:37

You must log in to answer this question.

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