From the course: 3ds Max: Tips, Tricks and Techniques

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Shading per object with OSL Random by Index

Shading per object with OSL Random by Index - 3ds Max Tutorial

From the course: 3ds Max: Tips, Tricks and Techniques

Shading per object with OSL Random by Index

- [Instructor] Open Shading Language provides an easy way to assign random maps or materials to objects in the scene. This relies upon a property of the object called its node handle. That's simply a number that's assigned to each object when it's created. We can find the node handle ID number of any object using MAXScript. I'll do that just to illustrate what the node handle is. I've got a scene here with some polyhedral objects and if we select one of them, we'll see that they're all named Hedra and then a three-digit number. In the MAXScript mini listener, the pink area down here we want to enter in a piece of code. I'll zoom in on that so we can see that better. And to find the node handle of a particular object we just enter in this string of code, ID, equals, dollar sign and then the object name and this is Hedra 008 and then a dot and handle. And then press the Enter key and that tells us that Hedra 008 has the ID number of 100. All right, so we're going to use that information…

Contents