Here’s how to use the 3ds Max object ids for a simple Object ID AOV.
And here’s the material (aka shader tree) that writes the AOV. Use a text editor to save this as Arnold Scene Source (.ass) file, and then import it into 3ds Max (like I did in the video).
An ASS file is a plain-text file.
### exported: Thu May 21 07:53:19 2020
### from: Arnold 188.8.131.52 [991b08e9] windows icc-17.0.2 oiio-2.2.1 osl-1.11.0 vdb-4.0.0 clm-184.108.40.206 rlm-12.4.2 optix-6.7.0 2020/04/17 09:11:12
### host app: MAXtoA 220.127.116.11 (2021) 3ds Max 23.0.915.2021
declare nodeName constant STRING
nodeName "Material #43"
input1 1 0 0 1
input2 0 1 0 1
input3 0 0 1 1
This is actually pretty cool…you can use an operator to update file paths before an ASS file or ABC file is loaded, then use another operator to touch the geometry loaded by that procedural.
For example, suppose at render time you want to replace trex_proxy.abc with trex.abc. You can easily do that with a string replace operator:
*.(@node==’alembic’) selects all Alembic procedural nodes Match matches any file name that ends with “_proxy.abc” Replace replaces “_proxy.abc” with “.abc”
And that all happens
before the abc file is loaded.
We can see this in the Arnold log (Debug verbosity). First the
string replace operator is applied; then after the abc file is loaded, a set parameter operator is applied to the nodes loaded from the abc file. | initializing 16 nodes …
| [operators] init op: 'aiStringReplace1'
| [operators] cook op: 'aiStringReplace1' | node: '/aiStandIn/aiStandInShape'
| [proc] /aiStandIn/aiStandInShape: loaded 1 nodes (1 objects, 0 shaders)
| [operators] init op: 'TRex:tRexShape_aiSetParameter1'
| [operators] cook op: 'TRex:tRexShape_aiSetParameter1' | node: '/TRex:tRex/TRex:tRexShape'
You can use the
wireframe shader to drive the opacity of a standard_surface.
The wireframe shader itself doesn’t support opacity, and neither do the flat, utility, and ambient_occlusion shaders. They are all color shaders (RGB). In Arnold, only shaders that return
closures can support opacity.
In the more general case, where the opacity isn’t coming from the same shader, you can use the emission for the color:
Monthly, annual, and 3-year
single-user subscriptions of Arnold 6 are now available on the Autodesk e-store
No more license servers! With a new single-user subscription, you
just sign in with your Autodesk ID. Just Sign In for C4DtoA
Just Sign In for MtoA
One of the strange thing about supporting Arnold at Autodesk is that you have to be a guru-level licensing expert
on Autodesk licensing (not RLM, but Autodesk licensing).
case, Maya 2019 would silently fail at startup. Sometimes you’d see the splash screen, but then that would just disappear.
There was nothing in the Adlm.log
No MayaAdlm log was created
TIP All these log files are in the Temp folder.
On Windows, look in %LOCALAPPDATA%\Autodesk\Logs On OSX, look in $TMPDIR On Linux, look in /var/tmp
Process Monitor confirmed that the
ProductInformation.pit file was missing:
ProductInformation.pit is an all-important file used by the licensing infrastructure. Every Autodesk product must be registered in that pit file.
If ProductInformation.pit is missing, or corrupted, then everything stops working.
Or: how to fix the
node “ xgen_procedural” is not installed problem.
For example, suppose you want to render XGen hair in CINEMA 4D on macOS.
You can use use
color_correct with alpha_is_luminance enabled, like this:
If you want to control object visibility with operator, or the Arnold Python API, or by editing an ASS file, you need to understand Arnold’s visibility parameter.
In the UI, the object visibility options look like a bunch of separate parameters:
but in Arnold, all those options are stored in one
For example, if an object is visible to the camera (primary visibility), and to transmission (both diffuse and specular), then that’s
Why 13? Because 13 = 1 + 4 + 8
camera rays = 1
diffuse transmission rays = 4
specular transmission rays = 8
The Arnold visibility parameter tells Arnold the rays to which the object is visible.
visibility 0 means the object isn’t visible to any rays
visibility 255 means the object is visible to all rays
visibility 253 means the object isn’t visible to shadow rays (so the object does not cast shadows).
Here’s the decimal
values for all the different ray types.
To figure out the visibility, just add up the values for the rays you want.
Ray type Decimal Value Camera (Primary Visibility) 1 Shadow (Casts Shadows) 2 Diffuse transmission 4 Specular transmission 8 Volume 16 Diffuse reflection 32 Specular reflection 64 SSS (subsurface) 128
There’s two denoisers. Here’s when to use them:
OptiX Denoiser for fast (GPU-powered), slightly-lower quality denoising of IPR Use the
Arnold Denoiser (aka noice) for high-quality denoising of final frames and animation sequences
For more info, check the
You can use kick to render with debug shading. Here’s the flags to use:
-is to ignore the shaders assigned to the shapes
When you ignore shaders, a default utility shader is used to render the scene.
-sm sets the shade mode ( ndoteye lambert flat ambocc plastic metal)
-cm sets the color mode (color ng ns n bary uv u v dpdu dpdv p prims uniformid wire polywire obj edgelength floatgrid reflectline bad_uvs nlights id bumpdiff pixelerror)
Here’s some examples that show how to kick with different types of debug shading (I’ve used the Arnold Render View debug shading modes for these examples)
Basic: disable all shaders in the scene, switching to a gray ‘ndoteye’ shader; a very fast shading mode.
kick -is -sm notdoteye
Lighting: renders the scene with a white lambert shader
kick -is -sm lambert
Occlusion: use ambient occlusion shading
kick -is -sm ambocc
Wireframe: displays geometry as a wireframe
kick -is -cm polywire
kick -is -sm ndoteye -cm polywire
Normal: visualizes the normal vector (between 0 and 1, in tangent space)
kick -is -sm flat -cm n
UV: displays the coordinates of the primary UV set (red=U, green=V)
kick -is -sm flat -cm uv
Primitive ID: displays random colors based on the per-primitive (triangle, curve) index
kick -is -sm flat -cm prims
Barycentric: displays intra-primitive parametric coordinates (barycentric for triangles, parametric length, and width for curve segments)
kick -is -sm flat -cm bary
Object: displays random colors based on the per-object ID
kick -is -sm flat -cm obj