question

Morning FX avatar image
Morning FX asked ·

How Do I Actually Assign Standard Surface Shader To XGen Collection?

Hey All,

I am trying to follow the mtoa docs on adding color to Xgen primitive archives by using ptex or file texture maps. I am struggling to actually assign the standard surface to the collection.

While I have managed to go through the tutorial as well as the one about , I still am unable to achieve the effect, but I believe it is because I am probably assigning the mat improperly. What I did was select the Xgen Collection folder item in Outliner, then Assign New Material and click aiStandard Surface, but it does not seem to "connect".

The effect if done correctly, should result in grass with multiple color variations, driven by an underlying texture map.

Please help, I've been stuck on this for a few days now!

How do I get an arnold shader assigned to an xgen collection?


Version:

Maya 2020

MtoA 4.0.0

Arnold Core 6.0.0.0

mtoastandard surface
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.

Morning FX avatar image
Morning FX answered ·

Hi Lee Griggs thanks for replying! I followed the docs page:

https://docs.arnoldrenderer.com/display/A5AFMUG/Assigning+Color+to+Primitive+Archives

After trying for a while, your reply made me look at the problem with a new perspective, it clicked!

I actually did get the effect to work, but not exactly as described in the docs page. I think anyone trying this for the first time as well may have a stumble and be interested in the answer so I will detail what I did here.

Answer:

I used the Xgen Archive's material that was created with the archive when it was exported, instead of connecting a new Arnold standard surface shader to the Xgen collection. The original shader that comes with the archive file is also an Arnold standard surface.

I did not manage to get a new Arnold standard surface shader connected to the Xgen collection, or any of its child objects in the Outliner. I simply used the existing material made with the Xgen archive when it was exported.
Explanation:
By changing the base color of the Xgen archive material, I noticed the grass changed color in the viewport, and in the render. With this working, I followed the docs page mentioned above. I connected the aiuserdatacolor node to the gamma correct with a value of 0.454, then to the base color of the xgen archive material. I added the color attribute to the Xgen custom shader parameter, and connected a new map. For the test I made a ptex texture map, hit the small save icon initially, then the 3dpaint icon, saved every change, while I painted a rainbow to test. It worked!

Additionally, I had to add "name, name, names" to the Xgen Collection Attributes Xg File Name, Xg base File, and Xg Delta Files. For whatever reason, I have to do that to get the xgen assets to render, otherwise only the geo the xgen assets scatter on renders.

I hope this helps in the future. The docs may be a bit outdated, or simply using a technique that I could not figure out how to get working, but this slight detour from the docs did get it to work.

Screenshots:

Rendered Xgen grass with ptex texture colors.

Xgen Archive original used material network.

"name, name, names" added to the attributes of the Xgen Collection.


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.

Lee Griggs avatar image
Lee Griggs answered ·

Which tutorial?

https://docs.arnoldrenderer.com/display/A5AFMUG/Creating+Grass+with+Splines

https://docs.arnoldrenderer.com/display/A5AFMUG/Assigning+Color+to+Primitive+Archives

Either way, try assigning it from the Hypershade window instead.

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.

Thanks for replying so quickly! This really solved a headache I'd had with Xgen, it's a long story. Something about your reply made me look at the problem a different way for some reason.

1 Like 1 · ·

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.