[MtoA] Jittering color with user data


To jitter color with user data, you need to connect an aiUserDataInt to the data input parameter, like this:

mtoa_jitter_userdata

The user data is an mtoa_constant attribute on the shape.  For example, if add an extra attribute named mtoa_constant_jitterID to some shapes, then you can use aiUserDataInt to read the jitterID.

If you want to use the shapes as standins, and be able to set the jitterID in the scene, then export the shapes without the mtoa_constant_jitterID attribute. In the scene, you’ll be able to add mtoa_constant_jitterID to the aiStandin node. The aiUserDataInt node in the ASS file will use that jitterID.

Buying Arnold


get_arnold

 

Annual subscriptions

You get annual subscriptions from Autodesk resellers

You can get Arnold 5-packs at 50% of the usual price, or you can get single Arnold licenses at full price:

Monthly subscriptions

  • You can subscribe for one, two, or three months.
  • Monthly Subscriptions are £60 / €70 / $65 Per Month
  • Monthly subscriptions are available online from solidangle.com

Permanent licenses

Until 30 April 2018, you can still get permanent Arnold licenses. Contact your local Autodesk reseller.

Arnold light_groups and shadow_groups


Light linking in Maya, include/exclude objects for lights in CINEMA 4D, light masks in Houdini, inclusive/exclusive lights in Softimage, they all are translated to light_groups and shadow_groups in Arnold.

Here’s a sphere on a plane, with two area lights (cyan and green).

default

If we add a light_group to the sphere polymesh:

 use_light_group on
 light_group "CyanAreaLight"

then we get this (see below). The sphere is lit only by the cyan area light: the light_group is the lights that affect the object.

light_group_on_cyan
Note that the sphere still casts shadows from the green light, even the sphere isn’t lit by the green light. That’s because there’s no shadow_group, so all lights cast shadows from the object.

If we add a shadow group, so that the light_group and shadow_group are both “CyanAreaLight”, then the sphere is lit by the cyan light only, and casts shadows from the cyan light only.

use_light_group on
 light_group "CyanAreaLight"
use_shadow_group on
 shadow_group "CyanAreaLight"

light_shadow_groups_on_cyan

And finally, here’s the sphere when light groups are on, but there’s no lights in the light group:

use_light_group on
use_shadow_group on
 shadow_group "CyanAreaLight"

light_group_empty

[OSX] Getting Arnold logs for batch renders


You can get individual log files for each frame:

  1. In the Arnold Render Settings, go to the Diagnostics tab.
  2. In the Verbosity Level list, click Warnings + Info.
  3. Click the File check box.
  4. Click the folder icon and choose a folder for the Arnold log files.

mtoa_render_settings_log

Or you can check the MayaRender log, which will be one log file, with the log messages for every frame.

On OSX, open the Console and look for ~/Library/Logs/Maya/mayaRender.log
mayaRenderlog

Maya standins with Softimage ass files


sitoa_ass_in_maya
If you want to export ASS files from Softimage and use them in Maya, all you have to do is add the SItoA shaders (eg SItoA\Application\Plugins\bin\nt-x86-64) to the Plugin Search Path
mtoa_plugin_search_path

ASS files from Softimage use SItoA-specific shaders, so you need to tell Arnold where to find those SItoA shaders. For example, since SItoA 4.0, there’s a new Closure node that connects shaders like Standard Surface to color parameters.  MtoA doesn’t  have a Closure node, because MtoA took a different approach to dealing with the fact that Standard Surface returns a closure data structure, not a color.

kicking a cputime heat map


cputime-heatmap.png

New in Arnold 5.0.2! You can press T to get a cputime heat map. From the Arnold release notes:

  • Added cputime heatmap view to kick: When using kick you can now toggle between viewing kicks default output and a cputime heatmap with the T key. The mapping of the heat map can be scaled with the [ and ] keys.

To get the cputime heat map, you have to run kick interactive (eg with the -ipr flag):

kick -ipr example.ass

How to check what mip levels are used


You can use the Arnold log to check what mip levels are used. In the Image file statistics, there’ll be a MIP-COUNT for every texture

00:00:02 124MB | Image file statistics:
00:00:02 124MB |       opens tiles MB read --redundant-- I/O time res             File
00:00:02 124MB |     1   1   538   12.6                  2.2s     8192x8192x3.f16 debug.tx MIP-COUNT[0,13,314,147,40,15,4,1,1,1,1,0,0,1]
00:00:02 124MB |

For example, with my debug texture, I see

MIP-COUNT[0,13,314,147,40,15,4,1,1,1,1,0,0,1]

in the Arnold log for this render:

 

Setting up Arnold render nodes


I’ve seen several variations of this question recently. Usually there’s some confusion about “Arnold standalone” and what’s actually required on a render node.

If you rendering scene files from Maya, or 3ds Max, or some other 3d application, then you do not need Arnold standalone.

You need the 3d application (Maya, 3ds Max) and the Arnold plugin for that application (MtoA, MAXtoA). Download the Arnold plugin from https://www.arnoldrenderer.com/arnold/download

For example, let’s suppose you want to render Maya scene files.

  • You need to install Maya and MtoA on each render node.
  • You don’t need Maya licenses for batch rendering, and you don’t need Maya licenses to install Maya on render nodes.
  • You need Arnold licenses, which are a separate purchase. MtoA is free and unlicensed. Arnold, however, does require a license to render without the watermark. You need one Arnold license for each render node (for you CINEMA 4D users, a TeamRender client is an Arnold render node and requires its own license).
  • You need an Autodesk network license server running somewhere (not on a render node).
  • You need to connect Arnold to the Autodesk network license manager.

It’s the same thing for 3ds Max and MAXtoA.

Using oiiotool and maketx to create a mipmap debug texture


To visualize the different mipmap levels, you can create a custom tx file with different textures for each mipmap level. It’s pretty easy to do with maketx. (or you can download this one)

First, to create the different mipmap levels, I use oiiotool (I use the one shipped with HtoA).

oiiotool --pattern checker:width=32:height=32:color1=1,0,1 8192x8192 3 -o 8192.tif
oiiotool --pattern checker:width=32:height=32:color1=1,0,1 8192x8192 3 -o 8192.tif
oiiotool --pattern checker:width=32:height=32:color1=1,0,0 4096x4096 3 -o 4096.tif
oiiotool --pattern checker:width=32:height=32:color1=1,.25,0 2048x2048 3 -o 2048.tif
oiiotool --pattern checker:width=32:height=32:color1=0,0,1 1024x1024 3 -o 1024.tif
oiiotool --pattern constant:color=1,1,0 512x512 3 -o 512.tif
oiiotool --pattern constant:color=0,1,1 256x256 3 -o 256.tif
oiiotool --pattern constant:color=.5,0,0 128x128 3 -o 128.tif
oiiotool --pattern constant:color=.5,.5,0 64x64 3 -o 64.tif
oiiotool --pattern constant:color=0,1,0 32x32 3 -o 32.tif
oiiotool --pattern constant:color=.5,0,.5 16x16 3 -o 16.tif
oiiotool --pattern constant:color=.82,.41,.12 8x8 3 -o 8.tif
oiiotool --pattern constant:color=0,.5,.5 4x4 3 -o 4.tif
oiiotool --pattern constant:color=0,.75,1 2x2 3 -o 2.tif
oiiotool --pattern constant:color=.5,.5,.5 1x1 3 -o 1.tif

You can’t use constant colors for all the levels, because OIIO will optimize your texture into a constant color and there won’t be any texture access.

Then I use the -mipimage flag to combine all the mipmap levels into a tx file:

maketx 8192.tif ^
-mipimage 4096.tif ^
-mipimage 2048.tif ^
-mipimage 1024.tif ^
-mipimage 512.tif ^
-mipimage 256.tif ^
-mipimage 128.tif ^
-mipimage 64.tif ^
-mipimage 32.tif ^
-mipimage 16.tif ^
-mipimage 8.tif ^
-mipimage 4.tif ^
-mipimage 2.tif ^
-mipimage 1.tif ^
-format exr -d half -o debug.tx

Here’s a couple of examples of using mip-map bias with the debug tx file.

Mip-map Bias = -1 (read a higher resolution mipmap)

mipmap-bias-1

Mip-map Bias = 2 (read two-levels lower resolution mipmap)

mipmap-bias

 

[mtoa] The case of the layeredTexture and Arnold 5 closures


In this case, the question was “why doesn’t layeredTexture work in Arnold 5?”

layeredTexture

This is a common question/problem with Arnold 5: shaders plugged into color slots.

In Arnold 5, shaders like Standard Surface (and Lambert too) don’t return colors. So in general, you can’t plug them into color parameters. And Blinns are translated into Standard Shaders by MtoA, so you can’t plug a Blinn into a color either.

Instead of a layeredTexture, you can use a layeredShader. It knows how to handle shaders that don’t return colors. Or you could use the Arnold aiMix shader.

layeredShader

So, if these shaders don’t return colors, what do they return?

Closures. They return closures.

closure is not a color, it’s a bundle of data that tells Arnold how the surface (or volume) scatters light. Arnold takes care of all the ray tracing and light sampling, and then uses the closure to figure out the surface color.

 

From Master Zap:

“The addition of “closures” is a complete godsend. This relegates the work of rendering to the renderer, as it should be. No longer are material shaders little dumb raytracers that count lights and shoot reflection rays. A material shader returns mix of BxDF closures, and the renderer itself takes care of doing “the right thing” with them”.

From the Arnold 5 release notes:

Closures: a new closure parameter type has been added, which shaders can output instead of final colors. There are BSDF, BSSRDF, emission, matte, transparency and volume closures. See the API documentation and examples for more details on how to use these. Linking a color to a closure parameter will automatically create an emission closure with that color. A closure parameter however can’t be linked or converted to a color, as the integrator only computes lighting after shader evaluation.