vray map: vrayedgestex - francescolegrenzi.com... vray: shaders 663 hidden edges - all 3d software...

5
VRAY: SHADERS 661 VRay Map: VRayEdgesTex INTRODUCTION One of the classic uses of VRayEdgeTex consists of simulating the “wire” effect, similar to the one generated via the activation of the Wire option in the Standard material of 3ds Max. Unfortunately the Wire option of the 3ds Max Standard material is not compatible with VRay. This and other reasons have lead to the creation of VRatEdgeTex. In this case the only measure that needs to be taken is to set Background to white, instead of the default black. In practical terms the VRayEdgeTex map is a texture which allows VRay to recognize edges of geometries and assign a color to them, which can be as thick as one wants. By inserting it in the opacity channel, the edges take on the color of the Diffuse channel, in our case black, instead the remaining parts become transparent. Also, the fact that it is a texture and not an effect like the 3ds Max Standard material means that it can be used in many occasions, granting better flexibility. Figure 5.272 Render made through the Wire option in the Standard material. No light or particular effect has been applied. Figure 5.273 The same result obtained via VRay and its VRayEdgeTex. Also here no light or GI effect has been used.

Upload: truongdang

Post on 02-Feb-2019

230 views

Category:

Documents


1 download

TRANSCRIPT

VRAY: SHADERS 661

VRay Map: VRayEdgesTex

INTRODUCTION One of the classic uses of VRayEdgeTex consists of simulating the “wire” effect, similar to the one generated via the activation of the Wire option in the Standard material of 3ds Max.

Unfortunately the Wire option of the 3ds Max Standard material is not compatible with VRay. This and other reasons have lead to the creation of VRatEdgeTex.

In this case the only measure that needs to be taken is to set Background to white, instead of the default black. In practical terms the VRayEdgeTex map is a texture which allows VRay to recognize edges of geometries and assign a color to them, which can be as thick as one wants. By inserting it in the opacity channel, the edges take on the color of the Diffuse channel, in our case black, instead the remaining parts become transparent. Also, the fact that it is a texture and not an effect like the 3ds Max Standard material means that it can be used in many occasions, granting better flexibility.

■ Figure 5.272 Render made through the Wire option in the Standard material. No light or particular effect has been applied.

■ Figure 5.273 The same result obtained via VRay and its VRayEdgeTex. Also here no light or GI effect has been used.

662 VRay - THE COMPLETE GUIDE

If one uses it as a map in the Diffuse channel one can obtain wireframe renders, but only in shade mode.

Here the map colors the edges and leaves the chore of determining the color of the mesh to the RGB value set in the Color Switch in the Diffuse channel. In other words, thanks to this map one can create a sort of “wireframe cage” which is placed over the original mesh, which can be independently texturized with a color or texture, regardless of the cage.

PARAMETERS The VRayEdgeTex is a very simple parametric map with not many options.

Color - this Color Swatch allows one to decide the color of the edges generate by the map.

■ Figure 5.274 The VRayEdgeMap used as a map for the Diffuse channel.

■ Figure 5.275 The VRayEdgeTex map.

■ Figure 5.276 Different colors in the wireframe grid.

VRAY: SHADERS 663

Hidden edges - all 3D software programs use triangles as basic building blocks. Although visually one can obtain polygons with more sides called n-gons, the 3D program elaborates geometries using triangles.

3ds Max allows one to model via polygons with a big number of sides. One can observe the triangulation of the mesh anyway, by activating the Edit Tri option for Editable Poly.

By activating the Hidden edges option one can render hidden edges as well as visible ones.

■ Figure 5.277 The basic figures in Computer Graphics.

■ Figure 5.278 Visualization of hidden edges. These edges are represented with a dotted line.

■ Figure 5.279 Rendering hidden edges.

664 VRay - THE COMPLETE GUIDE

Word units - this parameter is for deciding how thick edges should be, using the measuring unit in the 3D file.

Pixels - this parameter lets one decide thickness measured in Pixels.

At a first glimpse it may seem as if these options give the same result, the only difference being the way the edge thickness is calculated. There is however a peculiarity. In the first case the unit of measurement is referred to the model, in other words via real units. So by increasing or decreasing output resolution, thickness of edges remains unaltered. Vice versa, if we use the Pixels unit, by increasing the resolution, the number of pixels which makes up the thickness of edges must be the same at all times. So thickness decreases in relation to the geometry. On the contrary, if we lower the resolution, as the number of pixels defining the edges is constant, the grid has a greater thickness. Also by using the Pixels unit, edges have the same thickness regardless of how far way they are from the camera. Instead with the World unit, if edges are close to the point of view they are thicker. When further away from the observer they are thinner. In the following image one can see how thickness does not change when resolution is changed, when using the World unit. Instead we can see how thickness changes in relation to resolution when using the Pixels unit. This is because VRay must maintain the same amount of pixels for defining the wireframe, regardless of the resolution of the calculation.

■ Figure 5.280 Variable thickness of edges in relation to the World unit.

■ Figure 5.281 Variable thickness of edges in relation to the Pixel unit.

VRAY: SHADERS 665

So far the VRayEdgeTex has been used for a wireframe effect, identical to that obtained with the Wire option in the Standard material. We have also seen how it can be used in shade mode, where the frame is placed over the color set in the Diffuse channel. It is also possible to create materials and effects which are more complex. In order to do this we can make use of the Mix material in 3ds Max. The base material has been defined with a rock Bitmap which we can mix with the VRayEdgeTex1. At this point we define the blending mode. With the Mix Amount spinner we can only define the mixing percentage, so 50% Wire or 50% texture. The aim of this exercise is instead to use 100% of each map. For this reason another VRayEdgeTex2 has been used. Now it is possible to tell 3ds Max which parts of the model to render with the Bitmap and which to render with the VRayEdgeTex1.

■ Figure 5.282 Demonstration of the variation of edge thickness when varying the rendering resolution.

■ Figure 5.283 Simultaneous use of a Bitmap and the VRayEdgeTex map.