Join Brian Bradley for an in-depth discussion in this video Using string options, part of Up and Running with mental ray in 3ds Max.
One very nice addition to the Mental Ray implementation in 3ds Max in recent years has been the ability to access currently unsupported Mental Ray features from inside the 3ds Max interface by means of string options. To help demonstrate how we can work with these controls, our style scene here has been set up to make use of a daylight system and physical sky environment map for general lighting. Along with the IBL as opposed to Final Gather Skylight mode enabled.
With no GI systems turned on, then, let's take a render in order to see what kind of result we currently are getting from Mental Ray. What we see once the render starts is a pretty straight forward Mental Ray process, with the renderer quickly running through scene translation and then producing an image that clearly contains only direct illumination. What we want to do now, then, is take a look at how we can make use of Mental Ray's string options in order to essentially alter the way that Mental Ray is rendering. To access the string options rollout, we need to open up the Render Setup dialog, and then jump into the Renderer tab itself.
Down at the bottom, we have, as you can see, a Strings Options rollout that consists essentially of a big, blank text field which is where we can enter our strings options. Now, one question we may well be asking at this point is, what exactly are string options? Well, essentially, these are mini text commands that can be used to enable and control features of the Mental Ray and, indeed, Iray, render engines, giving those, in some instances, access to features that are not currently exposed through the 3ds Max UI itself.
One nice aspect of this feature set is that, as of 3ds Max 2014, any string options we enter here are saved with the scene file itself, and so will be there when we reload, which hasn't always been the case. What we are going to do now, then, is enter a set of string options that will give us access to some of those hidden Mental Ray features, specifically the importons and irradiance particles global illumination tools. Now, to see a full list of string options available for both these and other hidden Mental Ray features, we can take a look in the 3ds Max help file, under the Mental Ray string options heading.
Now rather than making you sit and watch as I type out a number of commands here, I'm just going to copy and paste from a text document that I have off to one side of the capture window. What we're doing with this piece of text is telling Mental Ray to first of all turn on the importon system, just as we would with other global illumination options through the 3ds Max UI itself. Next, we're setting the density of importons being projected from the camera. A value of 1 would give us an importon for every pixel of our current render resolution, but in this instance, we're going to make use of a value of 0.3, or 30%, just for the sake of speed.
And then finally, we are enabling the importon tray step setting, which tells the importons how many times we want them to bounce from geometry in the scene. In this instance, a value of 3 should be more than enough to produce a very noticeable end result. We then, of course, follow pretty much the same process for our irradiance particles. So we turn them on, we set the number of rays they cast into the scene, and then we fix the number of indirect passes that we want them to make. This being the number of times that the irradiance particles will sample the environment in order to gather illumination information.
When we hit Render now, we see a few calculation run throughs that are somewhat different to Mental Ray's earlier behavior. And then we eventually start an importon and irradiance particle render, one that clearly shows that GI is now being calculated in the scene, which of course has been enabled and controlled by means of string options. Using these tools, we can also enable a progressive rendering mode for Mental Ray. As well as make use of the GPU to calculate both final gather and ambient occlusion for a scene. Now, whilst clearly not as intuitive to work with as most Mental Ray users in 3ds Max would like, string options have, nevertheless, become a very welcome addition to the Mental Ray feature set made available to us.
Giving us, as they do, the option to work with a number of extra lighting and rendering tools in Mental Ray.
- Setting mental ray as the render engine
- Working with ActiveShade mode
- Using Nvidia's imf_display tool
- Creating a daylight system
- Controlling the mental ray sun and sky
- Using Final Gather and photons, both individually and together
- Working with diffuse, reflective, translucent, and other materials
- Controlling render quality with image sampling
- Working with displacement mapping
- Using proxies