Lua script for texture animation?
Hmm very strange, try making sure that you have the scrub line set to "Frame" instead of "Time" and see if that makes a difference. In the script I just count the frames down by 1.
Linux Mint 21.3 x64 | Nvidia GTX 980 4GB (displays) RTX 2070 8GB| Intel I7 5820K 3.8 Ghz | 32Gb Memory | Nvidia Driver 535.171
- Rikk The Gaijin
- Posts: 1528
- Joined: Tue Sep 20, 2011 2:28 pm
- Location: Japan
It is set on Frames, and I have 30 FPS. I tried to recreate the scene from scratch, and the problem persistgrimm wrote:Hmm very strange, try making sure that you have the scrub line set to "Frame" instead of "Time" and see if that makes a difference. In the script I just count the frames down by 1.

It should error out as it tries to load a non-existent frame. It must be something I don't understand in how the script gets triggered. Can you just limit your animation to render the first 200 frames? In my test it was the exact opposite, I have more texture frames than my animation (240 vs. 100). But I didn't see any issues. Also make sure to reload the script before you render so everything lines up.
Linux Mint 21.3 x64 | Nvidia GTX 980 4GB (displays) RTX 2070 8GB| Intel I7 5820K 3.8 Ghz | 32Gb Memory | Nvidia Driver 535.171
- Rikk The Gaijin
- Posts: 1528
- Joined: Tue Sep 20, 2011 2:28 pm
- Location: Japan
I figured out what the problem is: when you scrub the timeline, it doesn't count all the frames, only the ones when it stops and render. If you launch the render batch, it renders out correctly! So basically, it's only a scrubbing/preview problem! 

Cool, yep it's a problem, but I'm not sure how to solve it. Just move the scrubber to the first frame and reload the script right before rendering and it should be fine.
Linux Mint 21.3 x64 | Nvidia GTX 980 4GB (displays) RTX 2070 8GB| Intel I7 5820K 3.8 Ghz | 32Gb Memory | Nvidia Driver 535.171
- Rikk The Gaijin
- Posts: 1528
- Joined: Tue Sep 20, 2011 2:28 pm
- Location: Japan
You saved my ass grimm!



- stratified
- Posts: 945
- Joined: Wed Aug 15, 2012 6:32 am
- Location: Auckland, New Zealand
Hi Jason,
Thanks for all the work, it looks like you already have something working. I already started something but mine works a bit different. It starts from a directory and then creates an animation based on the image files it finds in that directory. Maybe you can reuse something from it?
cheers,
Thomas
Thanks for all the work, it looks like you already have something working. I already started something but mine works a bit different. It starts from a directory and then creates an animation based on the image files it finds in that directory. Maybe you can reuse something from it?
cheers,
Thomas
Thanks Thomas, I will check it out. But I have to do that tomorrow. It's past midnight here and I have to work in the morning. 

Linux Mint 21.3 x64 | Nvidia GTX 980 4GB (displays) RTX 2070 8GB| Intel I7 5820K 3.8 Ghz | 32Gb Memory | Nvidia Driver 535.171
Here is a new version of the script.
Changes:
- Works with the timeline scrubber now, let me know if you see any frame discrepancies.
- Plays nicer with other Lua scripts like the turntable script (looks like there are still some issues though
).
- I had to add another input pin for the number of frames/sec. This is because of an Octane bug that when fixed I can remove.
- Changed the name of the node to reflect that it's an animated texture.
Have fun!
Jason
Changes:
- Works with the timeline scrubber now, let me know if you see any frame discrepancies.
- Plays nicer with other Lua scripts like the turntable script (looks like there are still some issues though

- I had to add another input pin for the number of frames/sec. This is because of an Octane bug that when fixed I can remove.
- Changed the name of the node to reflect that it's an animated texture.
Have fun!
Jason
Linux Mint 21.3 x64 | Nvidia GTX 980 4GB (displays) RTX 2070 8GB| Intel I7 5820K 3.8 Ghz | 32Gb Memory | Nvidia Driver 535.171
- Rikk The Gaijin
- Posts: 1528
- Joined: Tue Sep 20, 2011 2:28 pm
- Location: Japan
It works great!
Would it be possible to add the Image options window?

Would it be possible to add the Image options window?