The built-in N AOV is in world space. So how to get a tangent-space N AOV? Like this:
In brief, I read the N AOV, transform the normals from world to tangent space, and then map the normal values to the range 0.5, 1 (I used the range node here, but I could have used Add and Multiply to do the same thing).
Here’s the shader tree. You can save this in a .ass file and import it into Maya or whatever application you use. Then set up an AOV shader to write the custom Ntangent AOV
tangent 1 0 0
normal 0 1 0
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.
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: