Community
Arnold for 3ds Max
Rendering with Arnold in 3ds Max using the MaxtoA plug-in.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Drive aiSwitch Index via ObjectID

10 REPLIES 10
SOLVED
Reply
Message 1 of 11
Brent_Le_Blanc
1509 Views, 10 Replies

Drive aiSwitch Index via ObjectID

I've been trying to figure out a way to drive my aiSwitch index by ObjectID or some other procedural way of adding a few variations to randomly populate a scene.

I've tried to use an aiUserDataInt, but I'm not really sure what the formula for ObjectID is.

Any thoughts?

Tags (1)
Labels (1)
10 REPLIES 10
Message 2 of 11
madsd
in reply to: Brent_Le_Blanc

It's very easy, take a look at a construct I just made.
You use the range node to weight and control which of the index nodes gets introduced into the random shuffle, as well as probability.
I also recorded a video going through all the nodes, bare in mind this is 3ds max but you do the exact same thing in Maya, the UI is just a bit different, the outcome will be identical.

Link to Instuction video here:

https://www.dropbox.com/s/7treq9zfwkbyisi/2018-04-16%2007-37-17.mp4?dl=0

1352-2018-04-16-07-42-51.jpg

Message 3 of 11

@Mads Drøschler Perfect! This is exactly what I was looking for.

Thank you Mads!

Message 4 of 11
Anonymous
in reply to: Brent_Le_Blanc

What are the purpose of using UserDataColor, since you can assign directly the color in aiSwitchRgba?

Message 5 of 11
madsd
in reply to: Brent_Le_Blanc

They only serve as example nodes in the video. You can plug anything in there you want. Bitmaps, procedurals, so the 5 nodes can be "whatever" ( leafs ) - with leafs you can also introduce the Jitter map and not only have 5 different types of leafs but also random saturation or hue, or anything else. You can also ignore the jitter node, and just use the Random exit point and pipe it to a new Range node and into a Color Correct nodes, Saturation/Hue/whatever - The range node in this case, will tighten the bandwidth up in dispersion of the random color tweak.

Message 6 of 11
Anonymous
in reply to: Brent_Le_Blanc

ah ok
I asked because I was expecting to see an attribute "mtoa_constant_..." for the objects with "UserData"
like feeding multi textures or driving multi bump map with only one shader to several objects.
anyway nice video, I really like your effort

Message 7 of 11
madsd
in reply to: Brent_Le_Blanc

Here is an expanded version, just copy the wires to Maya and you have, random saturation and random rotation in same setup along with random distribution.

All bound to the Random Seed, so pushing a new seed, randomizes all 3 parameters automaticly.

1356-2018-04-16-16-59-25.jpg

Message 8 of 11
Anonymous
in reply to: Brent_Le_Blanc

Thank you
But I misspoke or You did not understand me, because of my bad English, I already did that a year ago in FB.
what I'm trying to say is whenever UserData exist in the scene, must have the corresponding added attribute mtoa_constant_....

Message 9 of 11
madsd
in reply to: Anonymous

The updated noodle was for Brent.

Message 10 of 11

@Mads Drøschler

https://vimeo.com/265891657

Hey Mads, thanks for the help! Here is my tutorial with your suggestion in action. Gave a shout out in the video 😄

Message 11 of 11
madsd
in reply to: Brent_Le_Blanc

Looks good.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report