I wish you luck with that. You could keep the safe files when reinstalling, though.
15. Artistic RendersSo, you've gone in, ripped models, and put them together as maps. But now what? The models have served their purpose, but you wish you could do more with them. Well, you can. Cinema 4D is a powerful program, and it lets you do some nifty things to your models. Even if you don't plan on making extra renders of your models, I still recommend reading this, as some of the features in here could help you with your maps. If you do plan on making extra renders, I recommend making a copy of the scene file to work with so that you don't accidentally lose camera and model data. For the sake of demonstration, I will be using this Nintendo 64 logo model I ripped from Ocarina of Time.
The first is lighting. Up until now, you've been using ambient lights for your scenes, flooding everything with a solid uniform light. This is okay for maps, but it looks rather unnatural in general unless the textures have shadows and shading on them already. To set up lighting for your scene, start by turning off the
Ambient Illumination option on the scene's default light, or create a new light object if it didn't exist already. The default is an
Omni Point light. It simply emits light in all directions from a single defined point. You can move it around and rotate it like a normal object. You're welcome to fool around with the options and see what they do. Now, an Omni light is useful, but it's not appropriate for every occasion. What if you want to create a shaft of light? Or what if you want to imitate sunlight? This is where changing the
Type comes in handy. There are
four main types, Omni, Spot, Infinite, and Area, with four additional variations of spotlights. A
Spotlight does exactly what it sounds like, in that it illuminates only a specific area, designated by a
cone. The spot can be widened and lengthened and rotated around. An
infinite light creates parallel light rays everywhere in the scene, effectively
immitating sunlight. The location of an infinite light doesn't matter since the rays come from everywhere, though it may help you to line it up right by moving it around. Finally, an
area light creates more realistic illumination by having the rays come from within a defined area, such as you would encounter with light bulbs and ceiling lights. This also means it takes a bit longer to render than the rest. The spotlight variations let you choose a
square spotlight shape and/or emit parallel rays (like the infinite light). For our test scene, lets set up an infinite light.
[img width= height=]http://img694.imageshack.us/img694/3032/picture2ej.png[/img]
Since this is a lone model and not part of a map scene, there's no background behind it. For those that want to create a standalone model render, that's fine, as the empty areas will become transparent in the final render. But for those who want to add a bit of scenery, you can easily create a backdrop with a
Floor object. You can find it in the
Light object category (click and hold the button on the top toolbar) or under
Objects -> Scene -> Floor. In the editor, you'll see only a small gray plane, but it will stretch infinitely to the horizon (dotted line) when rendered. You can put textures on it if you like, though you will have relatively little control over how the texture is laid out. It's useful for catching shadows, which is what we'll be covering next.
[img width= height=]http://img718.imageshack.us/img718/9422/picture3uy.png[/img]
Without shadows, this render is rather unconvincing and unimpressive. This can be fixed by choosing one of the three
Shadow options. The first is
Shadowmaps (Soft). This setting creates blurred shadows through the use of bitmaps. You can choose to save these to speed up rendering. The problem is that they break down if the lit area is too big (especially with infinite lights) and result isn't entirely realistic. I typically avoid this setting. The next option is
Raytraced (Hard), in which light rays are traced as they travel past the object to create crisp shadows that follow the geometry exactly. In some ways this is less realistic than what shadowmaps yield, but it always works. This is what you use when using infinite lights, and what we'll be choosing for our example scene. The third option is
Area, which is very similar to the Area light. The shadows are calculated using multiple light points within the defined area, creating the most realistic shadow. The downsides are that it takes by far the longest time to render and it doesn't work with infinite lights. If you want to use parallel light with an area shadow, you'll have to choose a parallel spot. The area used to calculate area lighting and shadows are represented by a wireframe model around the light. The size and shape of this area can be modified in the
Details tab of the object's attributes. Since we've chosen our shadow, let's see what it looks like.
[img width= height=]http://img52.imageshack.us/img52/3353/picture4njz.png[/img]
Better, but still not very impressive. Wait, what's that? You say that the rounder character models you have all look blocky and not smooth? That is because the model lacks a
Phong shading tag. To add one, right click the model and select it under the
CINEMA 4D Tags category. The icon looks like two orangish balls, and you might have seen it if you broke apart any primitive objects. What this does is smooth the appearance of the surface by calculating gradients on each face, exactly like the
vertex shading that the N64 uses. This affects not only how the object is shaded, but the specularity and reflections on the object. However, it does not affect how shadows fall across the object or the shape of the shadows the object casts. The Phong tag itself only has a couple of options, one of which needs to be on in order to use the rest. When
Angle Limit is turned off, every single face is calculated regardless of angle. You will always want to turn it on. Having it enabled lets you set the
Phong Angle, which determines the maximum angle between two adjacent faces before the shading breaks and creates a sharp edge. The default setting of 80 is pretty good, and you should probably go no higher than 89 unless you have a reason. The breaks in phong shading can be determined manually with
Edge Breaks, which are enabled by default. To create an edge break, switch to Edge mode and select the desired edges. Then, choose
Functions -> Break Phong Shading. There are also commands to
unbreak the selected edges and highlight all broken edges. If you want to rely entirely on manually broken edges, you can set the angle to 180. Phong shading will not be demonstrated since the N64 logos is flat and blocky.
Back to the lighting. As you can see, it's rather dark and has very harsh shadows. In fact, anything not in direct light is pitch black. This can be fixed in several ways. One method is to create a second light object, an ambient omni light. Give it a
low Brightness level to light up the shadowed regions. Make sure you
dim the other lights a bit to compensate for the added light. This solution has little impact on render time and can look pretty good. On top of this, you can add
Global Illumination. This means that it will take into account the fact that light rays bounce of surfaces, adding light where the reflected rays hit. The downside is that it is resource intensive and increases the render time a great deal. The most basic scene render can take around 30 seconds, while more complex scenes could take over an hour. Whether or not you want to make this trade-off is something you have to consider when setting up the scene. To activate Global Illumination in your scene, go to the
Render Settings (ctrl+B) and select the
Global Illumination tab. The check mark at the top activates it. There is a mindboggling set of options, but the only ones you want are at the bottom. Since you'll probably be changing around a bit while setting it up, change the
Recompute option from First Time to
Always. This means that it will do the full calculation each time instead of relying on the first calculation. You can choose to save the calculation for future renders if you're positive you won't be changing the scene, which will speed up the render. If you choose to do this, change the Recalculate option to Never after you've created your a saved GI solution. The second method to fixing overly dark shadows is to rely entirely on Global Illumination, through the use of a
Sky object. Found in the same category as the Floor, it creates a gigantic sphere that encompasses the entire scene. You can texture it like you would a normal sphere. The difference is that all textures placed on it will be treated as entirely luminous, which will affect the shadowed areas in a much more realistic way with GI. It can be a bit tricky to deal with skies, as a bright blue sky will turn everything in the scene quite blue if not handled correctly. If the sky is out of view, you can get away with using a white or gray sky. You can also add a tint of color if you like. For this example, we'll be using a white sky.
[img width= height=]http://img130.imageshack.us/img130/8456/picture5yr.png[/img]
Looks a lot better, doesn't it? However, there is one more thing we can add to make it even better. Notice how the reflected light seems to build up in corners, such as where the green meets the floor? This can be compensated for with a feature called
Ambient Occlusion. Similar to how Global Illumination works, it takes the curvature of the model and darks the areas that would receive too much light. Turning it on adds a bit to the render time, but it usually can add a bit of realism to the scene. If any of the materials in the scene make use of the alpha channel or transparency, you'll want to enable
Evaluate Transparency. It will add a little more to the render time, but it will prevent you from having big black squares wherever you have alpha transparency near an object. It is important to note that Ambient Occlusion is not perfect, and occasionally acts funky in some areas, usually due to phong shading. This is the setting I used in my Mario Kart 64 maps to give it a sense of depth. Here's how the scene looks with AO added in.
[img width= height=]http://img535.imageshack.us/img535/972/picture6z.png[/img]
Now, what if you have some objects that you don't want to be affected by GI, AO, or the lighting? This will most likely be the case if you're rendering a map scene that includes background objects such as a picture of a distance town. You can achieve this with another one of C4D's tags. Right click the object and choose the
Compositing tag from the CINEMA 4D category. This lets you control various settings about how the object interacts with the scene, including whether or not it casts shadows or affects GI and AO. Activating the option
Compositing Background makes the object light up the same way the sky object does, but still letting it be affected by shadows and Ambient Occlusion. This is the setting to use when the scene already has the proper lighting and shadows as part of the material and only needs to interact with the character.
Now, our scene is complete. Or is it? What if you wanted a transparent background to go behind your model, but still keep the effects of the realistic lighting? Once again, the Compositing Tag comes to the rescue. Add one to the Floor of the scene and disable the
Seen by Camera option. This means that the object will still interact with the scene like normal, but it won't show up in the render. Copy the tag onto the Sky and anything else you want to be hidden from view. To see a more impressive display of the tag in action, try leaving the floor visible and putting it on the character instead. You'll end up with something like this.
[img width= height=]https://img519.imageshack.us/img519/7702/picture7us.png[/img]
With the scene set up just the way you want it and all the render settings set to the proper size and format, you're ready for your final render. Just hit Shift+R, sit back, and watch it do it's thing. Of course, not every render you do needs to include all of these effects. Do whatever you want, because it's your render. Sometimes the best renders are the simplest ones.
[img width= height=]http://img708.imageshack.us/img708/5083/finalo.png[/img]
That's all for now. Remember, you can apply some of these tricks to your maps, but try not to go overboard with them. AO can help give top-down maps a sense of depth, but the graininess of the shading bumps the filesize up tremendously. If you decide you want to make some extra renders, show them off here! This is really the only way you can make use of games that can't be mapped. There are only a couple of lessons left before I'm done, so I hope your mapping is coming along well. Remember, I'm here to help you if you have any questions or problems.