Applying decals with alpha channels
Video: Applying decals with alpha channelsAn important component in the transparency toolbox is the idea of the alpha channel. Transparency allows you to see all the way through an object. The alpha channel allows you to cut through an object through another material: for example, if you wanted to put a label on a bottle, for example, or in this case, we're going to put a little star on the wing of the plane. Let's start off by creating material that's going to contain the star element, and I'm going to go to the Material Manager and go to Create > New Material. I could also double-click down here. Let's rename this material and call it Star.
Viewers: in countries Watching now:
CINEMA 4D Essentials with Rob Garrott is a graduated introduction to this complex 3D modeling, rendering, and animation program, which breaks down into installments that can be completed within 2 hours. This course shows how to lend 3D objects color, transparency, and life with materials, textures, and lights. Author Rob Garrott explains how to create a variety of surface textures, from smooth and reflective to bumpy and flat, and how to add dramatic depth and shadows to your scenes with the different light types in CINEMA 4D. The final chapter discusses texturing in 3D with the BodyPaint module, which can also help hide UV seams.
- Understanding material channels
- Applying materials via projection
- Limiting materials with selection tags
- Texturing type
- Using Falloff to limit the effects of lights
- Working with visible or volumetric light
- Painting on objects and textures with brushes in BodyPaint
- Hiding seams with projection painting
Applying decals with alpha channels
An important component in the transparency toolbox is the idea of the alpha channel. Transparency allows you to see all the way through an object. The alpha channel allows you to cut through an object through another material: for example, if you wanted to put a label on a bottle, for example, or in this case, we're going to put a little star on the wing of the plane. Let's start off by creating material that's going to contain the star element, and I'm going to go to the Material Manager and go to Create > New Material. I could also double-click down here. Let's rename this material and call it Star.
So let's make a red star on here. So let's go to the color property and change it. I've got my values here set to HSV. If yours is set to RGB, you can do that as well, or you can change yours to HSV by clicking on this pulldown and selecting HSV. If I go to the Hue, it's already set on red, so let's bring that up into the red. And I want it to be not quite so bright. I'm going to have it be a little more deep, and let's add a little bit of blue. We'll go down to this range, so we can add some blue into it, so it's a little bit, maybe not quite so purple. There we go. It's feeling better.
Now that we've got our red, we're ready to add the alpha channel, so go to the Basic properties and turn on Alpha. Now nothing happens. That's because the Alpha property needs some alpha information. Just like in Photoshop, it uses the grayscale values of an image to cut holes in an image. We go to the Alpha channel and we can load in. Now, I have a prepared Alpha that's a star shape, and I've got that star shape already in the texture folders. So let's click the load image button, and out here in the tex folder for the materials I've got the Star.psd, and that's just a simple star shape.
I started off in the Illustrator and made a start shape and converted it into Photoshop. When I hit Open, we now get a star shape cut out of our sphere. Now I'm ready to apply that star to the plane. Let's go to the star material and drag it across and apply it to the body of the plane, which is this cube object here. Now, when I do that, I get a very strange projection. It actually looks kind of cool. If we render--Command+R or Ctrl+R in the keyboard-- you can see that the star is being applied all over the plane.
The default projection method in this case, under the Tag properties of the Texture tag, is set to UVW Mapping. Now, I started with a cube when I made this plane, but by slicing and dicing on it to get the shape of the plane built out, I completely messed up the UV map. Now, we don't need UVW mapping to get our star to look right on the plane. What we need is flat mapping. So let's go to the Projection Method and select Flat. When we do that, we now get flat mapping. To see how that's being projected, let's click on the Texture mode icon right here, and let's click on that and then click on the cube.
Now we can see that projection of that flat texture. It's being projected right through the nose and out the tail. It's also being repeated everywhere on the plane. That also looks pretty cool. Let's render that. Command+R or Ctrl+R. Not exactly what we want though. So let's hit the letter A on the keyboard to redraw the screen. Now what we want to do is to start to move this texture around on the object. In order to do that, we're going to hit the letter E on the keyboard and get us the Move tool. Now I can move that texture over. So I'm going to drag it on its X axis and as I move it, you'll see that it moves across the surface of the plane.
That's a pretty cool effect, and you can animate that, by the way. The way you would animate it is by clicking on the Texture tag and under the Coordinate Properties, you could scrub these values or you can animate the Offset U or V. I want to get it out here at the tip of the wing, and now I want to rotate it. So I'll hit R on the keyboard to get the Rotate tool up, and I'm going to hold down the Shift key so that it goes to even increments, and then I'm going to go to 90 degrees. Now I've got this star being projected all over the plane. It's still a little too big, and it's in the wrong place.
The other thing that's happening is it's repeating everywhere. So the way I fix that is by clicking on the Texture tag and unchecking the Tile option. Now it's only going to show up right there in that area. Now I can switch back to the Move tool and reposition it. So I hit the letter E on the keyboard, and now I can drag that up on its local Y axis to get it into the wing where I want it. Now I want to change the size. If I go to the Texture tag, the way I change the size is by updating the Length U and V.
If I go to the Length U-- and let's just make it about 75% of its current size, 75, and I'll tab over and hit 75 there. And now I've got a decent-sized star. I can now move it with the Texture tool and put it right in the wing where I need it to. There we go. When we render this--Command+R or Ctrl+R-- you'll see that every place where the texture is not repeating I get the default gray material, but right around that texture I have this cutout. That's because what an alpha channel does is if it does not detect the material underneath it, it cuts all the way through the object.
If it detects the material, it cuts through to that material and stops. So what we need is a base material on our plane to stop that from cutting all the way through. So let's make a new material. Double-click in the Material Editor, boom, boom, and call that material Plane Base. Let's take that Plane Base and drag it onto the cube object. CINEMA 4D evaluates the material tags from the right to the left, so what's happening is our Plane Base is overriding the star material, so we need to reverse these tags.
If we take this tag and drag it to the left, now we've got our star showing up on top of the Plane Base. When we render--Command+R or Ctrl+R--you can see that now it's just cutting through to that material below and stopping. It's not quite in the right place again, so let's switch back to the Move tool on the star. So select the Star material, hit the letter E on the keyboard to get the Move tool going, and let's move that back on the local Y axis just a little bit to get it more centered on the wing. There we go. Now what I can do to flap that over is I can duplicate this tag and then move it on its local X axis.
Let's orbit around here a bit and then drag that all the way across. Now let's look at it in the top view. If I switch to the top view, I want to change my display from Lines to Gouraud Shading. Now I can see that material applied on the top view, and I think I've actually got it lined up pretty well. Drag that across. Yes, it's not bad, right about there. Switch back to the Perspective view. When we render, we've got a great little plane with some nice red stars on it.
One of the things you'll notice about it, if you orbit around, is that the stars are projecting all the way through. Now, what would happen if I didn't want the stars to show up on there? There's an important technique for doing that and we're going to talk about that in the next movie.
There are currently no FAQs about CINEMA 4D Essentials 4: Materials, Texturing, and Lights.