# Sound-Driven Animation, Using Animation (and Sverchok) Nodes, is Not Working

I am trying to create an animation where a parameterized object, created with sverchok nodes, is manipulated by a sound file via animation nodes. Here are my node setups (blend file at the end of this post):

Animation Nodes setup:

Sverchok Node setup:

So, the sound file is read through Animation Nodes and carried over to Sverchok, where the sound drives the 'dt' parameter of an object (which is the time parameter of a Lorenz attractor via a script, which I posted about here).

This setup works in the viewport, but when I try to render the full animation, the frames do not adjust for dt. In other words, if I render the first 100 frames of the animation (as images, not as a movie file), I get 100 images that are exactly the same.

At first I also couldn't render any images. I read about how there are some issues rendering with Animation Nodes, specifically this thread, so I ended up using this script from VideoBombala:

import bpy

for step in range(1, 100):

bpy.context.scene.frame_set(step)
bpy.data.scenes["Scene"].render.filepath = 'd:/3D RENDER/2019 01 13/image.jpg_%d.jpg' % step
bpy.ops.render.render( write_still=True )


Which, again, works but only produces the same image. I've also noticed that whatever frame the viewport is currently at, is the frame that the rendered images apparently are too.

I'm also using the BlueFox Animation Nodes Extension:

https://github.com/harisreedhar/an_bluefox_extension

Not sure what is going on here, any suggestions or help would be awesome.

Blend file:

• Do you have windows or macOS? Aug 19 '21 at 7:23
• you should be aware of this might be a Blender/Sverchok bug, you can look at the same issue here: github.com/nortikin/sverchok/issues/4222 Aug 19 '21 at 7:37
• For lorenz attractor you can use latest bluefox extension which have chaotic attractors node Aug 19 '21 at 14:09
• @Chris - windows, and thanks for linking that post, I also saw this one: github.com/nortikin/sverchok/issues/4295q, seems like you already encountered this? Aug 20 '21 at 3:09
• @HariSreedhar - thanks, I will check that out! And thanks for the sverchok interface node, very cool to be able to transfer data between sverchok and AN. Aug 20 '21 at 3:10

you can try it with this script (this worked for "sometimes"):

import bpy
import time
file_path = '/tmp\\sverchok_animations\\'

start_frame = 1
end_frame =10

for act_frame in range(start_frame, end_frame + 1):
bpy.context.scene.frame_current = act_frame
bpy.ops.node.sverchok_update_all()
bpy.context.scene.render.filepath = file_path + str(act_frame).zfill(4) +'.png'

bpy.ops.render.render(write_still=True)
print(act_frame)

print ('done')

• Unfortunately this script didn't fix it, were you able to get it to work in the blend file I included or in another one? Aug 20 '21 at 3:07
• scene.frame_set(frame) is the recommended way to change frame in a script. Sep 18 '21 at 17:48

Following this thread: https://github.com/nortikin/sverchok/issues/4295, I found that using the Render > Lock Interface option worked for me.

This is using Blender 2.93.1 and this version of Sverchok.