Rhino3d Video Tutorials Transcripts - To further support you as you learn and progress with Rhino we've transcribed each of our video tutorials.
In this video we look at Rhino Block Instances and V-Ray Proxies.
Hi this is Phil Cook from Simply Rhino and in this tutorial video we are going to look at Rhino Block Instances and V-Ray Proxies.
Proxies and Block Instances are extremely useful when we have multiple instances of the same object within a file. They are also very useful when we have large files. In the model that we are going to look at in this video, we have a simple deodorant dispenser of which we have a couple of variants, and these are housed inside a moulded merchandising tray.
So here’s the model inside of Rhino and in this model we’ve just got one instance of the deodorant pack housed in the appropriate position in the tray and you can see that we’ve got a V-Ray RT image going on here and the deodorant pack itself has six individual V-Ray materials.
So first of all by way of a comparison of things we’re going to do later on, I’m going to take the model of the deodorant pack and I’m just going to produce an array of this inside of Rhino and immediately inside of Rhino, you can see that the display slows up a little. Nothing too dramatic because we’ve got quite a decent graphics card in this machine, but you can see that the display isn’t quite as wieldy as it was previously and when we come to render, obviously we’re faced with more polygons and V-Ray or any renderer is going to take a longer time to render the additional polygons. Perhaps the biggest issue though is that when we come to save the file, then our file size is going to increase dramatically. So if I just save this file just to test out this theory, you will see that our file size is going to increase from 9MB to 197MB. So every one of those deodorant packs is contributing its full weight of geometry to the file.
So clearly we need a better way of managing these multiple components, and the first way that we can look at is to use Rhino Block Instances. So first of all there is nothing really special about the component file that we need to use for a Rhino Block Instance, all we need to have is a standard Rhino model, and here we have a model of the deodorant pack with individual elements on their own individual layers and we have V-Ray materials already applied to our object. Depending on how you insert the block instance in to the Rhino assembly model, the position of the model relative to the origin, to 000 in the component Block Instance file, could be important and here you’ll notice that the centre of the base of our deodorant pack is centred around 000. So this is the component that we are going to use to Block. We don’t need to do anything special to this other than save this as a Rhino file.
And now I’m going to open a model of the tray, and this model has the tray with V-Ray material applied to it and we have a dome light and a floor set up in here. So in other words, we have a scene already set up for rendering. So to bring in our deodorant pack as a Block Instance, we go to file and insert and we point to the file. I’m going to choose the black version of the deodorant pack and I’m going to insert as a Block Instance rather than a group or individual objects. At the insertion point dialogue I’m going to choose prompt, and for scale I’m going to choose uniform scale of one, i.e. I don’t want to change the size of the component and I’m going to uncheck the rotation prompt. Click okay and we then get taken to a second scheme and this is where some important things are decided about how we bring in the Block and we have three important choices here. First of all we can choose to embed the geometry. If we do this, there is very little difference between just importing Rhino geometry. We can then choose to embed and link the geometry. This brings in the full weight of one of the instances of the geometry and maintains the link to the component file. So if we were to at a later date, update the deodorant pack, then we would have an option to update to the latest pack inside of our assembly model. And finally we have link. Link is perhaps the most useful and interesting option here, because this just maintains a link to the deodorant pack and doesn’t really bring in any geometry at all, it just brings in a reference. So it’s great for keeping file sizes small. We can also choose up here to read linked Blocks from this file, this means that if our component that we’re bringing in itself has references to other components, then those links will be maintained, and lastly we can choose a layer style here, either active or reference. I’m going to choose active in this instance, and then I can hit okay and the Block will be brought in.
You will see that the cursor, where the Block is located is actually snapped to the origin position on the component file and this gives me a useful way of being able to reference a position that I can snap to. So it makes it easy for me to be able to drop the component into the correct position. You’ll see that the layer names are maintained. So all the individual layers that were in the component file, come in to the assembly model, and if I go to my V-Ray materials, you’ll see that all my materials component are brought in to my model.
Now if I actually want to have more than one Block Instance, I don’t need to go back to the insert dialogue to bring in more Block Instances. I can merely treat this block as if it were Rhino geometry and I can then do my rectangular array. Okay and essentially the blocks behave from the point of view of visualisation and the point of view of seeing the geometry in our model, they behave just like Rhino geometry.
So you can see in the V-Ray RT render now that all the materials that were on the original object have come in with the Block Instance and then as we’ve arrayed that Block Instance around then we’ve got multiple instances of the same object. Now the biggest benefit of blocks in terms of Rhino is really in terms of the file size. Here if we were to save this file, and we’ll overwrite one of the ones that we wrote earlier on, you’ll see that our file size goes from 6MB and really there is just a slight change here, 7.6MB. So by using blocks we have substantially reduced the file size.
The other nice thing about blocks is that we can replace one component with another component. This of course with the caveat that they are referenced about the same position. So for example, if I now wanted to do a visual of the merchandising pack with a slightly different variant of the bottle in it, I can go to my edit menu and blocks, and look at my blocks manager and see here I’ve got my super cool black reference here. This is actually telling me which file is being brought in as a Block Instance and I can go to properties here and I can change the reference for the file. So I’ll use super cool blue now, bring in a blue bodied version of the pack and okay that. Close my block manager, and just have a V-Ray warning here because it wants to overwrite some materials, and then we’ll do another V-Ray RT to check the result. So you can see now that the materials from the second version of the deodorant pack have been imported successfully and so using Blocks is a very efficient way of being able to change either a complete component or part of a component within a larger file.
The downside of using Blocks when it comes to visualisation, is that from the point of view of Rhino’s display pipeline, is that we still have to deal with lots of polygons, and the same is true when we come to render out with V-Ray, because V-Ray still needs to render out each of the individual polygons here. So from the point of view of display management and rendering then Blocks gives us the facility of a smaller file but may still give us some issues. This is where V-Ray Proxies become useful.
So I’m now going to open a component file, so if we open for example the super cool black file here, just changed to a shaded view, and we’ll look at V-Ray Proxies.
So the V-Ray Proxy object is essentially a reference that V-Ray creates and it gives us two things, a separate file that V-Ray references at render time, and a decimated mesh display that’s very lightweight that means that we could very easily manipulate huge scenes inside of Rhino without the display slowing down at all. So any Rhino geometry could become a V-Ray Proxy object, but one needs to be a little careful when you create Proxy Objects and you’ll see why in a moment.
So to create Proxy Objects I go to my V-Ray for Rhino toolbar and if I hover over the button with the tree on it, you will see that I can either import or write V-Ray Proxies. So I want to write a V-Ray Proxy here. So I’m going to select the geometry that I want to convert into a Proxy and right click on the icon and I’ll then be given the choice of a name for this file and I’ll call it deodorant pack 01 and then I’ll get a dialogue box about how to write the Proxy.
So there are three ways that we can write out the V-Ray Proxy. We can either export all the objects as one single mesh file which is perhaps the easiest way of using V-Ray Proxies, and so all my separate surfaces here with their materials, are going to be one V-Ray mesh or V-Ray Proxy, or we can choose to split out the objects as a separate meshes and either find them recursively or do this non recursively. The first option here is generally the easiest to deal with. Now this checkbox here, automatically create Proxies is the one that we need to be careful about. With this option checked, my Rhino geometry immediately gets lost and turned into a V-Ray Proxy object. So we need to make sure we are working on a copy of the file when we do this, or make sure that we don’t save the Rhino file itself. So I’m going to hit the okay button now and you’ll see that what happens is that my object now, appears as a very much decimated mesh and yet when I come to do a V-Ray RT of this, you’ll see that it renders as the complete object. In terms of how Rhino sees this, Rhino only sees this as the decimated mesh, so you’ll need to use V-Ray RT or a V-Ray production render to actually see the result of the geometry.
Now you’ll see that whilst the proxy object is kept in its original Rhino file, then the materials are maintained. Now I’m going to now open my model with just the tray in it. So now I can bring in the V-Ray Proxy in to my file and you’ll see that this comes in with the same decimated mesh display as previous and let’s have a look at this with an RT render. So immediately you’ll notice that when we bring in a Proxy mesh into Rhino, that the V-Ray materials are replaced with just a diffuse material which will have a simple ID number to it. And if we go to our material editor, you will see that we have what is called a V-Ray multi-material which is the sort of wrapper that contains all the individual elements to which individual materials are applied, and if we look underneath them for multi-material, we’ll see all the diffuse colour of the various components.
So if we are bringing in a V-Ray Proxy object in this way, directly, then we are going to lose the original Rhino materials that have been applied to it. There are various reasons for this but one of the main reasons is that V-Ray Proxy objects are cross platform objects. So Rhino can bring in a V-Ray Proxy that was created in V-Ray Formax or V-Ray Formayer, and because of that we need to have a simplified material description.
So what we need to do inside of our model here is to go to our multi-material and change the references of our individual materials. So for example, I can change 02 black plastic number four, which is the greyest material, to my clear plastic and you’ll see my V-Ray RT starting to update. So eventually we’ll be able to replace the multi-material ID’s with the correct material and arrive at a correct version of the product. Once we have this, again the V-Ray Proxy object can be arrayed just like Rhino geometry. So it can be moved, copied even scaled, although you might want to be careful about doing that. But certainly to array, copy and scale, it’s a very simple process. And big difference that you generally see is that the display is very fast now because we’ve got this almost no polygons that we’re actually moving around the screen.
So what actually happens when we render a V-Ray Proxy object is that the information is read from the actual proxy file by V-Ray, render bucket at a time. So only the information that’s actually being rendered is being loaded in to the file at any one time. So this is what in V-Ray is known as dynamic geometry. The advantage of this is not only in terms of how easy it is to manipulate the scene and how small the file is, it is that there is also very little memory overhead going on because V-Ray is only concerned with a few number of polygons each time. So material issues aside, you can see that the V-Ray Proxy is an exceedingly efficient way of being able to render a scene. So you can see that when the render has completed that all the fine detail that was in the original Rhino detail is represented in the V-Ray mesh.
So the obvious disadvantage with V-Ray Proxies is the fact, when we work inside of Rhino and bring a proxy in directly, that we lose the original material definitions, and like most things, there’s a surprisingly easy way to work around this.
So how we get round the material issues is this. If we go back to the original component file, and I pick my geometry and I create a proxy as previous. I’ll overwrite the file I created earlier to do this and I’ll make sure I use the single mesh option and automatically create proxies. Okay, so now I’ve got my proxy. Then, once I’ve created the proxy, I save this file. I’m going to save it as super cool black proxy, and the idea is now is that the material definitions are actually saved inside of the Rhino file, whereas the proxy mesh is a separate entity.
So if I go back now to my model of the tray and the render scene, so it’s the tray with the light and the floor. Now if I go to my insert dialogue, and bring in the file that I just saved as a Block Instance, and place this, and then I can do my array of this geometry. Then because I’ve brought in a Rhino file as a Block Instance, then the materials are going to be referenced from that Rhino file. So this is a very effective way of being able to use V-Ray Proxies inside of a Rhino Block definition in order to maintain materials.
So we’ve now got all the advantages of small file size, ability to replace components very quickly so that we can do alternatives on things like labels, body colours. We have a file that is using very little memory and render time and one which is also a small file size and has very little overhead on the display manager in Rhino.
So thank you very much for watching. We’ll be back soon with more Rhino and V-Ray tutorial videos.