Page 1 of 1

Scatter node and alembic animation

PostPosted: Sat Apr 05, 2014 3:11 am
by Faizol
Hi all,

Is there a way to refresh a scatter node with a different csv text file every time the frame or scene is updated?

Also, is it possible to have a delayed animation where start and end animation from the imported Alembic geometry can be scripted or looped?

As for the script editor, is it possible to have a search or search/replace functionality? I understand that more enhancement gonna be committed to the script editor, but it would be nice to continually use Octane's script editor instead of switching to external editor and back to Octane's lua editor to run the modified script.

Thanks.

Cheers,

Re: Scatter node and alembic animation

PostPosted: Sat Apr 05, 2014 5:45 am
by stratified
Hi Faizol,

Is there a way to refresh a scatter node with a different csv text file every time the frame or scene is updated?


You can, either you update the csv file each frame or you set up an animator for the A_TRANSFORM attribute (which is a list of transformation matrices). There are examples here on the forum on how to set up animators.

Also, is it possible to have a delayed animation where start and end animation from the imported Alembic geometry can be scripted or looped?


You can render out all the frames in whatever sequence you want, you just have to modify the time of the scene graph octane.nodegraph.updateTime. Check one of the scripts shipped with the standalone, they all render an animation loop (Daylight, Turntable or Animation script).

As for the script editor, is it possible to have a search or search/replace functionality? I understand that more enhancement gonna be committed to the script editor, but it would be nice to continually use Octane's script editor instead of switching to external editor and back to Octane's lua editor to run the modified script.


We'll add some more features when we get to it (like search and replace). But we won't try to compete with a fully fledged code editor so some thing won't ever be there.

cheers,
Thomas

Re: Scatter node and alembic animation

PostPosted: Mon Jun 13, 2016 12:54 pm
by seltzdesign
You can, either you update the csv file each frame or you set up an animator for the A_TRANSFORM attribute (which is a list of transformation matrices). There are examples here on the forum on how to set up animators.


Hello @stratified,

could you point me in the right direction of achieving exactly this. Searching the forum for "animator" yields only this thread as a result. Basically all I need is for the scatter node to be able to be animated just like a texture can be animated, with the box where you can load multiple files, set frame start and end and frame length. I am sure using the existing code you have for the animated texture would be much easier then trying to recreate it.

Do you think its possible to modify the current script, rather than starting from scratch, seeing the functionality is so close already?

Thank you for any help.

original post: viewtopic.php?f=73&t=54638

Re: Scatter node and alembic animation

PostPosted: Tue Jun 14, 2016 5:50 am
by roeland
From Lua you can set an animator octane.node.setAnimator function. For instance given a scatter node and a list of strings with the file names you can do

scatterNode:setAnimator("transforms", {0}, fileList, 1/24)

Re: Scatter node and alembic animation

PostPosted: Thu Jun 23, 2016 9:05 am
by seltzdesign
roeland wrote:From Lua you can set an animator octane.node.setAnimator function. For instance given a scatter node and a list of strings with the file names you can do

scatterNode:setAnimator("transforms", {0}, fileList, 1/24)


Hi Roeland,

Thanks for your answer. I am still trying to get to grips with LUA and Octane scripting.

Ideally I would like this to be a scripted node graph. A Node with a Geometry input, which outputs the scattered geometry. But for that I need to find a way to load the contents of a folder, which doesn't seem possible. I can create a file input, but it doesn't let me select multiple files. So the idea was to maybe just get the first file and then get the others that are in the folder next to it, by matching the sequence. The node is then just evaluated on time change (there is always an alembic file in the scene, which enables the time slider) and sets the scatter file to the current frame (eg. frame00001.txt).

Is it at all possible to create a button like RGB image has it, where you just get a window to load all the files in? it doesnt need all the extra functionality of sorting and setting start frame and so on. Just a button to load multiple files. Or even better, please please please, just add the button on the existing scatter node!?

I would be forever grateful if someone could help me with this. I actually did the same thing a few years ago, but it was back in the beta 1.0 phase and I would have a script in vvvv write an octane file which contains the updates scatter data, render, close octane, write the next file, launch octane with new scatter data, and so on, but it makes so much more sense to just load the scatter files during batch rendering.

Thanks.

Attached is a starting point for the script for the scripted node :oops: :?