Blender Cannot animate Graphs?

Hello,

it seem to be impossible to animate a falloff curve in blender, for example the falloff graph in the vg-edit modifier. Please prove me wrong…

This is quite a big deal if it’s the case, there’s tremendous potential in motion graphic wasted…
here are some examples with slope/aspect/height generated vertex group.(the graph you see is the graph from the vgedit modifier)

10 Likes

If you activate the AnimAll add-on, you can animate all kinds of properties, such as vertex colors and individual vertices, but I don’t know if graphs are supported as well.

Hm… seems strange that (even if the Add-On supports it) has to be handled by an Add-On at all. Isn’t that Core functionality?

I get that but well, animating graphs are quite a big deal in motion graphics isn’t it?
i don’t get the map_curve properties cannot be animated natively

dang… thats unexpected


Curves from curve widgets can not be animated.
Their points are representing 2D points.
That is different from Vertex (3D Points) and F-Curves (1D value evaluated according to time).

So, that requires an animation developer to pass time on subject to make it work.

That is not an exception about falloff of VW modifiers.
That is also the case for RGB Curves, Vector Curves nodes or Bevel Profiles.
The fact that work on Custom Bevel Profile was done during 2.8, 2.9 series, postponed the idea to animate them.
Yes. That would help a lot to have an animatable curve widget.
But, in future, the idea of different Curve widgets will probably be replaced by a unique node used for anything.
When would be done modifier nodes was a question without answer at beginning of 2.8 development.

At least, for Vertex Weight modifiers, you can animate a texture influencing VW modifier.

2 Likes

Just linked a bezier to a map_curve with python, updating on frame_pre handler

ezgif-2-d1caba3a293c

It’s still crazy to think that this is not supported by default

#there's some ugle try except it there, not sure how to avoid out of bounds error? 

def clean_all_points(m):
    """only left 2 points in the graph"""
    
    c = m.map_curve.curves[0]
    
    iter = 0
    while len(c.points) > 2: #(seam that cannot got lower and start from 0 ?)

        for p in c.points:
            try:
                c.points.remove(p)
                break
            except: #unable to remove  points for some reasons
                pass

        #emergency break
        iter+=1
        if iter==999:
            break
    return 


def apply_matrix_to_graph(curve,matrix):
    """create graph from given location matrix"""

    for i,p in enumerate(matrix):
        x,y,*h = p
        try: 
            curve.points[i].location = [x,y]
            if h: #handle support, only "VECTOR" or "AUTO"
                curve.points[i].handle_type = h[0]
        except:
            curve.points.new(x,y)
    return None




def get_matrix_from_bezier_verts(o):
    """get matrix from curve verts"""

    matrix = []
    
    depsgraph = bpy.context.evaluated_depsgraph_get()
    eo = o.evaluated_get(depsgraph)
    ob = eo.to_mesh(preserve_all_data_layers=True, depsgraph=depsgraph)

    for v in ob.vertices: 
        x = v.co.x
        y = v.co.y
        matrix.append([x,y,"VECTOR"])
    
    return matrix 




def clean_bezier_splines(o):
    """ clean o splines data"""
    for spline in o.data.splines:
        o.data.splines.remove(spline)
        
    return None



def linear_interpolation(v1,v2,k):
    """vector linear interpolation"""
    return v1*k + v2*(1-k)



def update_bezier_from_matrix(o,matrix,name=""): #o = bpy.data.curves
    """update bezier data"""

    handle_care = False 

    #create curve if needed
    if o is None:
        bpy.ops.curve.primitive_bezier_curve_add(location=(0, 0, 0),scale=(1, 1, 1))
        o = bpy.context.object
        o.name = "SCATTER_GRAPH_OBJECT"
        # if name:
        #     o.name = "SCATTER_GRAPH_OBJECT " + name

    #clean curve splines    
    clean_bezier_splines(o)
    s = o.data.splines.new(type="BEZIER")
    
    points = s.bezier_points
    for i ,pt in enumerate(matrix) :        
        x,y,*h = pt
        
        #add points if needed 
        try: _ = points[i]
        except: points.add(1)
        
        #change handle position    
        P = points[i]
        P.co = (x,y,0)
        
        #change handle type
        if h is not None:
            P.handle_left_type = h[0]
            P.handle_right_type = h[0]
            
            if h[0]=="AUTO":
                handle_care=True
     
    if not handle_care:       
        return o  
    
    #if handle set to auto, scale will be too large, need to scale down
    #cannot scale down handle on auto, they need to be on free type
    #if directly doing action right in loop above, weird api behavior. not possible. 
    
    for P in s.bezier_points:
        CO = P.co
        
        if P.handle_left_type=="AUTO":
            P.handle_left_type ="FREE"
            P.handle_left = linear_interpolation(P.handle_left, CO, 0.2,)
            
        if P.handle_right_type=="AUTO":
            P.handle_right_type ="FREE"
            P.handle_right = linear_interpolation(P.handle_right, CO, 0.2,)
        
    return o
3 Likes

How can this not be in native blender, seriously, it’s amazing
dddd

dddd

dddddd

11 Likes

You just have to make an addon that does that for all kind of Curve Widgets (modifiers’ ones, nodes’ ones & Bevel Profiles), submit it to developers and it could be bundled with next official release.

1 Like

Yeah i will do a free addon with this feature like I did with Lodify.
Just need to finish my main addon project first :slight_smile:

6 Likes

@BD3D Are there any news on this potential add-on? I’d love to see this in Blender! Thanks!!!

Not yet I’m still really busy on my main project
but i’m curious that no official devs took a look at this issue.

Also it seems that the vgedit modifier graphs are quite different from the other graphs editors.
not sure why there’s such difference, imo everything need to be centralized in one and only graph editor

3 Likes

Thanks for the update! Yeah, it’s a shame no dev took on this, it looks like such a needed feature.

Yeah i will do a free addon with this feature like I did with Lodify.
Just need to finish my main addon project first :slight_smile:

Just an update on this

because i believe that the graphs editor differs from place to place (that’s a consistent inconsistency we got here) it might be tricky to implement such important functionality from python.

The best of the best would have to be a proper universal curve editor

3 Likes