How to input a transform value for scatter node

Forum for OctaneRender Lua scripting examples, discussion and support.
Post Reply
xhm2855
Licensed Customer
Posts: 13
Joined: Mon Dec 22, 2014 11:08 am

Now , I am writing a scatter node in octane with lua script. and I write some words as below. But when it run, it will appears an error as 'Expecting a vector argument.' . I checked this sentence and found it referred to the sentence of 'CoffeeTableScatterNode:setAttribute("transforms",matrix);' How could I do for such example?

Thanks.

Below is the sourcecode of the lua.

CoffeeTableScatterNode=octane.node.create{
name="Coffee_Table";
type=octane.NT_GEO_SCATTER;
position={84.0175,88.5058};
}
CoffeeTableScatterNode:setAttribute("scaleUnitType",4);
matrix = {
{0,0,-1},
{1.95,0,1},
{-0,0.01,1},
{-0,0,-3.75}
}
CoffeeTableScatterNode:setAttribute("transforms",matrix);
CoffeeTableScatterNode:setAttribute("inherit",true);
User avatar
smicha
Licensed Customer
Posts: 3151
Joined: Wed Sep 21, 2011 4:13 pm
Location: Warsaw, Poland

3090, Titan, Quadro, Xeon Scalable Supermicro, 768GB RAM; Sketchup Pro, Classical Architecture.
Custom alloy powder coated laser cut cases, Autodesk metal-sheet 3D modelling.
build-log http://render.otoy.com/forum/viewtopic.php?f=9&t=42540
xhm2855
Licensed Customer
Posts: 13
Joined: Mon Dec 22, 2014 11:08 am

Thanks, but the problem is still existed.

Why the matrix of

matrix = {
{0,0,-1},
{1.95,0,1},
{-0,0.01,1},
{-0,0,-3.75}
}
is not a vector?

And how to set the A_TRANSFORMS of Scatter Node in Octane script?
Post Reply

Return to “Lua Scripting”