question

Huy Bui avatar image
Huy Bui asked ·

aiSetParameter assignment language for any attribute

Hi,

I raised this question last time for shader and displacement map. Everything works fine with the following syntax:

shader = 'abc'

disp_map = 'abc'

Other than that, does anyone has any clue for other generic attributes associated with a shape node (ie. motionBlur, smoothShading, aiSubdivType, ect.). Direct use of camel-case attributes seems to be not working as following:

aiSubdivType = 'catclark'

Instead, it should be this to make it work:

subdiv_type = 'catclark'

The logic seems to be stripping all prefixes 'ai' (if any), and turning all uppercase letters into lower ones with underscores in front of it. However, this is not 100% working for most cases. For instance, using this expression for the attribute renderDensity on Yeti node does not work:

render_density = 0.1

It should be like this instead:

density = 0.1

So, the question is that, is there any document/rule for this? Much appreciated for any hint.

Thanks.

arnoldoperator
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Huy Bui avatar image
Huy Bui answered ·

Hi Ashley,

Great to see the secret! Many thanks for your support!

Cheers !

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Ashley Handscomb Retallack avatar image
Ashley Handscomb Retallack answered ·

The paramater names are Arnold paramaters.

You can query the names via the kick commandline renderer.

e.g.


kick -info polymesh

Returns

Type          Name                              Default
------------  --------------------------------  --------------------------------
BYTE          visibility                        255
BYTE          sidedness                         255
BOOL          receive_shadows                   true
BOOL          self_shadows                      true
BOOL          invert_normals                    false
FLOAT         ray_bias                          1e-06
MATRIX[]      matrix                            (empty)
ENUM          transform_type                    rotate_about_center
NODE[]        shader                            (empty)
BOOL          opaque                            true
BOOL          matte                             false
BOOL          use_light_group                   false
NODE[]        light_group                       (empty)
BOOL          use_shadow_group                  false
NODE[]        shadow_group                      (empty)
STRING[]      trace_sets                        (empty)
FLOAT         motion_start                      0
FLOAT         motion_end                        1
UINT          id                                0
UINT[]        nsides                            (empty)
UINT[]        vidxs                             (empty)
UINT[]        polygon_holes                     (empty)
UINT[]        nidxs                             (empty)
UINT[]        uvidxs                            (empty)
UINT[]        crease_idxs                       (empty)
FLOAT[]       crease_sharpness                  (empty)
BYTE[]        shidxs                            (empty)
VECTOR[]      vlist                             (empty)
VECTOR[]      nlist                             (empty)
VECTOR2[]     uvlist                            (empty)
BOOL          smoothing                         false
ENUM          subdiv_type                       none
BYTE          subdiv_iterations                 1
FLOAT         subdiv_adaptive_error             0
ENUM          subdiv_adaptive_metric            auto
ENUM          subdiv_adaptive_space             raster
BOOL          subdiv_frustum_ignore             false
ENUM          subdiv_uv_smoothing               pin_corners
BOOL          subdiv_smooth_derivs              false
NODE[]        disp_map                          (empty)
FLOAT         disp_padding                      0
FLOAT         disp_height                       1
FLOAT         disp_zero_value                   0
BOOL          disp_autobump                     false
BYTE          autobump_visibility               1
FLOAT         step_size                         0
FLOAT         volume_padding                    0
STRING        name                              

With the Type, name and default value

Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Welcome to the Arnold Answers community.

This is the place for Arnold renderer users everywhere to ask and answer rendering questions, and share knowledge about using Arnold, Arnold plugins, workflows and developing tools with Arnold.

If you are a new user to Arnold Answers, please first check out our FAQ and User Guide for more information.

When posting questions, please be sure to select the appropriate Space for your Arnold plugin and include the plugin version you are using.

Please include images, scene and log files whenever possible as this helps the community answer your questions.

Instructions for generating full verbosity log files are available for MtoA, MaxtoA, C4DtoA, HtoA, KtoA, and Kick.

If you are looking for Arnold Documentation and Support please visit the Arnold Support site.

To try Arnold please visit the Arnold Trial page.

Bottom No panel present for this section.