In my mind you should set the mapping in Rhino, not in V-Ray. The rendered viewport mode is used more or less for that. We do our best to match that mapping with the renderer. This gives you a single source of truth.
Right, the user could manual apply a box mapping at size 10, but perfect would be if the V-Ray texture transformations parameters and the triplanar settings could be translated to box mapping options for viewport use. So, the V-Ray triplanar mapping could be approximated at the rendered viewport.
LinkedIn and 3rd parties use essential and non-essential cookies to provide, secure, analyze and improve our Services, and to show you relevant ads (including professional and job ads) on and off LinkedIn. Learn more in our Cookie Policy.
- [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.
Create your materials, in this example a grass and a road material, then plug them into a vray blend material and use either a vray distance tex or a shape map to blend between them. That way you can use geometry (that you should make not renderable) or splines to define areas where you want the road to be.
For more variation (but with higher render times) you could even create another blend material to plug into first blend material replacing the grass. Then you put the grass into the newly created blend material and create a rock material. Then you can use a vray triplanar map with for examples the sides being white and the top black, to make it so that the grass is visible on "flat" parts of the terrain geometry, and rocks on the vertical parts. For more control over how that blending works, you could replace the vray triplanar map with a falloff that is set to Perpendicular/Parallel and the world axis. Then you can control how sharp the blending will be and where it will take place by altering the output/curves of the falloff.
If you need even more complex materials, all the "regular" materials here can be "layered", as in replaced by different vray blending materials where you create two or more variations of each material and blend them with different noises or falloffs and whatnot.
You can have a large tileable texture as a base, but then add geometry in top, such mega scans then scatter some rocks or patches of dirt or grass in top, then another layer of vegetation then large elements like trees stumps or large rocks and so on and so for. In the end, you will never see the large tileable base texture it all will blend.
I expect it would be cool to add the ability to specify several materials for the scatter. So that it randomly assigns them to distributed objects. Not assigning geometry but only changing the material of the component.
randomly replaces the default material in the component by a selected set of colors (thus getting rid of the mat id issue as per in vray, 3dsmax, maya, etc.) that you define in a specific skatter parameter or
randomly replaces a material with a specific UV defined (like textured material, which implies correct UV mapping / UV wrapping) by another set of textured materials, also defined by a specific skatter window
ScriptSpot is a diverse online community of artists and developers who come together to find and share scripts that empower their creativity with 3ds Max. Our users come from all parts of the world and work in everything from visual effects to gaming, architecture, students or hobbyists.
Hi. I really like your script. I use it a lot. I have a suggestion, if it is possible of course. Can you make an option to be able to assign all maps at once Corona UVW Randomizer map and link between the main parameters to change in one map and the other. Thank you.
The reflection is set to sRgb/gamma 2.2/inverse gamma .45, because I read on multiple places it is the proper way. The reflection channel colors the object, just like the diffuse channel does and since in most cases images are created in sRgb color space, then those are the color values we want to use for tinting the color of the reflection. Basically, if the color of a texture is used for what it 'looks like' to our eyes, you want to set it to sRGB. The same goes for emmissive and translucency channels.
The default ior is from Corona default, which is also closer to what Allegorithmic discribes as the most common ior for materials and what other renders use as a default. Vray's 1.6 seems to be an outlier in that regard. Differences are minimal however.
first of all great script and a huge time saver...was looking for a script like this for some time for megascans, poliigon and RDT. So this was an instant buy for me :)
There is only one thing i think should be changed. The input gamma value for the reflection maps should also be 1.0.
At least for proper usage of the poliigon, megascans and RDT materials. May be you could add an additional row next to strength, to manually change the inverse gamma value in the vrayhdri loader or make some sort of a presets system, so one could customize these settings. Also why is the iOR value always default to 1,52 ?
Changes: Texture baking (in fstorm camera render settings). 3ds max 2021 support. Improved tonemapping. White balance picker. Scene compilation speedup. Improved reflections/refractions brdf. Glossy anisotropy. FStorm gradient texture viewport preview. Hard/soft glossy option. Auto instance option. Improved scratches texture.
Bug fixes: Distance texture crash. Gpu crash with low max depth. Incorrect result with refraction roughness option. Incorrect highlights with 1.0 glossy. Broken instance option. Auto instance crash. Incorrect shadows pass.