Community
Arnold General Rendering Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

When writing a .ass file with a text editor

6 REPLIES 6
Reply
Message 1 of 7
mkesson4VQY4
405 Views, 6 Replies

When writing a .ass file with a text editor

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?

6 REPLIES 6
Message 2 of 7

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.



// Stephen Blair
// Arnold Renderer Support
Message 3 of 7
mkesson4VQY4
in reply to: mkesson4VQY4

Sorry Stephen I did not explain myself properly. I am experimenting with the simpleScene.ass script given here,

https://docs.arnoldrenderer.com/display/AFMUG/Creating+a+shader#CreatingaShader-1.1.1InstallingaC++C...

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

Message 4 of 7

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.

set-transform.zip

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



// Stephen Blair
// Arnold Renderer Support
Message 5 of 7
mkesson4VQY4
in reply to: mkesson4VQY4

Many thanks Stephen. The scaling works but only if I put

operator "aiSetTransform1"

in the options part of the .ass file.

Malcolm

Message 6 of 7
mkesson4VQY4
in reply to: mkesson4VQY4

Is it possible to use python for a procedural in Maya or are procedurals always written in C++ ?

Malcolm

Message 7 of 7

@Malcolm Kesson C++ only



// Stephen Blair
// Arnold Renderer Support

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report