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.

Using the if… else conditional statement in OSL

Using the if… else conditional statement in OSL - 3ds Max Tutorial

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

Using the if… else conditional statement in OSL

- [Instructor] Over the past few weeks, we've been building up our Simplex Noise Pattern Generator, and we've got pretty far. Most of the attributes or parameters are doing what we want, but currently we still have the issue of the overall brightness being determined by the number of iterations. As we bring the iterations up or down, we can see how the noise pattern is being added to underlying layers. If we bring it down to number of iterations of one, and set the output amplitude to the value of one, we get the full range from zero to one. And then if we increase the number of iterations we start to see overexposure because the values are exceeding one. We're going to now enable the Normalize switch down here in our code, so let's go over to the editor. The first thing I want to do is actually just a little bit of housekeeping. The base wavelength we determined looked pretty good in this swatch with a value of ten, so I'll make that the new default, or initial value. Float…

Contents