question

Joey Chen avatar image
Joey Chen asked ·

How to define outAlpha connection in materialx

nodes that are defined with output color3 could have an alpha output in maya, e.g MayaFile, how to define outAlpha connection in materialx?

material
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Stephen Blair avatar image
Stephen Blair answered ·

If you connect the alpha output of AiImage, then image.a is connected. For example:

standard_surface
{
 name aiStandardSurface1
 base aiImage1.a
 base_color aiImage1
}


image
{
 name aiImage1
 filename "noicon.pic"
 missing_texture_color 0 0 0 1
}
1 comment Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Okay, I see. And then, is there any way to denote such kind connection in materialx? From what I know, output of AiImage could be color4, maybe I should put a rgba_to_float node in between?

0 Likes 0 · ·
Stephen Blair avatar image
Stephen Blair answered ·

MtoA does not send a MayaFile node to Arnold.

MayaFile is converted to an image node, possibly with other shader nodes (such as color_correction).

file.outAlpha becomes a connection to the "a" channel of the image node output

Your materialx document should use only Arnold nodes.

1 comment Share
10 |600 characters needed characters left characters exceeded

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

My bad, MayaFile is not a good example.

let's say, what if I connect the alpha output of AiImage to a float plug. It seems we can only have fixed type output of a specific node and the output of AiImage is color3, what to do if I use the alpha channel(in MaterialX).

0 Likes 0 · ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 5 attachments (including images) can be used with a maximum of 2.0 MiB each and 9.8 MiB total.

Welcome to the Arnold Answers community.

This is the place for Arnold renderer users everywhere to ask and answer rendering questions, and share knowledge about using Arnold, Arnold plugins, workflows and developing tools with Arnold.

If you are a new user to Arnold Answers, please first check out our FAQ and User Guide for more information.

When posting questions, please be sure to select the appropriate Space for your Arnold plugin and include the plugin version you are using.

Please include images, scene and log files whenever possible as this helps the community answer your questions.

Instructions for generating full verbosity log files are available for MtoA, MaxtoA, C4DtoA, HtoA, KtoA, and Kick.

If you are looking for Arnold Documentation and Support please visit the Arnold Support site.

To try Arnold please visit the Arnold Trial page.

Bottom No panel present for this section.