Turntable animations in Lua (part 2)

Forum for OctaneRender Lua scripting examples, discussion and support.
User avatar
stratified
OctaneRender Team
Posts: 945
Joined: Wed Aug 15, 2012 6:32 am
Location: Auckland, New Zealand

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
r-username
Licensed Customer
Posts: 217
Joined: Thu Nov 24, 2011 3:39 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/
Tugpsx
Licensed Customer
Posts: 1150
Joined: Thu Feb 04, 2010 8:04 pm
Location: Chicago, IL
Contact:

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.
Win 11 64GB | NVIDIA RTX3060 12GB
User avatar
stratified
OctaneRender Team
Posts: 945
Joined: Wed Aug 15, 2012 6:32 am
Location: Auckland, New Zealand

Just so that I understand this correctly. For example given the next selection:
selected nodes
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
Tugpsx
Licensed Customer
Posts: 1150
Joined: Thu Feb 04, 2010 8:04 pm
Location: Chicago, IL
Contact:

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.
Win 11 64GB | NVIDIA RTX3060 12GB
User avatar
stratified
OctaneRender Team
Posts: 945
Joined: Wed Aug 15, 2012 6:32 am
Location: Auckland, New Zealand

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
Post Reply

Return to “Lua Scripting”