Join Paul F. Aubin for an in-depth discussion in this video Make a material tailored to a 3D surface, part of Revit: Tips, Tricks, and Troubleshooting.
- [Instructor] This video, I want to look at a quick example for creating a custom material. Now, this custom material's going to be unique in two respects. One is that it's not going to be your standard tiled material, like if you were doing a brick texture or a floor finish texture or something you would repeat a tiled image several times to get the illusion of the same material repeating across the surface. But in this case I want to apply an image but I only want to apply it one time. That's going to be an image for this flagpole right here. The other thing that's going to be a little bit unique about it is, we're going to have to do a little bit of fine-tuning to get that image to follow as closely to the curvature of the flag surface as possible.
To show you what I mean I'm going to select the flag, it's always a good idea to select something first before you orbit in 3D, hold the shift key down, drag my wheel to kind of orbit around the flag, and you can see that it's kind of got this freeform surface to it that looks like it's waving in the wind a little bit. Now, the way that that was achieved was to build it in the massing environment using an adaptive component. So I'll show you what the family looks like in just a moment here. But just exactly how are we going to apply this texture to that surface is the real question here.
Now, your first thought might be, "Well, what if we use a decal?" Right? Because decals are able to apply to different surfaces, so let's give that a try. If I go to the 'Insert' tab here and I click on the decal drop-down and then choose 'Place Decal,' I've already created one called US Flag, I'll just accept the default size for width and height here, and if I move my mouse around on the screen I can place it on that sloping surface, I can place it on this flat surface, even on this curved surface right here.
Unfortunately, however, it will not sense that freeform surface in the adaptive component. Even though decal might be tempting to do and it's a pretty quick and easy solution, that's not going to do the trick. So what we're going to do instead is build a custom material. Now I've actually already built the material, I'm going to show it to you right now. If I change the display mode in this view to realistic shading, you're going to see the decals appear, of course, and you're also going to see the flag texture appear on the surface of that undulating surface.
So if you look at it carefully you can see it's a little distorted as it follows some of the curves, but it's believable. Okay? So, really that's the trick, is that you're trying to manipulate that texture to get it to follow the surface as closely as possible and keep it being believable. And as long as it gives that believable illusion, then it should work just fine for most purposes. Now, naturally if we were to zoom in really close on the flag, it may lose a little bit of its believability at that point, at which case you might want to turn to a program like 3D Max to make a more accurate rendition of the flag.
But for purposes like this where it's just providing entourage and context in our Revit model, the technique I'm about to show you should work just fine. So I'm going to select this flagpole, edit that family, that takes me into the massing environment. If we zoom in here you can see that I used kind of a standard-size flag here, five feet tall by eight feet wide, that's a pretty common size American flag. Now, as far as how this was created, this is a freeform surface here, this form element, and it's actually created from these reference lines right here.
So the way these reference lines were created was using these flying-through points, and you just sort of click some points to kind of create some curvature, press escape, select one of those points and then you can use these grip controls on there to manipulate it. If you tap the space bar you can manipulate them in real world coordinates, and if you tap the space bar again it goes to local coordinates. So you create a few of these stacked splines, you manipulate the points a little bit in each direction and then you select several of those splines together and click on the 'Create form' option.
So if I select some of these splines here you can see the 'Create form' is available, and it will loft through those shapes to give us that freeform surface. As far as the field of stars here, I'm going to go to 'Hidden Line,' and notice that that still displays. Because those are actually lines. So, I did that because I wanted something to appear in coarse levels of detail where we weren't showing realistic shading, and I thought, you know, just kind of approximating where the field of stars is is enough to kind of suggest that this is an American flag.
I could have certainly done horizontal stripes as well to make it even more representational, but I decided to go minimalist on this and just go with the field of stars. Now, the way you do that is to draw a line, turn on '3D Snapping' and then check 'Follow Surface.' And this allows you to literally click points on the surface and those curves will actually follow the curvature of the surface underneath.
So it's as if you literally take out a magic marker and draw right on that surface. Alright, so that's the basic flag itself, and the sort of low-detailed version of the flag that will appear all the time, that's all part of the model. But now as far as the texture goes, what we're going to see whenever we turn on realistic shading or when we do a render, we need to go to the material editor. So if I go to 'Manage' and click on 'Materials,' you can see my American flag material right there.
Everything happens really on the 'Appearance' tab. You can see that an American flag texture has been loaded in, and I'm going to show you what the settings of that texture is in just a minute here. But let's go ahead and build it over again from scratch. So I'm going to create a new material, I'll right-click on it, rename it, and I'll just call it 'US Flag' just to make it a different name. And then we'll go to 'Appearance,' click on the image swatch right here, and I've provided the texture in the exercise files folder.
We'll go ahead and point to that. Now, if I do that there's going to be a couple problems with it if that's all I do. If I click okay, and I now select this surface, and apply that US flag material to it, and now let's turn on realistic shading. What you're going to see is that's not really the effect that we had in mind. So, a couple things are going on. The scale's not correct, the orientation's not necessarily correct and of course it's tiling the image. So, in order to get from this to what we had a moment ago, we need to make a few more adjustments in the material.
So back to 'Materials,' select the US flag, go to 'Appearance' and click right on the image swatch there and that will open up the editor. So as far as the scale goes you can see now what the problem is, it's defaulting to one by one, and I said that overall, this flag is essentially five by eight. Now, I say essentially because the minute you add those splines and do the freeform pushing and pulling of all those points, you're kind of distorting the size of that five by eight. So it's really a little bit different than that size, and what I found through trial and error is that I had to actually make the size slightly larger than five by eight in order to make the texture believable.
Remember, the goal is we want the texture to wrap the surface in a believable way. So, you certainly could put in five by eight directly here, so if I try to put in eight here of course the first thing you discover is that it's actually seeing that as eight inches. So instead I'll put in 96, that's a little better. And then of course you see it's trying to match the height like that as well. So you can unlink the width and the height, and then here you're able to put in five as 60 inches. Now, once again, that will work but it's going to be just a little bit too small.
So through a little bit of trial and error I found that a size of eight foot nine by, and in this direction I had to actually exaggerate a little bit more than I wanted to, but six foot eight and a 1/2 is what gave me a size that worked pretty well. But you're welcome to experiment on your own with different sizes. Now you can type the numbers in directly or you can dial them in with these little spinners. Now, the next thing is if we just apply that, then it's better, of course it's oriented the wrong way at the moment, but, you know, you can see that that's about the correct proportion.
Okay? So, to continue here, what you really want to do though is just to make sure, you don't want it to start, you know, you shift it in one direction and it starts showing some of that blue field on the other side. You really don't want it tiled anymore. So we're going to turn off the tiling. Set that to none and none. And now when I apply that, now you start to see that it looks a little bit bizarre, because the next thing that we discover is when you have a non tiled image, it actually starts from the center of your surface.
So it's putting just one tile up in the upper right-hand quadrant there. So, that's where we have to make some further adjustments. Now, most of this I did by trial and error. For example, in my experimentation I found that if I rotated this image a little bit, let's rotate it a little dramatically first, 'kay? We can start to correct that orientation problem. Now a 45 turns out to be a little bit too much, it turns out that you really don't need to rotate it very much at all.
About seven and a 1/2 degrees was all it took to kind of correct the orientation. You can kind of see that we're getting stripes here and a little blue field there. So now, we want this point down here, and that'll shift the whole thing over. So, we just need to shift this thing using the offset parameters here, x and y, to get it to go down into that lower left-hand corner. Now, if you're not sure which way to do this, you can do the little spinners and, you know, kind of see what it did.
So that moved it up. What I actually wanted to do was move it down, right? And you'll notice that it's going to be kind of a lot that you're going to have to move it by. Well, it turns out that it's roughly half in each direction. So I'm going to type in negative four foot three by negative 34 and a 1/2. Okay? So, in the preview in the texture editor, it looks really bizarre because it's kind of shifted the whole thing offscreen. But when you close that window and click 'Apply' here, you can see that it's now applying correctly across the surface of the flag geometry.
So, you could fine-tune it further certainly but that gives you a general idea of what you need to do whenever you're kind of custom-designing a texture to fit a certain piece of geometry. Now, the thing with this is is this texture will only work now on this particular flag geometry. This is not a texture that you would be able to apply somewhere else successfully. So, in that case you'd have to duplicate that texture and fiddle with it some more. So if you have lots of flags of different sizes, you're going to need to really create a texture for each one.
NOTE: The exercise files for this course can only be opened in the most recent version of Revit (Revit 2017).
Skill Level Appropriate for all
Q: Why can't I earn a Certificate of Completion for this course?
A: We publish a new tutorial or tutorials for this course on a regular basis. We are unable to offer a Certificate of Completion because it is an ever-evolving course that is not designed to be completed. Check back often for new movies.