From the course: V-Ray 5 for 3ds Max Essential Training

V-Ray Triplanar texture

From the course: V-Ray 5 for 3ds Max Essential Training

Start my 1-month free trial

V-Ray Triplanar texture

- [Narrator] Another important map available in V-Ray these days is the triplanar option that was added in version 3.3 of the engine. To show how this works, we have a sculpted model in our scene, which if I just open up the material browser using the M key, and then jump into the boost tab, we can see has a V-Ray material applied with a wood map plugged into the diffuse slot, which was not the most common material for this type of sculpt, is one that can help us see how the triplanar map can come in very handy at times. Now, the interesting thing about this particular version of our model, is that it has had all of its UVW mapping info removed. And so if I go ahead and render, you can see that all we get is a homogenous color, with none of the wood detail in the map showing up at all, which could be one of the situations we find ourselves in whereby the triplanar map could come in very handy, especially if we have received a model close to a critical deadline, only to find out at the last instant that either no UVW mapping work has been done or perhaps the work has been done so badly or has become so mangled at some point as to make it unusable for a final render. Now, of course, we do have the option in max of just quickly applying either a UVW map or unwrap UVW modifier. And so with our sculpt selected, let's jump into the Modify tab and apply a UVW Map modifier. Of course, the default projection of planar is pretty much useless on a model such as this, even when projected from the cameras point of view. And so let's switch over to box and render. Now if this objects were to be placed on a shelf somewhere in the background overshot, perhaps even being out of focus, then this mapping might be okay. For anything more than that however, the mapping that we see is probably just too messy, and so enter the triplanar map. Coming back to the material editor then, let's do a search for V-Ray tr, and then drag our V-Ray triplanar map from the sorted list onto the work area. To test it out, we will of course need to connect our bitmap texture to the texture input on the triplanar node, and then add the triplanar to the diffuse input on our V-Ray material. With what we see when we render now, having definitely made a difference to the look of the texture. With perhaps the most immediate problem being that the scale of the woodgrain, is now completely different, which isn't surprising seeing as V-Ray is now ignoring the tailing control on the bitmap node itself, and is instead controlling the scaling of the texture by means of the size parameter on the triplanar map, which if we set to about 20, and render again, will give us a similar scale to before, although we can of course alter this to suit. Something else that has happened here is that, with the triplanar map plugged into the material, the UVW map that we assigned in Max is also being completely ignored in favor of the triplanar controls. Just something to keep in mind as it can potentially catch us out if we're not careful. To take a look at how the triplanar controls work, probably the best thing that we can do here is drag out another instance of it. Add three V-Ray color nodes to the mix, and then after setting pure red, green and blue colors for the colors used, plug them into the three texture inputs on the triplanar map and then plug that into the materials diffuse slot. Although we may be surprised when we render to see only a single color showing up on the model, which is happening, because in the triplanar controls, we are currently set to use the same texture for all three axis. If we switch that over to a different texture on each axis, and render though, we can see how things are working with each color clearly being planar projected along the x, y and z axis. So blue is going from front to back, red is going side to side, whilst green is working from top to bottom. Now we do see in the render that we don't have just red, green and blue colors because in the transition areas, we also have cyan, yellow and magenta, which you will probably recognize as being secondary colors in the RGB spectrum. This isn't an accident of course, as the blending that the triplanar map is doing in order to hide the various projection seems, is what is creating this effect. The default blend value of 0.1 produces a fairly small blend area, as you can clearly see, but if we crank this up to the max of one, we get a much broader set of transitions taking place. To finish off then, let's plug our original triplanar map back into the materials diffuse slot, set its blend value to about 0.5 and then take one last render.

Contents