6.Part
In the final part of this tut I describe some basic ways to texture 3d models, and the render settings to get images usable in PanzerCorps.
6.1. Materials, Textures, Shaders
During the preparations for our project (see part 2.2) I described some basic steps to add material tags to 3d objects. Now we do some real texture mapping to give out model a more realistic look.
Textures are 2d images „projected“ or mapped onto the polygons of 3d models in various ways. So you need to make one in a normal 2d way using software like GIMP, PS etc. or you search the web for free textures to download, though you may not always get exactly what you want for a specific purpose.
In C4D and other 3d programs you can also use so-called shaders which give a textured look by using mathematical procedures. So here you don‘t need to worry about 2d textures, but edit the shader’s settings instead. I describe both ways briefly; it’s also possible to combine those methods. However, this is not intended to be a complete walkthrough, the whole subject of material editing/texturing is far to complex for that.
Stock PzC German units have a basic greyish look, but it’s not just plain grey, rather there are traces of rust, dirt etc. which make a unit look more „used“ and so a lot more interesting. Certain details like here the tyres and tracks have their own materials.
Remember the channels in the material editor? Here’s the pic from part 2.2. again:
The good news is that we don’t need to deal with all those aspects. They can all be activated or deactivated in whatever combination you need. The material editor will show little previews according to the settings you use for each material. The following pic demonstrates some common effects using very simple settings which can all be customized further:
For the PZW we will use color, diffusion, specular, and bump.
So please create a new material as described in part 2.2., activate those four channels by checking them. Now we need a basic greyish image as color texture. Software a la GIMP, PSP etc should be able to create an irregular soft pattern like shown in the pic below automatically with a few clicks. For complex models with lots of mats I’d recommend to organize everything better into specific folders, for this tut I threw everything on the Win desktop.
Right now specific colors etc. are not that important, rather to understand the basics, then you can adjust everything to your liking later.
Note that this time I set the pic’s mix strength to 55%, and edited the color sliders to a brownish tone mixing to 90%. You can set the pic to mix fully, and add traces of brown for rust and dirt into the pic directly by suing a smooth brush in GIMP etc. – depends a bit how familiar your are in that field.
Instead of using a pic as color texture you have a lot of other options here, like using a shader provided by C4D, or using layers of several pics or shaders which can be combined to achieve a certain effect.
Bear in mind that using many shaders and layers can slow down the rendering process later, though this mainly plays a role if you render many large highres images or even animations with lots of frames. Images we need for PzC should render generally quite fast unless you really have very old hardware or use very complex models with lots of different materials.
Bitmap textures render faster than shaders, but the latter have other benefits. Shaders always look good regardless of zoom while the quality of textures depends on the resolution of the pic in use - a very lowres image will not look that good as a texture in close-up pics for example. Also if needed shaders „tile“ perfectly on large surfaces, while this can be problematic with certain bitmap images.
I use two layers for the colors finally, one having the greyish pic, and another using the in-built rust shader from C4D:
The „Diffusion“ and „Bump“ fields work similar to „Color“ – you either load a bitmap image to be used as texture there or define one or more shaders, then edit further parameters like intensity of the bump effect etc. I use some edited noise shaders there.
For „Specular“ you simply set sliders. We don’t need a strong specular effect here, otherwise your object looks way too shiny. I set width/height to 30, and left the rest untouched. Please see below for examples of low and high specular settings:
6.2. Assigning Materials
The basics of this were covered in part 2.2. as well, but now it gets a bit more sophisticated. We now have several objects that need the greyish material, plus some for which we need to define a different one.
Grouping objects together helps us here again: any subobject will automatically take the material definitions from the upper object of the group – unless you give the subobjects their own specific mats. Using logical groups here means that you don’t have to assign the same mat for lots of single objects again and again.
So using null objects etc. I’d recommend to group objects together which need the same mat – for example all sub-objects we used to model the launcher. Also I’d put all track elements together in one group.
However, in some case it will be better to assign the mat specifically, for example the rims are best grouped within the tyre objects, but need their own grey mat, while the tyres get the darker material. The steel wheels need special attention: the outer tube objects get a dark mat, the inner holed parts get grey.
But there’s more to the whole issue of texturing.
6.3. Texture Projection
This was briefly covered in 2.2 too, but let me expand on this a bit: we selected a flat projection method for our background pics.
The textures of the mats we assgined for our PZW are automatically projected as UVW textures by C4D unless we define another projection. What does that mean?
Well, it is a very advanced feature I will not explain fully here, but I want to give at least some info: basic methods to project a texture can be flat, cubic, spheric, and a couple more, please see examples below:
You can manipulate the projection in various ways; it can be repositioned, rotated or resized to achieve a certain look.
But 3d objects can have a lot more complex forms so at some point those basic methods don’t project the texture very well for a specific object anymore.
Using UVW coordinates for your texture is supposed to solve this problem, the software will aim then to adapt a texture for the specific polygonal form.
By the use of specific tools (in 3d software included or third-party) you can also „unwrap“ the 3d object into a 2d image which can be textured separetely. Many 3d games have low-poly 3d objects in combination with sophisticated textures using this method, but this is IMO nothing for the scope of our tut.
Since our grey mat is very simple overall I stay with the simple cubic projection for the hull. As properties I select 100% for x, y size. If the „projection cube“ is as large as the object this means the texture gets not tiled, if the object is larger it does, unless you deactivate „tile“ completely.
With deactivated „tile“ you may encounter cases where the texture does not cover the whole object. This is usually unwanted, but in some cases it can be useful, for example when adding multiple textures to one object. For this simply drag nother mat on an object that already has one. That last one gets shown then, but by editing texture size or using alpha textures you can have parts of the other mats showing through at certain spots.
6.4. Texture per Poly Selection
This is not as difficult as UVW mapping, still quite helpful. We can not only add several textures per object, but also limit a texture to specific polygons of a single object as well. We already know how to select polys, each selection can get own materials assigned. For this you just have to „freeze“ selected polys by choosing „Set Selection“, please see pic below:
This selection can now receive its own material. We assign it normally to the object the poly belongs to first, then specify that it is used exclusively for selected polygons:
So our hull has now two mats, one general for the greyish look, and a black one simulating the observation slits of the hatches. You can add more selections and mats if you wish to texture specific parts of one and the same object. I use a third dark mat for tyres, tracks, and the outer object ogf those steel wheels
Having fully edited and assigned all materials to the objects I get this as a result, only by using four mats overall (I use a second grey one with minor differences):
However, that is only a test-render directly from the editor window. It is not supposed to be perfect, but advanced enough to describe how this model gets rendered into pics for final use in PzC.