Since there are no questions, I'll assume you're following along with no trouble. And if you try out any game that is not on the list, bring it up and let me know what kinds of problems you face or if it is even mappable at all.
6. Axis Control and Optimization
This is something I wanted to mention in the previous lesson, but it was long enough and I forgot about it anyway. Every object, even null objects, has an axis, a zero-point in space that acts as the objects center when it comes to movement, scaling, and rotation. However, the default position for all objects created by Nemu is at the origin of the scene, the absolute center. This makes things rather difficult when it comes time to work with the scene. The fix for this is quite simple, and will become more of a habit than rescaling the models. With the polygon objects selected (use shift+click, don't include NemuObject parent), go to the menu at the top and choose Structure -> Axis Center -> Center Axis To. This will reassign the axis of every selected model to the center of the object as calculated by the average size in the X, Y, and Z directions. This will notably improve view control, which is dependent on the camera's location relative to the selected axis. You can now jump to individual objects with S without always having the center of the scene stealing the show. If you want even more control, you can select Structure -> Axis Center -> Axis Center... to bring up the Axis Center controls. From here, you can control how it calculates the model's new axis, using the Execute button to apply the change. Clicking Execute with the default settings is the same as using Center Axis To. The Reset button sets things back to the defaults. This panel is very useful when you want to, say, position the axis at the very bottom of a model for alignment purposes. I'll talk more about the axis and how to manually control it another day.
If you've tried to modify individual polygons in a model or apply phong to one (you'd be doing lots of experimenting, I imagine), you'll realize that the models fall apart. Trying to move one just leaves a hole where it was. This is because none of the triangles are connected. When the plugin rips the scene, every polygon face is created as a separate piece, with its own three vertices. Only because of the fact that they share identical coordinates with neighboring triangles that they give the appearance of a solid object. This also boosts the filesize because no vertices are shared. If you've guessed there's an automatic way to deal with this, you're right. With the desired objects selected, go to Functions -> Optimize... to bring up a small dialog box. By pressing Okay, all vertices that have the same or very similar coordinates (Tolerance) are merged together. This unifies the object, making it a lot easier to modify and possible to use phong shading (again, something for another lesson). If you don't plan on modifying anything in the scene, it's not necessary to optimize, because ambient illumination gets rid of all true shading. That's all for this lesson.
7. Tiling Textures
When looking through the textures in the scene, you will probably notice something: there are a good amount of images that only show half or a quarter of an object. When they're put on the model, they just look wrong. That's because the Nintendo 64 has a couple different ways to tile textures on objects besides the normal method you see in C4D. One of those ways is by flipping every other image to create a pattern twice as big as the original. In Cinema 4D, this is referred to as Seamless Tiling and is very easy to use. However, there's a catch. The N64 can define seamless tiling for the X direction (side-to-side) and Y direction (up-to-down) individually, while C4D cannot. Some models use this, so a workaround is required. You can either do the brute force method, or the cleaner, smarter method. I'll start by explaining the basics of tiling in Cinema 4D. Take a look at the Objects list for your scene. Next to each model is an icon showing the material it uses and a checkered square. This is the model's UV Tag and it contains UV Data. It defines how materials are layed out across the polygon, as I mentioned earlier. Each object can have more than one material, but can only have one UV Tag. Be sure not to mess with it.
Clicking the material's icon will bring up UV-related attributes for that particular material, found in the Tag tab. From here, you can control not only how it tiles, but its scale and offset, all without messing up the UV data itself. At the bottom of the attributes list are four check boxes. You'll only be interested in the middle two. The Tile option controls whether or not the texture is a repeating image or a single instance. With this off, the texture will only appear once, in the center of the UV Map (as determind by the UV Data). Any empty space not covered by material is replaced with the default gray matte. Below that is the Seamless tiling option. Keep in mind that the tiling will only show up when you render (ctrl+R), so don't panic if you don't see any change on the model. The other two checkboxes are of no use to you. Up at the top, the first field shows the material in use. You can drag a material into this field to change it. You can also drag a material onto the icon in the object list to do the same thing. The second field shows what polygon selection it is associated with, if any. I'll explain this another time, but for now, leave it alone. The third field is the material's Projection, or how Cinema 4D applies the texture to the model. The default for most models is UVW Mapping which puts the UV Data in control. If no UV data is defined, the texture will not show up at all under this setting. The default for objects without UV data is Spherical, where the placement is based on how the image appears on a sphere. This is impossible to notice on solid-color objects unless you add a texture. You can experiment and see for yourself what the other projections do. The fourth field is Side, which lets you control if the texture is shown only on the front of the polygon, the back, or both. Both is the default setting. The "front" and "back" of the polygon is determined by the normal direction, which tells which direction the polygon is "facing", so to speak. This is how games know how to use Backface Culling, where the backsides of models are hidden, letting you see even when your camera goes through the wall of a closed room. I'll discuss this more when I talk about setting up the camera for rendering.
The next group of fields are what you'll be using to manipulate textures on an object to compensate for special tiling. The first two fields control the Offest of the texture in the X and Y directions. With tiling turned off, this will affect the position of where the single instance of the texture is placed. Increments of 100% are equivalent to one full texture position, so stay away from strange numbers if you want your texture to be accurately placed. The next four fields are positioned next to each other because they work in pairs. The Length and Tiles fields are inversely related to each other, and they automatically update whenever one side is changed, because they're two ways of displaying the same data. Length is the size of the texture relative to how it normally appears, and Tiles is how many times the texture repeats itself in the space it normally takes up. At 100% size, the image tiles 1 time because it is the same size as itself. At 200% size, the image tiles 0.5 times, because it takes twice the space to display the image and thus only half of it fits into the original size. At 50% size, the image tiles 2 times, because it only takes up half the space and can fit in the same space exactly twice. The instructions below will show you how to use these fields.
The first kind of tiling issue you might have to deal with is when a model uses seamless tiling in only the X or Y direction but not both. Simply turning on Seamless tiling will cause things like upside-down archways and windows. The brutish way to handle this is to put multiple textures on a single object. You start this by creating a copy of a texture tag onto the same object using ctrl+drag. Cinema 4D reads left to right when it comes to multiple materials, so materials on the right overwrite ones on the left. You'll want the cloned tag to be to the right of the original. Turn off tiling on the new tag. This will let you move it around to patch up the troublesome spots. Next, change the Length of the axis you want to flip on to -100% (-1 Tiles). This will mirror the texture in that direction. Many times, the texture will appear not to show up, leaving blank faces. (Cinema 4D only shows texture per polygon face, so it will display only the material you have selected and only if the material is visible on that face.) This is because the image is being drawn backwards, starting at the top-left corner of the original image. In order to move it into position, change the Offset in that axis to 200%. This will put it just to the right/below the original texture instance, which is typically where you want it to be. If you need to do it several times, clone the new material tag and change the Offest by increments of +/- 200% as necessary. Keep in mind that the more materials are assigned to a single polygon, the more it lags C4D, so try not to use this technique in excess. Also keep in mind that this will not work on texture with alpha, because the nonflipped version will show through under the flipped one. In the case of alpha, you'll have to turn off tiling for the original and clone it multiple times as well. Obviously, this can be quite tedious, especially for larger models. This is where the easy method comes in, though it involves some external editing. In the scene's folder, create a copy of the image you want to tile and name it whatever, if you even decide to rename it. Open it up in good ol' Paint and copy/paste/flip the texture so that it looks like what you want it to look like. The modified file will end up being twice the size in the desired direction, which is usually width. Save it, of course, and head back into C4D. (If the image has an alpha channel, you will have to do the same thing to it as well.) Go to the material you want to modify and swap in the new image. Watch as the models change in texture, but notice that things are scrunched. The UV data is the same, but the new image is twice is long and so is squashed. Fix this by going to the object's material tag and chage the Length to 200% (0.5 Tiles). Make sure you change every tag that uses this particular material, because it will make them look weird otherwise. A good way to make sure you get all of them is to right click the material in question and choose Select Texture Tags/Objects. This is a very quick and easy way to fake special tiling without needing 20+ materials on one polygon. However, it will not work with the next special case.
The other kind of tiling issue is the most troublesome to work with. A special thing the N64 can do is smear the edges of a texture instead of repeating it. The farthest row of pixels on that side will be repeated over and over, creating a series of colored lines. This type of tiling can only be done in a way similar to the brute method mentioned above, but with significant differences. Start by turning off tiling for the original texture tag and clone it to the left. Unlike before, the clones you make are going to go under the original instead of on top of it. In the direction you want the smear, change the Tiles to 0.001. This is the maximum amount of stretching you can put on a texture, scaling up the size to just under 100000%. What you do next depends on the model. If the smear is for covering a long narrow model, you can turn on Tiling for the stretched material. This will cover both the +/- directions of the texture, as well as fill in any little empty spaces that might exist on the sides. If the model is significantly large and has space in both directions, you'll have to leave it off and instead clone it again, to the left. If you have space to fill on the - side of the texture, chance the Tiles of the cloned tag to -0.001 and the Offset in that direction to 100000. This will smear the - end. Clone the tag(s) to the left once more and swap the X and Y values for Length/Tiles/Offset. After this step, you'll have a large cross of color with empty corners. Again, what you do next depends on the situation. If all four corners of the image in question are the same, you can get away with cloning the material again, stretching it to 0.001 in both X and Y, and turning on Tiling. Alternatively, you can duplicate a solid-color material, change it to the desired color, and place it to the left of all the actual textures. If not, you'll have to create several tags and mess around with Offset and +/- Tiles to get the desired effect. Remember that the corners go below the X/Y smears. And, as with seamless tiling, the N64 can define the X and Y separately, so you might have to get creative in some places. Shy Guy's Toy Box is a good example of this (green/yellow tile along base of rooms).
Every game will use this in varying degrees for various things. Star Fox 64 uses this extensively, especially when it comes to special effects. In these cases, a large triangle is created with the effect in the middle, only tiling once, and the completely-transparent edges are smeared to cover the rest of the triangle. When alpha is involved, there is a very easy fix. Create a new material by double clicking in any empty area of the Material list. The new Material is named Mat and has the default settings you see on textureless objects. Disable the Specular and Color channels and enable Transparency. Then, just stick this new material onto the object at the very bottom of the object's materials. This invisible material will prevent C4D from filling the empty space around the texture with gray matte. I'll explain more about the difference between Alpha and Transparency when I talk about gradients.
This will be all for now. As you can probably tell, there are still many topics for me to cover when it comes to working in 3D. Next we will begin the actual production process, starting with using cameras. I hope you keep practicing in the program. Feel free to link to screenshots of models you've ripped and fixed up so far.