Is it possible to apply a rotation to an object using a "rotate" command or can transformations only be applied using the "matrix" command? Is there a document that lists all the .ass commands?
There's no specification or docs for the ASS file format. You should use the Arnold API to create nodes and set parameters, and then call AiASSWrite.
Usually the plugins apply transformations directly to the mesh points, so the transformed vertex coords are exported.
There are no ass commands.
Sorry Stephen I did not explain myself properly. I am experimenting with the simpleScene.ass script given here,
I am trying to use set_transform { } as follows.
sphere {
name pSphereShape1
center 0 0 0
radius 3
matrix 1 0 0 0 0 0 1 0 0 -1 0 0 0 0 0 1
shader "mkU2Color"
}
set_transform {
inputs "pSphereShape1"
enable true
scale 2.0 2.0 1.5
mode replace
}
kick is not complaining but the sphere is not scaled. I'm trying to determine to what extend I can write a .ass file directly with a text editor.
By "Arnold API" do you mean using the python classes found in the SDK/python/arnold directory? In which case is there any sample python code to get me started?
malcolm
You can use either Python or C++
The Python bindings are for the Arnold C++ API
set_transform.inputs is for linking other operators.
set_transform.selection is the expression that selects nodes like pSphereShape1
pSphereShape1 is an implicit sphere that just has a radius and a center, so I kinda expect scaling it to do nothing. Try with a polymesh, see the attached ass file.
In general, I would look at how a plugin like sitoa does it, and then translate to Python
a few simple examples here: https://arnoldsupport.com/?s=python&submit=Search
And kick -info is useful
Many thanks Stephen. The scaling works but only if I put
operator "aiSetTransform1"
in the options part of the .ass file.
Malcolm
Is it possible to use python for a procedural in Maya or are procedurals always written in C++ ?
Malcolm