Rhino3d - V-Ray for Rhino, Textures and Decals - Video Transcript

Rhino3d Video Tutorials Transcripts - To further support you as you learn and progress with Rhino we've transcribed each of our video tutorials. 


Return to V-Ray for Rhino, Textures and Decals Video

Rhino3d V-Ray Support Video - Screenshot


Hi, I’m Phil Cook from Simply Rhino and in this video we’re going to take a look at creating simple textures in V-Ray for Rhino. Then we’re going to look at how to map and control these textures which is primarily controlled from within Rhino and then we’re going to take a look at creating decals in V-Ray for Rhino.

Let’s first of all take a look at how we can apply a simple texture to a V-Ray material inside a V-Ray for Rhino.

The texture that we’re going to work with is this PNG image created in Photoshop and we are going to incorporate this in to both of the standard material types for V-Ray for Rhino.

First of all I’m going to open up the V-Ray material editor and I’m going to look at how we apply a texture to a standard material. I’m going to expand the standard material and go to the diffuse layer. Next to the colour slot in the diffuse layer, you’ll see there’s an M symbol. When we click on the M symbol, and then choose text bitmap. We can then navigate to our PNG image that we want to use. We can open up this image, we can check in the preview here that this is the correct image and we’ll leave everything else here at default and click OK. As soon as we do this, you’ll see that our image is applied to our surface.

We are not at present using any texture mapping, so the default way in which textures are applied to surfaces in Rhino is called surface or UV mapping. This uses the U and V parameters of the surface to control the size of the texture. If we have a correctly sized untrimmed surface, and the proportions of our texture are identical to this, then we’ll get a one to one match of the texture on to the surface. If we then for example adjust the surface, in this case just by moving the control points, you will see how the texture stretches and deforms with changes to the surface. However, of course, in this case where we have a cylindrical surface that has the correct length and height, then the image will map correctly around the tin.

To look at this, let’s now look at how we create a texture on a V-Ray material. So open up the V-Ray material and in the diffuse section here, click on the M symbol which is a little further along in this dialogue box here, again choose text bitmap and then navigate to our image. Again, we’ll see that the image previews and displays in both the Rhino rendered viewport and the V-Ray RT viewport and you’ll see as we navigate around the can, you’ll see that the texture applies itself correctly all the way around the image.

Let’s now take a look at what happens when we need to move beyond simple UV or surface mapping. The texture I’m going to work with here is this checkerboard texture and I am now going to open up my V-Ray materials. I’ve got a test material in here and in the diffuse layer I’m going to add my texture. So go to the texture editor, apply a bitmap texture, add all the default settings. You’ll see now my material updates and on the square surface here my texture is correct, but of course on the rectangular surface here, the texture is stretched over the entire surface distance. So to get back to a square checkerboard texture on my rectangular surface, I need to employ some texture mapping. So I go in to object properties and texture mapping, and I’m going to choose planer mapping and describe the rectangle that is used to map the texture. And I’m going to type in the length for this and the height for this rectangle and then choose the UV option. You’ll see now that my texture is now mapping correctly. It will take a little while for V-Ray RT to catch up.

Okay so now if I want to look at the mapping from the texture mapping options here, I can choose to show the mapping and this mapping widget here can be used to control the mapping as it appears on this rectangular surface. So for example, I can take the texture mapping widget and I can rotate it and my texture will update and I can move the widget and you’ll see the texture moving here. And of course I can scale this, and if I scale in 2D then my texture will increase or decrease keeping my checkerboard size square.

Rhino’s texture mapping also has some mapping types that use geometric primitives. So we have box mapping, cylindrical mapping and spherical mapping. So let’s take a look first at box mapping. So here we’ve got textures that just have no mapping applied to them, so they’re using the default mapping and I’m going to employ box mapping here and I can choose whether to map via a bounding box or whether to actually draw out the box that defines the size of the map. Once I’ve drawn out the box, I can then choose whether the map is capped or not. If it is then the texture will apply on the top and bottom of the box as well as the four sides. Once I’ve achieved the basic mapping here, I can then turn on the texture mapping widget and scale, move and rotate this anyhow that I like. In this case, I’m scaling to size up or down the size of the checkerboard texture. When you are scaling or rotating the texture, V-Ray RT won’t update until you actually let go of the texture editor and V-Ray RT will then update. So while you’re actually moving, nothing happens in RT. Finish the movement and the RT texture updates.

One last thing about the mapping widget is that if you want to hide it, it’s best to do this from the texture panel here inside of Rhino rather than using the hide command.

Now let’s have a look at the cylindrical mapping. Again, this is very similar to applying the box mapping; we just choose the cylindrical option here, specify the base of the cylinder and then drag out the height. We can choose whether the object is capped or not, I’ll say no this time and the texture applies around the size of the cylinder but not on to the top and bottom.

So there are a lot of objects that approximate the primitives where the primitive mapping will do a pretty good job. So if you’ve got for example a box with slightly radiused corners, then most of the time you’ll probably be able to get away with box mapping. There are many examples however, where a particular shape won’t lend itself well to any of the standard mapping schemes. So let’s have a look at this example here where we have a fairly large blend or fill it on a corner. And let’s go in to our material and apply our texture.

Okay, so what we’ll see here is that when we use the default mapping, that the texture actually has a mismatch over the seams on the polysurface where we transition from the planer surface to the fillet and if we maybe try to employ some mapping on this, let’s look at for example box mapping here, this will give us a partial solution here where the texture sort of fits a bit better. But we have a problem essentially around where the notional corner of the box is. If we turn on the mapping widget here, we’ll see that where that notional corner of the box is, we get this disruption to the texture and you’ll see that if I for example rotate this in 3D, you’ll see that as we rotate the mapping widget here, we’ll see that corner keeps causing the disruption on the texture. And whatever mapping type we try here, we’re not going to end up with a good solution. So let’s delete the mapping from here and let’s look at an appropriate solution for this and that is, that without breaking this up in to individual constituent surfaces, we can use what’s called the UV unwrapper to actually unwrap the texture.

So I’m just going to go in to my layers and I’m going to turn off the ground plane here, just so we can see what’s happening a little better and I’m going to select my polysurface here, go to properties and we’re going to unwrap this. And when I do this, I’m asked to select the seams that I want to unwrap. So I’m going to select these two seams here, so I can map effectively the curved portion and the two planer portions separately. Enter to accept that and I now get the result in the command line, telling me to use the UV editor to make changes.

So with this object still selected I can now pick the UV editor from the Rhino panel over here and what I had beforehand here was I drew a square that was the same proportions as the actual texture image that we’re using here. I’m going to snap my UV editor to that. Now when we’re using V-Ray materials, we won’t see the material preview inside of the UV editor. So what we need to do, is rather than using a material, is to use a texture and what we can do is to create a new texture in here. Choose bitmap texture and use the same texture that we’re using for the material. This now then appears in the texture editor.

We can vary the transparency of this and what you’ll see here is we have the three separate render mesh areas that are creating the texture on here and I can adjust these individually to match up to the texture. So let’s have a go at doing this. So I’m going to pick this portion first of all which is the lower portion and I’m going to use my move tool, snap to the vertex of this. Snap this in to the corner, get my map here and use a 2D scale to scale out that mesh. You’ll see that now fits the lower portion of the polysurface correctly.

Now I can just temporarily lock this mesh so I don’t select that inadvertently and I’m now going to look at the middle section here and going to rotate this. Again position this on to the texture. When you’re editing these meshes here, you can use any of the scale or transform tools. So you can even turn on the points for the meshes and adjust the outer dimensions of the mesh if you want to. Here, we’re just doing straightforward scaling. So I’m going to scale this one, also by 2D initially. Snap very carefully here and the bottom of this texture is now correct. But you’ll see that we’ve got a little area here where the texture isn’t quite filling up the curved portion here because the total length of this curved surface here is slightly different to the developed map. So all I need to do here is to do a 1D scale of this map, up to here and now my texture runs all the way around the curved portion. Again, pick a map and I’ll just choose to lock this and then take the final part of the map here, move this again up to an appropriate corner and scale, 2D. That pretty much should get the texture mapping correctly.

So next we can unlock the meshes, switch to use material and apply. Our texture is now applied. Turn on the ground plane again and just do a V-Ray RT with this view and you’ll see that our texture now maps correctly.

So the unwrapper can be used for doing simple unwraps like this or you could do some quite complex mapping by using the UV unwrapper. This is another wrapper of a shape that doesn’t lend itself well to the standard mapping routines. These changes of angle here are causing us some problems. Now we could try using a cylindrical map here, creating the base of this cylinder here and pulling out the length of the cylinder and saying we don’t want to cap this but we’ll have some issues here with the texture stretching as it comes over this are. If we remove this mapping and map with a cylindrical map with a cap, then we’re going to see the texture changing here. So we could of course use the UV unwrapper on this object, but it might take us quite a while to get to an appropriate solution. So there is an alternative to this and that is, that we can make essentially a simplified version of the shape from a single surface. So I just took a curve here and revolved it to create a very simple surface. We then apply the same material to a simplified version of the surface, just using the default surface mapping and you’ll see now how this transitions quite smoothly across the ends of this surface.

What we can do now is pick our original complex object and we can use this tool here which is called Custom Mapping and we pick an object which is going to control the mapping of our more complex object. Once you’ve picked the object here don’t enter, just wait for the texture manager to do its work. It takes a little while for this to complete and when it does you’ll be able to manipulate the view. We can then hide the simplified object and you’ll see our texture is now created. Again, it may take a while for this texture to update, so just be a little patient for this to update and you’ll also see that when we do an RT render of this, we’ll have the correct mapping. So this is a quick way to use a simple object to drive the mapping of a more complex object.

So let’s take a look at how we can create a material in V-Ray for Rhino that has two separate texture maps and effectively simulates a screen or pad printed logo on to a base material.

I’ve got both V-Ray RT and Rhino rendered viewports open here and when we come to place and scale the text and logo in our material, it’s very often easier to do this in the Rhino rendered viewport. However there are a couple of issues with the way V-Ray materials are previewed inside of Rhino and so it’s a good idea to have a V-Ray RT window open as well to check that the result looks correct.

So here we’ve got out container and if I go in to our V-Ray material editor, you’ll see that we just have a basic orange plastic material. So to create first of all the textures that are going to be applied to the lid of the container, I’m going to duplicate the orange plastic material and I’m going to rename this material and I’m going to call it, orange plastic lid. Now when you name the materials in V-Ray for Rhino, it’s a good idea to use this idea of an underscore between the individual words in the name. This will mean that when you come to use, for example, these search facilities inside of Rhino to search for the materials by name, we can actually specify the full name of the material.

So now we can go about adding the text and the logo to our orange plastic lid material. These are going to be added as two new separate diffused layers within the material and the textures I am going to use are both PNG images that have been created in Photoshop and we’re going to start off with the text and then come on to the logo. You’ll see that these PNG images have got transparent backgrounds.

So I’m going to open up the material and I’m going to first of all just rename the existing diffused layer and I’m just going to call this orange. This is to help me understand the various different layers in the material as we start to build up the layers. I’m then going to create a new diffuse layer and I’m going to rename this layer and call it decal_text, and I’m going to move decal_text up in the layer stack so that it sits above the orange diffuse layer and if we were to preview the material, you’ll see it now looks grey because this is the upper of the two layers.

So I’m going to actually apply the material to the lid and you’ll see that we see our first problem with how the material is previewed in the Rhino rendered viewport. Preview is correct in V-Ray RT here, not so in the Rhino rendered viewport. This is because the Rhino rendered viewport, doesn’t really understand the layer order here. So if I swap the layer order back round, you’ll see that the layer order is transposed. It doesn’t affect us too much when we come on to our text but it’s something that you should be aware of. So on the decal_text diffuse layer. I’m going to click on the M symbol next to the colour slot and load in my bitmap. Navigate to the appropriate PNG file, preview to make sure that I’ve got the right file here. You’ll find that PNGs don’t preview particularly well sometimes here and I’m going to accept the default UVW general channel mapping and make sure that the default mapping channel is number one. Accept that and now you’ll see the material starts to preview. Now there is no mapping invoked as yet. We just use Rhino’s default mapping. So the next thing we need to do now is to go in to Rhino’s texture mapping and change the mapping to make the text display correctly. So I’m not going to select the lid, go to properties and texture mapping and apply cylindrical mapping. Now I’m now getting some prompts to define the base of the cylinder, so we’ll just switch to wire frame here. I have a point here which is snapped to the centre of the bottom of the lid which I can define as centre of the base of the cylinder. I can then type in the radius which I know is 35mm and then pull the height of the cylinder up so it’s the same height as the flat area on the perimeter of the lid. Then I can choose no, to say that I don’t want a capped cylindrical texture.

And the texture will preview in V-Ray RT and in the Rhino rendered viewport. Now there are a couple of things that we need to do first of all with the material. If I go back in to the texture of the material, I need to uncheck the tile option in placement and I also need to enable use colour texture as transparency. And you’ll see now that the material previews correctly inside of V-Ray RT. We now don’t have any tiling.

All we need to do now is go back in to the texture mapping and to actually change the rotation from 180 degrees to 0 which will effectively flip the text up the correct way. So our material is previewing correctly in V-Ray RT but what we can see here is that we have an issue with how the material previews in the Rhino rendered viewport and that is that the texture always tiles. So there is a work around we can use here and what we can do is go in to the material in the Rhino material editor. Momentarily, uncheck plug in. Go in to the texture map in the Rhino material and enable the decal option. Then recheck the plug in attributes and now inside of both the Rhino rendered viewport and V-Ray RT, we’ll see the texture mapped correctly just with the one instance rather than the tiled instance of the map.

So next up, let’s take a look at adding the logo to the lid. So once again, I need to create a new diffuse layer in my material and rename the layer and I’ll call this decal_logo and I’ll move this above decal_text in the layer stack. Okay, and on my decal_logo layer, I’m going to add the texture. This time, in UVW general channel I’m going to make sure that the channel number is two rather than the default one, also I’m going to remember to uncheck tile in the image and also use texture colour as transparency. Then I’m going to close off the material editor, pick the lid and open the texture mapping properties. I’m now going to check this check box, use multiple mapping channels and I’m not going to apply planer mapping for my logo.

At the first option of plane option, I’m actually going to use the centre option here, click to the centre of the lid and then I’m going to describe the length and height of the map which is going to be 54mm by 54mm and then choose UV as my option and then I’ll be prompted to choose a mapping channel and I’ll choose two.

So after a little while the texture will appear and you can see now that we see both of the correct textures in the V-Ray RT window. Again we’re going to have the same issue here in times of the Rhino rendered viewport and we can make things a little better in here by going to material, unchecking momentarily the plug in option and using the decal option as we did previously and then making the material a plug in again.

Now because of the way that the Rhino rendered viewport doesn’t quite understand the layer stack in V-Ray for Rhino, we can only really preview one texture at a time, not the multiple textures that we see in V-Ray RT. But this is good enough to actually scale and move the texture.

So thanks for watching and I hope you found this video useful.

Please do check on line for our other V-Ray and Rhino related resources.

  • 3527
  • Last modified on Monday, 06 June 2016 15:54
Request Call Back