Access Point ID from a MASH network to control variation similar to Object ID

Access Point ID from a MASH network to control variation similar to Object ID

Brent_Le_Blanc
Not applicable
3,899 Views
7 Replies
Message 1 of 8

Access Point ID from a MASH network to control variation similar to Object ID

Brent_Le_Blanc
Not applicable

So, I'm trying to randomize some leaves within a MASH network. However, none of my Object ID variation functions while the MASH network is active, because its counted as a single mesh.

I have to destructively freeze MASH network and Separate meshes into single leaves.

Ideally, I want to keep the MASH network live while the variation is working.

I want to take Point ID and drive my variation similar to how I can drive it with Object ID.

1387-leaves-random.png

I was reading this:

1388-shaderglobals.png

Kind of unaware on how to apply this. I'm very new to python scripting, but it seems I may need to use a script because my utility nodes do not provide Point ID.

Any help would be awesome!

Thank you!!

0 Likes
Accepted solutions (1)
3,900 Views
7 Replies
Replies (7)
Message 2 of 8

brian_Foley
Advocate
Advocate

Are you not able to do this with a Mash_ID node or a Mash_Color node set to ID?

0 Likes
Message 3 of 8

Brent_Le_Blanc
Not applicable

Is there a way to pipe in the Mash_ID node values into the hypershade? I'd like to pipe it in where I have leaf_ID currently.

1389-objectid-leaf.png

Which is just a aiUtility node like shown below:

1390-objectidutility.png

0 Likes
Message 4 of 8

brian_Foley
Advocate
Advocate
Accepted solution

Object ID is not going to work well with Mash unless you use the breakout node.

I got this working 2 ways.

You can change your mash type to instancer and change your aiUtility from Object ID to Object. It is a little sluggish in IPR and render updates.

1405-objectmode.jpg

If you need to keep it as Mesh then you can get color variations using your shader by adding a color node in your mash network and then use that information to drive the AiRange. This is a lighter setup but you may need to add a remap value node to even out the distribution.

1400-hypershade2.jpg

1406-leafss.jpg

Hope this helps.

0 Likes
Message 5 of 8

Brent_Le_Blanc
Not applicable

Awesome! This is what I am looking for.

Thank you!

I'll be sure to give credit once my implementation is complete.

0 Likes
Message 6 of 8

Brent_Le_Blanc
Not applicable

@BrianFoley

Thanks Brian! Here is your suggestions in action in my latest tutorial.

Cheers!

https://vimeo.com/267041956

0 Likes
Message 7 of 8

NandoStille
Advocate
Advocate

But the "object" mode of aiUtility does not equal point Id, does it?

What if I am instancing one or more groups of objects instead of just single objects?

Why don't we have Arnold Export options (as on particleShapes) on the MASH network?

Or did I miss it?

0 Likes
Message 8 of 8

brian_Foley
Advocate
Advocate

If your Mash network is instanced then the object mode of aiUtliity will give you point Id even with multiple objects. It should work exactly the same as it does outside of the network.

0 Likes