0
$\begingroup$

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:

Animation Nodes setup

Sverchok Node 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:

https://drive.google.com/file/d/1gMvKhExbVH5hSzoPK9GdetTph4r_YySM/view?usp=sharing

$\endgroup$
6
  • $\begingroup$ Do you have windows or macOS? $\endgroup$
    – Chris
    Aug 19 '21 at 7:23
  • $\begingroup$ 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 $\endgroup$
    – Chris
    Aug 19 '21 at 7:37
  • $\begingroup$ For lorenz attractor you can use latest bluefox extension which have chaotic attractors node $\endgroup$ Aug 19 '21 at 14:09
  • $\begingroup$ @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? $\endgroup$
    – MarcusR
    Aug 20 '21 at 3:09
  • $\begingroup$ @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. $\endgroup$
    – MarcusR
    Aug 20 '21 at 3:10
2
$\begingroup$

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')
$\endgroup$
2
  • $\begingroup$ 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? $\endgroup$
    – MarcusR
    Aug 20 '21 at 3:07
  • $\begingroup$ scene.frame_set(frame) is the recommended way to change frame in a script. $\endgroup$
    – batFINGER
    Sep 18 '21 at 17:48
0
$\begingroup$

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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.