Grimm's take on the turntable anim script

Forums: Grimm's take on the turntable anim script
Forum for OctaneRender Lua scripting examples, discussion and support.

Grimm's take on the turntable anim script

Postby grimm » Mon Dec 23, 2013 6:43 am

grimm Mon Dec 23, 2013 6:43 am
Well here is my take on the script, although most of the work is Thomas' and Roland's. 8-)

Here is the current zip file of the script:

turntableG-V102.zip
(12.1 KiB) Downloaded 253 times


*NEW*
version 1.02
- Added ability to set an offset for the output file name numbers.

version 1.01
- Updated the script so it works with Octane 1.55 and 2.0

version 1.00
Small update for the new version of Octane to make sure it still works.
- Updated the script so it works with Octane 1.5.
- Changed the shortcut to ctrl+t so it will work better on Windows.
- Changed the upper bound for the frames slider to 14400.

version 0.10
- Updated the load and save defaults functions to use binding.
- Fixed render targets so it can handle most graph situations.
- Added advanced tab to camera movement for advanced options.

version 0.9
- Updated the script to work in Octane version 1.28
- Fixed render target problems when exiting the script.

version 0.8
- Added Thomas' fix for linked nodes.
- Made some default setting more reasonable per pixelrushes' suggestion.
- Fixed the load and save defaults so they save the defaults file in the user defined scripts directory.
- Fixed the stop button from being disabled when you switch render targets.
-The script now uses the improved node find function.
- Changed the limit on the target offset to 16000 for r-username, hopefully that will be large enough. ;)
- Made general bug fixes and simplified the code somewhat.

version 0.7
- Fixed a problem with stopping and restarting the animation
- Added a reset button in the defaults area, selecting this button will restore the settings to their original values.
- Added a live preview button with it's own samples/px slider. This will run through the animation with out saving the frames and if you set the samples really low (1 to 10) you can see an almost live preview of the animation.

version 0.6
- Fixed the defaults load function so that it checks for the existence of the defaults file before trying to load it and puts up an error message.

version 0.5
- Added the new Octane script header to the script
- Added a load and save buttons for loading and saving default values. Currently I have no way to find the current script directory so the defaults file is saved in user's home directory (not ideal). It's just a text file and you can edit it with any text editor, but do not change the format of the file, just the values. I haven't put all of the values into the file so let me know if you would like a value added or removed. Some values would not make sense to add to the file, like the render target pull down.
- Started to move the callbacks to their own file (turntableG_callbacks.lua).
- Forgot to add that I set the hotkey for the script to alt + t.

version 0.4
- Added a render targets drop down menu so you can select which target node you want to use from the script. There are some issues with the drop down that Thomas has said will be fixed on the next version of Octane. I also fixed some small bugs. Enjoy :D

I made some small changes to Thomas' script, mostly to break it up into smaller scripts so that it is easier to work with and added in the spiral function. I also changed the layout a bit. To install you just need to create a script directory and set it in Octane's preferences. Unzip the file in the script directory, it should make a turntable_files directory and a turntable.lua file. If you already have files named the same as these then you should either move/rename them or unzip these file in another directory and point Octane to it.

To use the spiral function just set the slider to either a negative number (to spiral in) or a positive number (to spiral out). Set it to zero to turn it off. The numbers for the most part should be pretty small, I have been using 0.2 and 0.1 for my tests. If you take the target offset and divide it by the number of frames you can get an approximate value to use.

There is still a lot of work that could be done with the script and I'm not sure I choose the correct default values or if breaking the script apart is a good thing to do? One word of warning, if you pause Octane and then run the script you will lock Octane up and have to kill the program. The most frustrating part of this is that Octane kept crashing on me, I have yet been able to complete a 250 frame animation without it crashing. :cry:

This first video is just the simple turntable of a model I started years ago but never finished:



The second video is a spiral in with a value of -0.2:



The third is a spiral out with a value of 0.1:



Excellent! Thanks to whoever fixed the videos. :D
Attachments
turntableG-V101.zip
(11.77 KiB) Downloaded 169 times
turntableG-V100.zip
(17.9 KiB) Downloaded 181 times
turntableG-V010.zip
(11.6 KiB) Downloaded 175 times
Last edited by grimm on Sun Jul 06, 2014 12:12 am, edited 16 times in total.
Linux Mint 19 x64 | Nvidia GTX 980 4GB (displays) RTX 2070 8GB| Intel I7 5820K 3.8 Ghz | 32Gb Memory | Nvidia Driver 440.31
User avatar
grimm
Licensed Customer
Licensed Customer
 
Posts: 1149
Joined: Wed Jan 27, 2010 8:11 pm
Location: Spokane, Washington, USA

Re: Grimm's take on the turntable anim script

Postby Tugpsx » Mon Dec 23, 2013 7:03 am

Tugpsx Mon Dec 23, 2013 7:03 am
Thanks for sharing. May I make a suggestion, since most who are using scripts have already established a location for their scripts it is best to rename the script prior to presenting.
Yes its very easy to rename a file and we will not get trivial about that, this is more a tribute to you as in Grimm_turntable of course with a note in the comments acknowledging your forerunners.

BTW this is not aimed at you, it just so happen you are blazing the trail so to establish a protocol for future coders.
Thanks for an awesome add-on looking for more to come in the future.
Dell Win Vista 32 | NVIDIA Quadro NVS135M | Core2 Duo T7500 2.20GHz | 4GB
CyberPowerPC Win 7 64| NVIDIA GTX660Ti (3G) GTX480(1.5G) | 16GB
Tugpsx
Licensed Customer
Licensed Customer
 
Posts: 1058
Joined: Thu Feb 04, 2010 8:04 pm
Location: Chicago, IL

Re: Grimm's take on the turntable anim script

Postby grimm » Mon Dec 23, 2013 7:12 am

grimm Mon Dec 23, 2013 7:12 am
Nope, not offended, you make a very good point. Add that to the long list of questions on Octane scripting in general. :D
Linux Mint 19 x64 | Nvidia GTX 980 4GB (displays) RTX 2070 8GB| Intel I7 5820K 3.8 Ghz | 32Gb Memory | Nvidia Driver 440.31
User avatar
grimm
Licensed Customer
Licensed Customer
 
Posts: 1149
Joined: Wed Jan 27, 2010 8:11 pm
Location: Spokane, Washington, USA

Re: Grimm's take on the turntable anim script

Postby Tugpsx » Mon Dec 23, 2013 7:29 am

Tugpsx Mon Dec 23, 2013 7:29 am
Since you are in the mode for coding, how about adding an option to choose the render target and adding an exit/close button since the cancel is actually a process cancel not a script cancel
Dell Win Vista 32 | NVIDIA Quadro NVS135M | Core2 Duo T7500 2.20GHz | 4GB
CyberPowerPC Win 7 64| NVIDIA GTX660Ti (3G) GTX480(1.5G) | 16GB
Tugpsx
Licensed Customer
Licensed Customer
 
Posts: 1058
Joined: Thu Feb 04, 2010 8:04 pm
Location: Chicago, IL

Re: Grimm's take on the turntable anim script

Postby grimm » Mon Dec 23, 2013 7:56 am

grimm Mon Dec 23, 2013 7:56 am
The cancel button is confusing, I had the same thought. Maybe the thing to do is to rename the cancel button to something like "Stop Render" and make a new button that would be named "Cancel" or "(Stop/Quit/Exit) Script".

The render target chooser should be doable. It's going to take more thought for me though as I'm still learning both Lua and the API. I'm thinking that all it would take would be to gather up all the render targets and put them in a combo box component. Well, I will poke at it and see if I can't get something to work.
Linux Mint 19 x64 | Nvidia GTX 980 4GB (displays) RTX 2070 8GB| Intel I7 5820K 3.8 Ghz | 32Gb Memory | Nvidia Driver 440.31
User avatar
grimm
Licensed Customer
Licensed Customer
 
Posts: 1149
Joined: Wed Jan 27, 2010 8:11 pm
Location: Spokane, Washington, USA

Re: Grimm's take on the turntable anim script

Postby grimm » Mon Dec 23, 2013 5:43 pm

grimm Mon Dec 23, 2013 5:43 pm
Here is a new version:
turntableG.zip
(6.49 KiB) Downloaded 178 times


- Added tool tips (only buttons have these currently?)
- Added a version number to the script (V0.2)
- Added a shutter time slider (anyway of having just a simple entry component, with out the slider?)
- Added a new button to exit the script
- Renamed the "cancel" button to "stop render"
- Renamed the scripts so they will not conflict with other turntable scripts.

Todo:

- rename the zip file with the current script version
- Add render target combo box
Linux Mint 19 x64 | Nvidia GTX 980 4GB (displays) RTX 2070 8GB| Intel I7 5820K 3.8 Ghz | 32Gb Memory | Nvidia Driver 440.31
User avatar
grimm
Licensed Customer
Licensed Customer
 
Posts: 1149
Joined: Wed Jan 27, 2010 8:11 pm
Location: Spokane, Washington, USA

Re: Grimm's take on the turntable anim script

Postby r-username » Mon Dec 23, 2013 6:09 pm

r-username Mon Dec 23, 2013 6:09 pm
Thank you.

It would be great if you could develop a Lua camera motion set starting with pan camera, I would put some funds toward your time or be your first customer.

I think it would be interesting for the turntable script to write to an .abc file or mode then use the other render .abc script.

Thanks again for the additional features.
i7 960 - W7x64 - 12 GB - 2x GTX 780ti
http://www.startsimple.com/ - http://www.gigavr.com/
r-username
Licensed Customer
Licensed Customer
 
Posts: 217
Joined: Thu Nov 24, 2011 3:39 pm

Re: Grimm's take on the turntable anim script

Postby grimm » Tue Dec 24, 2013 12:12 am

grimm Tue Dec 24, 2013 12:12 am
Thanks but I'm not sure I'm ready to have customers yet. :) How were you thinking the camera path would be setup? It would probably be easy to set up a linear path between two points. The Alembic stuff is still too new in Octane, I haven't seen any hooks to it in the API yet so that would have to wait. :(
Linux Mint 19 x64 | Nvidia GTX 980 4GB (displays) RTX 2070 8GB| Intel I7 5820K 3.8 Ghz | 32Gb Memory | Nvidia Driver 440.31
User avatar
grimm
Licensed Customer
Licensed Customer
 
Posts: 1149
Joined: Wed Jan 27, 2010 8:11 pm
Location: Spokane, Washington, USA

Re: Grimm's take on the turntable anim script

Postby pixelrush » Tue Dec 24, 2013 1:53 am

pixelrush Tue Dec 24, 2013 1:53 am
When I suggested being able to set up camera paths I was firmly told Octane wasn't for that purpose.
Personally I don't see what's so wrong about it.. I guess now we have Lua users can do what they want anyway. :P

Perhaps half a dozen xyz sliders for some way points would do with some smooth interpolation..
I can see this evolving into a monster of a script. :mrgreen:
i7-3820 @4.3Ghz | 24gb | Win7pro-64
GTS 250 display + 2 x GTX 780 cuda| driver 331.65
Octane v1.55
User avatar
pixelrush
Licensed Customer
Licensed Customer
 
Posts: 1618
Joined: Mon Jan 11, 2010 7:11 pm
Location: Nelson, New Zealand

Re: Grimm's take on the turntable anim script

Postby roeland » Tue Dec 24, 2013 2:10 am

roeland Tue Dec 24, 2013 2:10 am
The thing is, for most people it is easier to make some camera path in a 3D-application and export it. Even if we would add some functionality for this, we wouldn't be able to compete with those 3D apps. But with scripting this is definitely possible.

--
Roeland
User avatar
roeland
OctaneRender Team
OctaneRender Team
 
Posts: 1741
Joined: Wed Mar 09, 2011 10:09 pm
Next

Return to Lua Scripting


Who is online

Users browsing this forum: No registered users and 3 guests

Wed Nov 13, 2019 8:29 pm [ UTC ]