Quantcast
Channel: xsisupport – Arnold Support Corner
Viewing all 250 articles
Browse latest View live

Choosing hardware for rendering

$
0
0

In general, the more cores the better.

Here’s some general guidelines for choosing hardware:

  • Arnold scales linearly with increasing processor speed
  • Arnold scales well to multiple cores
  • For a rough estimate of  expected performance, you can multiply the clock speed by the number of physical cores.
  • Get enough RAM to hold your typical data sets (you probably should run
    some tests with your most challenging scenes)
  • Hyperthreading on Intel processors usually gives about 1.2x speedup on average.
  • If possible, running some tests is the best way to choose the best hardware for you

The case of the 15% rendering utilization

$
0
0

Or, “Understanding the Arnold log, part 23”

In this case, a client had very low (15%) CPU usage for a render. We got the Arnold log, and here’s the interesting part:

00:01:44  856MB   | OpenImageIO ImageCache statistics (0000000025850F20) ver 1.5.24
00:01:44  856MB   |   Images : 3 unique
00:01:44  856MB   |     ImageInputs : 299 created, 2 current, 3 peak
00:01:44  856MB   |     Total size of all images referenced : 192.4 MB
00:01:44  856MB   |     Read from disk : 12.0 GB
00:01:44  856MB   |     File I/O time : 45m 41.5s (48.1s average per thread)
00:01:44  856MB   |     File open time only : 0.0s
00:01:44  856MB   |   Tiles: 711523 created, 559 current, 640 peak
00:01:44  856MB   |     total tile requests : 249379431
00:01:44  856MB   |     micro-cache misses : 3353694 (1.34482%)
00:01:44  856MB   |     main cache misses : 711523 (0.285317%)
00:01:44  856MB   |     Peak cache memory : 10.0 MB
00:01:44  856MB   |   1 not tiled, 1 not MIP-mapped
00:01:44  856MB   | -----------------------------------------------------------------------------------
00:01:44  856MB   | performance warnings:
00:01:44  856MB   | Rendering utilization was only 15%. Your render may be bound by a single threaded process or I/O.
00:01:44  856MB   | -----------------------------------------------------------------------------------
  • File I/O time seems a bit high for three textures and a render that took less than 2 minutes
  • main cache* misses is pretty high. Normally you expect something less than 0.01%.

    0.285% means that texture tiles are loaded from disk (instead of from the in-memory texture cache) once out of every 350 texture lookups. That’s a little high.

    * The main cache is the cache of 64×64 texture tiles loaded from disk into the texture cache.

  • Peak cache memory is 10.0 MB !!! That explains the main cache misses: the texture cache is really, really small.

Other clues to the too-small texture cache size:

  • Read from disk is 12 GB but the total size of all images referenced is just 192.4 MB, and the peak cache memory was just 10.0 MB
    So the same texture data is constantly being unloaded from the cache and reloaded from disk.

The solution? Increase the size of the texture cache. The current default is 2048, which should be good in most cases.

The Arnold log

[MtoA] UnicodeEncodeError when rendering

$
0
0

UnicodeDecodeError

If you get this UnicodeEncodeError when you render

# Error: line 1: UnicodeEncodeError: file C:\Program Files\Autodesk\Maya2016\bin\python27.zip\encodings\utf_8.py line 16: ascii #

it’s probably because because the project folder has a special character in the name (for example, an accent mark like é).

If that’s not it, then we’d need more context (hint: everything else that is logged in the script history).

For a project name with a special character, you’ll see something like this in the script history:

file -f -save -options "v=0;";
// C:/maya/projects/New_Projéct/scenes/blank.mb //
# Error: line 1: UnicodeEncodeError: file D:\Program Files\Autodesk\Maya2017\bin\python27.zip\encodings\utf_8.py line 16: ascii #
# Error: line 1: UnicodeEncodeError: file D:\Program Files\Autodesk\Maya2017\bin\python27.zip\encodings\utf_8.py line 16: ascii #

 

 

The case of the mesh that wouldn’t displace

$
0
0

Riddle me this: two meshes with the same displacement shader. One has displacement, the other doesn’t. What’s up with that?

dispmaps

Your first guess might be that it’s a “padding is at least %x smaller than it should be” warning, like this:

// Warning: [disp] planeTestShape: padding is at least 10x smaller than it should be! given disp_padding: 0, recommended: 0.00835387595 //

But that’s not it.

In this case, the plane (the mesh on the right, with displacement) was scaled up. Displacement happens in object space, before any transformations are applied. So effectively, the mesh was displaced, and then everything was scaled up. The displacement scale was just too small for the other mesh, which hadn’t been scaled up).

If you freeze the scaling on the plane, then both objects will be displaced the same, as long as the displacement scale was set large enough.

[MtoA] Getting the MtoA build ID

$
0
0

When you contact support or log bugs, it’s nice to provide the version number and build ID of the MtoA version that you’re using.

This information is displayed in the Arnold > About box.

mtoa_buildid

But the build id (circled in the screenshot) is kinda a pain to type out. Fortunately, you can get the build ID with the arnoldPlugins command:

arnoldPlugins -gbi;
// Result: 261bd4ca (master) //

You can get both the MtoA version and the MtoA build ID like this:

print( "MtoA " + `pluginInfo -v -q "mtoa.mll"` + " - " + `arnoldPlugins -gbi`);

In Python:

print( "MtoA {} - {}".format( cmds.pluginInfo( 'mtoa', query=True, version=True), cmds.arnoldPlugins(getBuildID=True) ) )
# MtoA 1.4.2.2 - 261bd4ca (master)

Procedural namespaces

$
0
0

Here’s something new in Arnold 5.0

Each standin (aka procedural) now has its own namespace. So you don’t have to have unique shader names in every ASS file.

For example, here’s two standins. There’s no unique shader names. Both ASS files use the exact same shader names. And there’s no naming conflicts, and each standin renders with the correct shading.

namespaces.png

C4DtoA not listed in Plugins menu


[MtoA] Using standins with MASH dynamics

$
0
0

mash_dynamics_w_standin

Here’s a way to use standins with MASH dynamics: instance a low-poly mesh that has its Arnold Translator set to procedural.

  • Use a low-poly primitive as a proxy for the standin
  • In the low-poly primitive Attribute Editor, set Arnold Translator to procedural, and enter the path to the ASS file in the Path box.

arnold_translator_procedural

  • Instance that proxy object with MASH, and apply MASH dynamics

WARNING | unable to load dynamic library .\ai_renderview.dll: The specified module could not be found.

$
0
0

kick checks the current working directory for plugins (shaders and procedurals). That means kick tries to load all .dll/.so/.dylib files in the current directory.

So if you do this:

cd C:\solidangle\mtoadeploy\2017\bin
kick -nodes

Then you’ll get a warning like this (plus a pop-up System Error dialog that says “Qt5Core.dll is missing from your computer”).

loading plugins from .
WARNING | unable to load dynamic library .\ai_renderview.dll: The specified module could not be found.

On OSX, the warning would  say ./libai_renderview.so, and on Linux, ./libai.so

Notice the “loading plugins from .” The single period, or dot, represents the current directory.

The solution? Don’t run kick in the MtoA bin folder. Don’t run kick in an any folder where there are non-plugin libraries.

 

Buying Arnold

$
0
0

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.

[MtoA] Jittering color with user data

$
0
0

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.

[mtoa] Register failed for arnoldAOVChildSelector

$
0
0
If you see this error in the script editor # Error: Register failed for arnoldAOVChildSelector # that means your preferred render layer setup is Legacy Render Layers (so MtoA fails to register something that’s used for the new Render Setup). If … Continue reading

compiled against non-compatible Arnold

$
0
0

If you see something like this:

[Arnold]: MAXtoA_Shaders.dll was compiled against non-compatible Arnold 5.0.2.1

it usually means you have an older Arnold trying to load something compiled with  a newer Arnold. There’s two common reasons for this happening:

  • The system PATH includes the location of the older Arnold, so the older Arnold is loaded instead of the Arnold version included with the plugin.
  • The plugin install is messed up, and has the wrong Arnold version in it.

 

Tracking down the “error initialzing CLM (9)”

$
0
0

It’s not rocket science, but here’s a little application of the scientific method to technical support.

Observation

The Autodesk licensing system loads AdlmIntRes.xml

I used dtruss on macOS and Process Monitor on Windows to see what files are accessed by the licensing system. (On Linux, I would use strace)

On Windows, the file %LOCALAPPDATA%\Autodesk\Logs\AdlmIntRes.xml is loaded.

procmon_adlmintres

On macOS: $TMPVAR/AdlmIntRes.xml:

56944/0x16208b8:  stat64("/var/folders/vb/1d7zhsx97q7_ddz43nccbyj00000gn/T//AdlmIntRes.xml\0", 0x7FFF55D22F00, 0x0) = 0 0
56944/0x16208b8:  stat64("/var/folders/vb/1d7zhsx97q7_ddz43nccbyj00000gn/T//AdlmIntRes.xml\0", 0x7FFF55D22F30, 0x0) = 0 0
56944/0x16208b8:  open_nocancel("/var/folders/vb/1d7zhsx97q7_ddz43nccbyj00000gn/T//AdlmIntRes.xml\0", 0x0, 0x1B6) = 37 0

On Linux: /var/tmp/AdlmIntRes.xml

Hypothesis

Autodesk licensing will fail if there’s a problem with AdlmIntRes.xml

Testing

  • Delete AdlmIntRes.xml
    No problem. The file is recreated
  • Delete the contents of AdlmIntRes.xml and save the file.
    License authorization fails with the error [clm] error initialzing CLM (9)

[MtoA] cross-platform volume file names

$
0
0

The Arnold volume node uses the texture search path, so you don’t have to use an absolute path in the volume filename.

volume_texture_searchpath

So if you need to set up a Maya scene so that the OpenVDB volumes work on any platform, you could put an environment variable in the Texture Search Path

volume_env_var

Just note that support for volume filenames is still a little … rough. You can’t enter an absolute path in the aiVolume Filename box, then enter a texture search path, and expect MtoA to automatically export a relative path. That still needs to be implemented.

For now, here’s what to do:

  • When you first create the volume, load the vdb file and leave the full absolute path in the aiVolume Filename box.
  • Select the grids and set the other volume parameters.
  • Then set the texture search path and strip off the path from the volume file name (leaving just the file name).
  • Now the environment variable will control where Arnold looks for the vdb file.

The Arnold volume node also support environment variables, so you could do this:

volume_env_var_in_filename

But again, once you put the environment variable into the Filename, the path won’t be resolved inside Maya (but it will work when you render).

[MtoA] Error: defaultArnold Driver can’t create file

$
0
0

You’ll get an error like this if your project path has characters like é or ü or Ô in it.

// Error: [driver_exr] defaultArnoldDriver@driver_exr.RGBA: can't create file ".exr": OpenEXR exception: Permission denied. //

// Error: [driver_jpeg] defaultArnoldDriver@driver_jpeg.RGBA: can't create file ".jpg": Unable to open file ".jpg”

// Error: [driver_png] defaultArnoldDriver@driver_png.RGBA: can't create file ".png": Could not open file ".png"

Arnold can’t create the output file, because the special characters mess up the resolution of the output path, which ends up as an empty string.

So with no path provided, the ouput driver tries to write “.jpg” in the current working directory, which is probably something like C:\Program Files\Autodesk\Maya2018.

Use plain text characters for your project folders.

 

[MAXtoA] Rendering XGen in 3ds Max

$
0
0

 

You can export an ASS file from Maya (with the XGen primitives) and then use an Arnold Procedural to load the ASS file into 3ds Max.

You need to add these two folders to the system environment variable Path:
  • C:\Program Files\Autodesk\Maya2018\plug-ins\xgen\bin
  • C:\Program Files\Autodesk\Maya2018\bin

For example, you can copy this:

C:\Program Files\Autodesk\Maya2018\plug-ins\xgen\bin;C:\Program Files\Autodesk\Maya2018\bin;

and paste it at the beginning of the current Path:

windows_sys_env_var

Restart 3ds Max after you do this.

Then add the MtoA procedurals folder to the Plugin Search Path:

maxtoa_plugin_search_path

 

[mtoa] Using dirmap to update paths

$
0
0

How can you update the paths used to load textures, standins, or volumes? Use dirmap.

You can use dirmap to update the paths for the following nodes:

  • aiImage (Image Name)
  • aiStandin (Path)
  • aiVolume (Filename)
  • MayaFile (Image Name)

For example, if I have a scene file that uses Linux paths like /server/assets/textures/noicon.tx, I can do this:

dirmap -en true;
dirmap -m "/server/assets" "D:/Assets/";

After I run that, when I load a scene Maya will replace “/server/assets” with “D:/Assets” in all file paths.

You can test your directory mapping (dirmap) like this:

dirmap -cd "/server/assets/textures/noicon.tx";
// Result: D:/Assets/textures/noicon.tx //

So:

  • Enable dirmap with dirmap -en, and then create a directory mapping with dirmap -m
  • Load a scene and the dirmap is applied.

TIP For batch rendering, you can use a pre-render script to apply dirmap.

BONUS TIP: dirmap does not update a path if the path is valid. dirmap replaces paths that cannot be resolved.

SItoA is open-sourced

$
0
0

First, here’s some Arnold renders of a few old-time Softimage models:

And now, here’s the announcement:

Softimage to Arnold (or SItoA), the Arnold plugin for Autodesk Softimage is being made available to the community under an Apache2.0 open source license at:

https://github.com/Autodesk/sitoa

This repository contains the official SItoA plugin source code. Solid Angle, the company behind the Arnold renderer, and now part of Autodesk, developed the SItoA plugin commercially from 2009 to 2017.

After the Softimage end-of-life announcement in April 2014, Solid Angle committed to continue the development and maintenance of SItoA for at least a year, and then extended this period until July 2017, porting SItoA to the new Arnold 5 API along the way.

Governance
 

Please submit your issues and pull requests on github, the old Trac server will remain available for a while as read-only but we won’t accept any new users.

We will continue to monitor and review pull requests submitted to this repo on a voluntary basis, but will not release official builds any more.

Acknowledgments

Before it was open-sourced, throughout the years, SItoA has been developed by:
  • Luis Armengol
  • Borja Morales
  • Stefano Jannuzzo

With contributions by:

  • Andreas Bystrom
  • Steven Caron
  • Julien Dubuisson
  • Steffen Dunner
  • Michael Heberlein
  • Paul Hudson
  • Halfdan Ingvarsson
  • Vladimir Jankijevic
  • Alan Jones
  • Guillaume Laforge
  • Thomas Mansencal
  • Helge Mathee
  • Eric Mootz
  • Holger Schoenberger
  • Frederic Servant
  • Jules Stevenson

Special thanks to all the users who passionately provided feedback, production assets, bug reports and suggested features during those years.

Viewing all 250 articles
Browse latest View live