question

Bill Vasiloglou avatar image
Bill Vasiloglou asked ·

How could I make leaves (one polygon with multiple shells like paintEffect trees-without separate it) , with random diffuse color in Arnold Maya

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

Sachin Shrestha avatar image
Sachin Shrestha answered ·

Random texture can be a bit more involved. You can either unwrap the leaves in a manner that you have one leaf uv per udim tile and simply use leaf textures that are named as per the udim rule. Or you can use some scripts available freely on the internet that unwrap each leaf into square uvs and stack them all beside each other into one uv tile itself. Then you will have to make sure you create a single leaf texture with all the required variations within each uv shell.

Or you can use the same random vertex color to pick up different textures based on the lookdev nodes like colorLogic and colorCondition. You can use these nodes to compare an input color with the random vertex color being picked up the userDataColor node and accordingly map different textures. In the crude example below, I'm randomizing between a checker and ramp texture based on if the userDataColor is greater than a constant input color.

There can be even more involved setups that need a bit of scripting. You could assign custom user data on the converted mesh leaves that's the leaf texture name itself and look this up in a userDataString node. So on and so forth.


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.

Sachin Shrestha avatar image
Sachin Shrestha answered ·

If you are actually using paint effects then the pfx color randomness is converted to a vertex colors using maya's colorSet node. You need to make sure you select the "Color" option for the "Vertex color mode" option in the convert options.

You can check the color set's name by selecting the converted mesh and opening the "Color Set Editor" option under the "Mesh Display" menu. This should show you the color sets connected to the selected mesh. Copy the name from there (usually like colorSet1, colorSet2, etc. )or rename it to one you like, f.e. leavesRandomColor. Apply an arnold shader to the converted geo and on its color attribute connect a user data color node. In the attribute name use the previously copied color set name (f.e. "leavesRandomColor"). On the converted mesh shape node, under the arnold section, make sure the "Export Vertex Colors" option is on. Now when you render, you should get the same color as your random pfx colors. You can control the randomization via your pfx node. You do not need to re-convert as long as you don't delete the history or remove the connection between the pfx brush and the converted mesh.


pfx-random-color.png (498.3 KiB)
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 ·

A quick and easy method would be to connect a Utility shader to a Color Correct shader and use one of the Color Modes to change the colors of the leaves. Below is an example using an oak Paint Effect tree.


tree.jpg (441.1 KiB)
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.

Bill Vasiloglou avatar image
Bill Vasiloglou answered ·

Although I did not expect to be answered (I repeatedly asked) ...

I am speechless ...

For an architectural plan it is very important. Until now I was using the script DjPFXUVs.

Such tips-tricks we need .

It works ..... Bravo and Bravo !!!

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.

龙龙 李 avatar image
龙龙 李 answered ·

What about random texture?

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.

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.