Blender to Arnold Export - Part III: Base Color

Jan Walter June 20, 2023 [DCC] #blender #arnold

The last part (Blender to Arnold Export - Part II: Cameras) talked about exporting the geometry from Blender to Arnold, but ignoring shaders, because we didn't define them for Arnold, nor did we have lights to illuminate the scene. Now I wanted to see at least some colors:

Arnold rendering with the utility shader

On the left you see Blender's Material Preview in Blender's 3D Viewport and on the right Arnold's rendered image, after exporting some utility shaders. We use only the color of the shader, by getting a value from Blender and exporting it to the utility shader. Here an example:

$ grep 'Material.181' blender_35_splash_nicole_morena_shaders.ass -A 2 -B 2
utility
{
 name Material.181
 color 0.375748932 0.244087651 0.167510375
}

More information about the utility shader and it's parameters:

$ /usr/local/Arnold/bin/kick -info utility
node:         utility
type:         shader
output:       RGB
parameters:   8
multioutputs: 0
filename:     <built-in>
version:      7.2.2.0

Type          Name                              Default
------------  --------------------------------  --------------------------------
ENUM          color_mode                        color
ENUM          shade_mode                        ndoteye
ENUM          overlay_mode                      none
RGB           color                             1, 1, 1
FLOAT         ao_distance                       100
FLOAT         roughness                         0.2
VECTOR        normal                            0, 0, 0
STRING        name                              

The default values for color_mode and shade_mode work fine for our purpose, because ndoteye allows us to render without lights.

I splitted the output files into two files, by providing some new options to the blender/io_scene_ass files, responsible for the Arnold .ass file export.

Additional options to export am .ass file for shaders

The first option use_shader_file will create an additional file (named *_shaders.ass), whereas the second option use_shader_file_only allows omitting the main .ass file, which can be useful, once you exported the geometry (which can be a huge file and take some time to export).

Anyway, how do you render those two .ass files with Arnold from the command line? It's pretty simple, you just mention those files in the right order, e.g.:

$ kick blender_35_splash_nicole_morena_shaders.ass blender_35_splash_nicole_morena.ass ...

I didn't print the additional options I used for rendering, but you can always ask Arnold for help, by calling kick -h.