Scatter node and alembic animation

Forums: Scatter node and alembic animation
Forum for OctaneRender Lua scripting examples, discussion and support.

Scatter node and alembic animation

Postby Faizol » Sat Apr 05, 2014 3:11 am

Faizol Sat Apr 05, 2014 3:11 am
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,
Fedora 17 | 16 GB RAM | Quadro 4000 | driver = nvidia 304.xx & CUDA 4.0
Faizol
Licensed Customer
Licensed Customer
 
Posts: 88
Joined: Wed Jan 20, 2010 10:46 am

Re: Scatter node and alembic animation

Postby stratified » Sat Apr 05, 2014 5:45 am

stratified Sat Apr 05, 2014 5:45 am
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
User avatar
stratified
OctaneRender Team
OctaneRender Team
 
Posts: 945
Joined: Wed Aug 15, 2012 6:32 am
Location: Auckland, New Zealand

Re: Scatter node and alembic animation

Postby seltzdesign » Mon Jun 13, 2016 12:54 pm

seltzdesign Mon Jun 13, 2016 12:54 pm
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
If you are not failing every now and again, it's a sign you are not doing anything very innovative.

- Woody Allen

Dual Xeon | 32GB Ram | 4 x GTX 580
seltzdesign
Licensed Customer
Licensed Customer
 
Posts: 34
Joined: Mon Jan 17, 2011 4:50 pm
Location: Zurich, Switzerland

Re: Scatter node and alembic animation

Postby roeland » Tue Jun 14, 2016 5:50 am

roeland Tue Jun 14, 2016 5:50 am
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)
User avatar
roeland
OctaneRender Team
OctaneRender Team
 
Posts: 1741
Joined: Wed Mar 09, 2011 10:09 pm

Re: Scatter node and alembic animation

Postby seltzdesign » Thu Jun 23, 2016 9:05 am

seltzdesign Thu Jun 23, 2016 9:05 am
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: :?
Attachments
AnimateScatter.lua
My bodged together and non-functioning attempt at some parts of the scripted node, with some comments.
(3.07 KiB) Downloaded 206 times
If you are not failing every now and again, it's a sign you are not doing anything very innovative.

- Woody Allen

Dual Xeon | 32GB Ram | 4 x GTX 580
seltzdesign
Licensed Customer
Licensed Customer
 
Posts: 34
Joined: Mon Jan 17, 2011 4:50 pm
Location: Zurich, Switzerland

Return to Lua Scripting


Who is online

Users browsing this forum: No registered users and 2 guests

Sun Nov 17, 2019 10:03 pm [ UTC ]