- View Offline
- 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
Skill Level Beginner
By default, lights in CINEMA 4D don't cast shadows, but real lights always do. There are a lot of times where you want to have shadows off, but when you're working with objects that are going to be in close proximity to one another, then you usually want to have some sort of shadow being cast. CINEMA 4D has different types of shadows, and they all come with different pluses or minuses. So, let's take a look at them. I have a very simple scene here. Let's back out just a bit, so you can see what's going on. I've got a spot light and that spot light is shining down on this word SHADOW. So let's zoom back in so we can see.
We don't need to see the light right now. We just need to see the effect that the light is going to generate. So let's look at the word and how it's going to cast a shadow on the ground. Before I do anything else, I'm going to turn on Interactive Render Region. The Interactive Render Region is accessed by one of two ways: I can hit Option+R or Alt+R on the keyboard or I can click and hold on this middle Render icon and grab Interactive Render Region. And when it shows up, it's got a Quality slider here in the middle. I'm going to turn that Quality slider all the way up and then enlarge the Interactive Render Region so we're seeing more of our scene being rendered.
I don't really care about this area of the window. I'm going to just bring it over here where the shadows are going to be cast. Now I can select my Light source and under the General properties, I can activate Shadow. I could also go to the Shadow parameter and then turn on shadows here. It's the same difference. So I'll stay here in the Shadows and click and hold on that so you can see the different types. There are three types of shadows that lights cast. They have the None option, which is no shadow, and then they have Shadow Maps (Soft), Raytraced (Hard), and Area.
Let's start off with Raytraced (Hard). Raytraced (Hard) are the most simple type of shadow that you can cast, and I'll activate that now. When you hit the Render button, CINEMA 4D sends out these little mathematical statements called rays from the point of view of the light, as well as the point of view of the camera. Those rays travel out and they strike your objects, and those rays are looking at the shapes of the objects. And in the case of shadows, basically everywhere where a ray does not strike through, another object behind it gets a shadow.
The accuracy of those rays determines the accuracy of the shadow. Now this is a huge oversimplification, but it's a good way to understand what's happening. With the Raytraced (Hard) Shadows, you really have no control over the accuracy of the shadow. It's just going to create an occlusion of your object. This edging here that you see, the chunkiness of those edges, that's being caused by something called anti-aliasing, and I can change the anti- aliasing settings in the Render settings of my scene. If I click on the Render Settings button here, under the Anti-Aliasing option, I can change that.
So let's move over here so we can see our scene file. So there's our shadow right here. I'm going to change the Anti- Aliasing from Geometry to Best, and when I do that, you'll see that those lines smooth up. So I'll leave the Anti-Aliasing on Best for now, so we can get a better look at our scene. Let's close up the Render Settings. And that's pretty much all there is to Raytraced (Hard) Shadows. You can control the color. I can click on that, and let's make the shadows red. Now that is not a natural behavior, but there may be a valid design reason why you'd want to do that, and so they give you the ability to change color there.
I can also change the density. I can bring the density down from 100 to, say, 50, so the shadow is not quite as strong. That is pretty much all there is to the Raytraced (Hard) Shadows. So let's take a look at the next type, which is Shadow Maps (Soft). Now, this is the next level of intensity in shadows, and when I add Shadow Maps (Soft), you can see the Color is still set to red. It picked that up from the last Shadow type. So let's change it back to black, so let's click on this swatch and drag down and hit OK. Let's also bring the Intensity up to 100%.
Now, our shadows look a little bit more realistic, and I say a little bit more realistic because there are some faults with these shadows. The first thing you should notice about them is that the shadows bleed. You can see that the shadow is bleeding underneath the word SHADOW, in the front, and that's not a natural behavior at all. The other thing you'll notice about the shadows is that they don't quite join up with the object, and that's a natural characteristic of Shadow Maps (Soft). Shadow Maps (Soft) takes a rectangle from the point of view of the light source and projects it through your scene.
Every place where that rectangle strikes an object it casts a shadow. The resolution of that rectangle determines the accuracy of the shadow. The Shadow Map pulldown here controls the resolution of that shadow map. If I up this Shadow Map resolution--let's go all the way up to 1000 to start with-- you're going to see that our shadows become much more realistic. There is a lot less bleeding here on the front of it, and you could see that the shadow joins up with our word in a much better way. Now, one thing you should notice about the shadow is that it also got more crisp, and that's because of something called the Sample Radius.
The Sample Radius controls the transition from the darkest part of the shadow to where the shadow doesn't exist, and by increasing the Sample Radius now, we can soften that shadow back up. So let's take that up to 10. You can see that now we get that bleeding back on the front, but our shadow is much softer out at the outer edges. As a general rule, I don't use Shadow Maps (Soft) when I have an object that needs to sit on a ground plane like this, for just this reason; you can see it doesn't look that good. I'll use Shadow Maps (Soft) when I have a logo that's floating in a design space, because objects that don't touch look really pretty good with Shadow Maps (Soft) and they save you a lot of render time.
The last type of shadow I want to talk about is an Area shadow. So let's go back to the Shadow pulldown and go from Shadow Maps (Soft) to Area. Area is the most accurate type of shadow. It's also the most difficult for the computer to render. So you should be careful how you use Area shadows. If I have an object that I know is going to be touching on the floor then I will always use Area shadows. Area shadows come with some downsides. First and foremost is that they take longer to render. The second downside is that they have a lot of noise in them, and that noise is designed to help the shadow render more quickly.
In order to get rid of that noise, we have to turn up some sample settings that are going to make this scene render even longer. Most of the time it's worth it, because the quality that you get from the shadows is really very good. We've got three settings here for the Shadow. We've got Accuracy, Minimum Samples, and Maximum Samples. The Accuracy controls how accurately the shadow is drawn. Let's bring it down to zero. You can see that the shadow got a lot more grainy. If we bring the Accuracy up to 100%, you can see that the shadow didn't get nearly as un-grainy as we thought it would.
The accuracy level is something I usually always leave at the default value of 75%. In order to get rid of this noise, we have to increase something called the Maximum Samples. Minimum Samples affect areas where objects come in close proximity with one another. The Maximum Samples control the graininess of the shadow in big flat areas. So if we go to the Maximum Samples and change it from 100--let's go up to 500. Now it's going to take quite a bit longer for the shadow to render, but look how much less noise we have.
You can see that the shadow took almost two seconds, compared to almost no seconds before. We've gotten rid of nearly all of the noise, but let's crank the Shadow Samples up just a little bit more, so you can see how it affects the render time. Let's go up to 800. So that took a little bit longer than two seconds, but it's rounding down for us. But you can see that the shadows really don't look any different than they did before. So the point I'm trying to make is that you want to be careful with your Maximum Samples. There is a point of diminishing returns on them, and it's going to be different for each scene.
I can probably get away with the scene, of going down all the way to 300. I'd say that looks pretty good. I've got a little bit of noise in the shadow, some in those areas there, but let's say I was going to be looking at my type from this angle here. When I let it render, you'll see that my shadow looks really good from this angle, it renders fast, and I've got just a few samples going here. That's a quick summary of the different types of shadows in CINEMA 4D. The most important rule of thumb is that you don't normally want to have all your lights casting shadows.
When you're lightning and working with shadows in CINEMA 4D the goal is to simulate what happens in the real world. This is going to save you on render time and allow you to stylize your image in a really creative way.
Sign up for a Premium Membership to download courses for Internet-free viewing.
Watch offline with your iOS, Android, or desktop app.Start Your Free Trial
After signing up, download the course here or from the iOS/Android App.