Turntable animations in Lua (part 2)

Forums: Turntable animations in Lua (part 2)
Forum for OctaneRender Lua scripting examples, discussion and support.

Re: Turntable animations in Lua (part 2)

Postby stratified » Fri Dec 20, 2013 8:56 pm

stratified Fri Dec 20, 2013 8:56 pm
pixelrush wrote:>You can't like stop this script and then scrub the animation....

OK but I could break the script into 2 convenient stages. Settings/Preview and then Render Animation.
After adjusting the settings the camera table is re/calculated. Then I include a 'Preview' button to render (but not save) through every 10th frame, say, and at low samples and small resolution to verify the view/path is as intended. Or, on second thought, perhaps its better to have a slider to choose which frame to preview and it rerenders with each change. I can read from the script table like that, can't I? So its a quasi scrub inside the script but showing in the Octane view... we forget about using that nice Alembic slider... ;)
Then if all is satisfactory I push the big red Do Miracle Now button down :o to run the full and final render set. :D

You can tell I am not a naturally gifted coder can't you? :lol:


Yep, you could add your own time slider to scrub through. Or you could add an extra "add to scene button" which hooks up the animation with your actual project (So you can stop your script and then scrub through the timeline).

cheers,
Thomas
User avatar
stratified
OctaneRender Team
OctaneRender Team
 
Posts: 945
Joined: Wed Aug 15, 2012 6:32 am
Location: Auckland, New Zealand

Re: Turntable animations in Lua (part 2)

Postby r-username » Sat Dec 21, 2013 3:40 pm

r-username Sat Dec 21, 2013 3:40 pm
stratified wrote:Node & graph selection is exposed in Lua, getSelection(). Or I don't really understand the question ;)


Thanks for the save previews script.

For the "show in script editor" question, one can use the script editor to define scripts then run and they populate the node editor with what was defined in the script.

I was thinking the reverse, making a node setup in the node editor, then right clicking a node or node group and having "show in script editor" that would populate the script editor with the lua script that would define what was selected.

This would be similar to the way i work when coding html (or actionscript or javascript), sometimes it's easer to to use a graphical interface other times it's easer to code in html, but I can jump back an forth between the two.

Not sure if that is any clearer, thanks again for all the scripts
cheers, s
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: Turntable animations in Lua (part 2)

Postby Tugpsx » Sat Dec 21, 2013 7:06 pm

Tugpsx Sat Dec 21, 2013 7:06 pm
Using the graphical interface give a good frame of reference that can then be refined, so that would be a good idea to add the node to script option since we already have script to node.
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: 1145
Joined: Thu Feb 04, 2010 8:04 pm
Location: Chicago, IL

Re: Turntable animations in Lua (part 2)

Postby stratified » Sun Dec 29, 2013 1:53 am

stratified Sun Dec 29, 2013 1:53 am
Just so that I understand this correctly. For example given the next selection:

selection.png
selected nodes


Right mouse on the selection and then "script" would then generate something like this in the editor:

Code: Select all
-- auto-generated code
local renderTarget = octane.lua.magic()
local geometryGroup = octane.lua.magic()
local scatter1 = octane.lua.magic()
local scatter2 = octane.lua.magic()


So basically it generates a code template from the selected nodes. I guess it's up to us to decide what the magic will be ;)

Is this what you guys meant?

thanks,
Thomas
User avatar
stratified
OctaneRender Team
OctaneRender Team
 
Posts: 945
Joined: Wed Aug 15, 2012 6:32 am
Location: Auckland, New Zealand

Re: Turntable animations in Lua (part 2)

Postby Tugpsx » Sun Dec 29, 2013 9:41 am

Tugpsx Sun Dec 29, 2013 9:41 am
Exactly, and the fun as you stated will be to figure out what the magic will be. maybe link it to the script location from preference so that a list is generated. the problem with something like that would be reference and variables that link for example render target, ABC file etc.
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: 1145
Joined: Thu Feb 04, 2010 8:04 pm
Location: Chicago, IL

Re: Turntable animations in Lua (part 2)

Postby stratified » Tue Dec 31, 2013 12:40 am

stratified Tue Dec 31, 2013 12:40 am
hi everybody,

Grimm reported a problem with the turntable script. I've attached an updated version to the original post.

When there are more scripts around, we'll make a collection of "official" scripts available in Octane itself.

cheers,
Thomas
User avatar
stratified
OctaneRender Team
OctaneRender Team
 
Posts: 945
Joined: Wed Aug 15, 2012 6:32 am
Location: Auckland, New Zealand
Previous

Return to Lua Scripting


Who is online

Users browsing this forum: No registered users and 8 guests

Tue Apr 23, 2024 3:19 pm [ UTC ]