Quantcast
Channel: ArnoldRenderer – Arnold Support Corner
Viewing all 140 articles
Browse latest View live

[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.

 

[mtoa] Running a silent install

$
0
0

On Windows, run the MtoA installer with the flags /S /FORCE_UNINSTALL=1

MtoA-2.0.2.2-2018.exe /S /FORCE_UNINSTALL=1

You can use /D to specify a different install location.

On Linux, use the – – silent command line flags. Note the space between “- -” and “silent”.

sudo sh MtoA-2.0.1.1-linux-2017.run -- silent

The Linux installer will put MtoA in /opt/solidangle/mtoa/<maya version>. If you want to install in a different location, you can extract MtoA, and then set up your own script for installing MtoA.

On OSX, use the installer command:

sudo installer -pkg "MtoA-2.0.2.4-darwin-2017.pgk" -target /

Note that -target is a volume, not a folder.

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

$
0
0

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.

 

Using oiiotool and maketx to create a mipmap debug texture

$
0
0

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

 

Maya standins with Softimage ass files

$
0
0

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.

[OSX] Getting Arnold logs for batch renders

$
0
0

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

Arnold light_groups and shadow_groups

$
0
0

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


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.

 

[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

 

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.


Using an operator to override parameters in an ass file

$
0
0

Arnold 5.1 adds operators, which among other things, allow you to override parameters in ass files loaded by procedural nodes.

Here’s a quick example using the brand new MtoA 3.0

I exported some particles from Softimage, loaded them into Maya with an aiStandin (aka an Arnold procedural), and then used a set_parameter operator to scale the radius by 0.5

Note that I connect my operator by setting the Target Operator in the Render Settings.
set_parameter_radius
I can chain two set_parameter operators together, to set the mode and then scale the radius:
set_parameter_mode_radius

kicking ass with debug shading

$
0
0

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)

 

Debug shading kick flags
Basic: disable all shaders in the scene, switching to a gray ‘ndoteye’ shader; a very fast shading mode.
kick -is

or

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

or

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

backdoor Arnold: setting visibility

$
0
0

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 visibility parameter.

For example, if an object is visible to the camera (primary visibility), and to transmission (both diffuse and specular), then that’s visibility 13.

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 typeDecimal Value
Camera (Primary Visibility)1
Shadow (Casts Shadows)2
Diffuse transmission4
Specular transmission8
Volume16
Diffuse reflection32
Specular reflection64
SSS (subsurface)128

ERROR | [aov] more than one output statement was associated with single layer driver: defaultArnoldDriver@driver_png.RGBA

$
0
0

This error means that you are trying to render multiple AOVs into a single file, and the file format (PNG in this example) does not support that.

JPEG, PNG, and TIFF cannot have multiple AOVs in a single file. The AOVs have to be rendered in separate files.

If you get this error, check the Common tab. If you don’t see the <RenderPass> token, then you’re going to get the “more than one output statement was associated with single layer driver” error.

For JPEG, PNG, and TIFF, you need the <RenderPass> token:

Normally, MtoA will automatically add the <RenderPass> token for you. But sometimes Merge AOVs gets enabled for EXRs, and then the Image format is changed to another format, like PNG.

So just switch back to EXR and disable Merge AOVs. Then switch back to the other image format.

ShadingGroup has no surfaceShader input

$
0
0

If you see this warning when you render

Warning: [mtoa] [translator polymesh] ShadingGroup exampleSG has no surfaceShader input

it’s because a shadingEngine node either has nothing connected to the surfaceShader port, or (more likely) it has an unknown node plugged into surfaceShader.

For example, if you load a scene that was set up with a different renderer, and that renderer is not loaded, then you’ll get some “ShadingGroup has no surfaceShader input” warnings.

Viewing all 140 articles
Browse latest View live