Author Topic: Nintendo 64 Mapping Workshop  (Read 266265 times)

0 Members and 1 Guest are viewing this topic.

Offline Peardian

  • Hero Member
  • *****
  • Posts: 627
  • Busy busy
Re: Nintendo 64 Mapping Workshop
« Reply #15 on: January 08, 2010, 06:51:54 pm »
@Piranhaplant: That's very odd. I wonder if it's the version of the plugin you have. Send me an email and I'll give you the one I have. In fact, I'll send it to Trop, too, just in case.




Lesson delayed until I return to my dorm.
MM (10%) - SMA3 (33%) - DNS (0%)

Come check out the Nintendo 64 Mapping Workshop!

Offline Piranhaplant

  • Jr. Member
  • **
  • Posts: 60
Re: Nintendo 64 Mapping Workshop
« Reply #16 on: January 09, 2010, 02:29:56 pm »
Thank you, I got it working now.
Games I have mapped--Zombies Ate My Neighbors (SNES), Mario Party 3 (N64), Super Mario Bros Deluxe (GBC), New Super Mario Bros. (DS), Mario Kart DS (DS)

Offline Peardian

  • Hero Member
  • *****
  • Posts: 627
  • Busy busy
Re: Nintendo 64 Mapping Workshop
« Reply #17 on: January 11, 2010, 08:19:03 pm »
Now that the issues are settled and I'm back on campus for the start of the semester, I'll resume putting up lessons. I hope you've been getting used to Cinema 4D's controls!

5. Basic Scene Correction
The first step in fixing a scene is making sure you have everything in it. As I said before, many objects off-camera will not be included in the scene because of how the Nintendo 64 works. Carefully examine your newly ripped scene to see what is missing, because it is very rare that you will capture the entire room you want, complete with interactive objects. The procedure for collecting the rest of the scene is pretty simple. With the original scene open, go back to the emulator and move from your initial ripping location. Keep checking back with your rip as you scout the room for the missing objects and try to fit as many of them in your view as possible. It is always wise to check your rip while moving around, because while some things are obvious when they're missing (hole in the floor, or important object), often times small details will be missing as well, and these are the things that you will most likely pass over without noticing. When you have a good amount of the missing objects (or all of them if possible), create another rip of the scene. Open it and rescale it to match the original scene. A shortcut that I find helps me here is N~E~S, which will quickly light up and center the scene for you. (Remember that using N~E will not light up the final rendered scene, just the editor's view.) With the Live Selection Tool (the cursor), select the objects you need in either the viewer or object list. Because of how the VRML format works, there will be a separate object for each texture and for each separate moving part. Like many programs, you can hold Shift or Ctrl to select/deselect multiple objects. (In the viewer, shift lets you select multiple objects, ctrl deselects them. In the object list, shift can select a range and ctrl can select/deselect individual objects.) With the desired objects selected, Copy and Paste them (the standard ctrl+C and ctrl+V) into the original scene. You do not have to worry about selecting the materials, because relevant materials are automatically added with the model. Often, a texture will be used that wasn't included in the original scene. Cinema 4D will warn you of missing image files each time you render, so I suggest testing it out (ctrl+R) every time you add objects to a scene. If you get this error message, look for the texture in the VRML folder and paste it into your scene's folder. You will notice that the newly added objects are located outside of the NemuObject container. This is usually fine unless you intend on altering the whole scene by moving/rotating the container. Simply drag and drop the objects over the name of the object to put it in its hierarchy. Keep in mind that any object can have parent and children objects, not just containers. I'll describe uses for this in another lesson. Check the scene multiple times until you're sure you have everything in the room. Once you're done collecting everything, you can begin fixing the appearance.

The first thing you'll do to the scene is check out the materials, located in the list at the bottom of the workspace. There will be at least one material for each texture in the scene, plus duplicates and solid colors. They are arranged in the reverse order of the Objects list, with the top-left material being the one used by the lowest object on the list. Newly added materials are inserted at the top. Keep these in mind when searching through the list for a specific material. If you have an object selected, you may notice that some materials have a white box around them. The white boxes indicate all materials associated with the selected object(s). You can select materials by clicking them just like objects. Materials selected will have white names and will display their attributes on the right. The reason they are called "Materials" instead of "Textures" is because materials can posses a great range of properties and not just a single texture. These properties are divided up into Channels, which can be enabled/disabled in the Basic channel, which is part of every material. Two other channels used by every material are Illumination, which we won't worry about, and Assign, which shows a list of every object that makes use of that specific material. The only channels we'll be dealing with are Color, Alpha, and Transparency. I could explain what the other channels are used for, but it's easier if you just play around with them to find out by yourself. Anyway, let's take a look at an average material's Color channel...

[img width= height=]http://img193.imageshack.us/img193/7212/picture5oi.png[/img]

Along the top are tabs for each of the enabled channels. By default, Color is the only channel active for Nemu-made materials. Tabs are generally viewed one at time, but you can view multiple channels at the same time by right clicking the tab. The channels will stack up on top of each other in the same order as the tabs, allowing you to scroll between them. Just below the tabs is the material preview, a sphere by default. From this preview, which is displayed at the top regardless of which tab is selected, you can rotate the material (drag around with right click) or change the display shape. The first field in the actual Color channel is, believe it or not, Color. Not every material will have a texture assigned to them, but every material will have a color. You're given RGB sliders, but you can also manually enter numbers or click the color box to choose a color with the System color picker. Below the color field is the Brightness, which determines how bright the selected color is. Leave this at 100%, and make sure it is set to 100% for every new material you create. Below that is the texture, which is pretty straight forward. Clicking the arrow next to the filename brings up a list of options, such as Copy/Paste Channel, as well as a good amount of effects/shaders. Below the filename bar are the texture preview and the filter controls. The default is MIP, which is somewhat similar to N64's filter, but not close enough. It typically causes problems around edges and is best turned off. Below the texture field is Mix Mode, which controls how the texture is blended with the chosen color. Normal is the default, and simply covers up the image over the color. Don't worry about Add or Subtract, as it's most likely you won't need them. Multiply is the option you'll be choosing most, as it combines the image and the color together. This is how you'll be imitating vertex shading in your scenes. Mix Strength is another field you'll be leaving at 100% for everything.

Each time you start a new scene, you'll be going through each material one at a time to see how it is used. But first, you have to change the default settings that get in your way. Select all the materials with ctrl+A (make sure your cursor is over the material box, or you'll select all objects instead) and choose the Color channel in the Attributes panel if you haven't already. You will notice that it says "Material (# Elements) [_,_,_,_...]" above the tab, indicating how many materials you currently have selected, and fields with different values will say "<<Multiple Values>>". Click the filter type and change it to None, disabling the default blur for every material. If the field isn't showing up, this is because the topmost material has no texture. Deselecting it will let you change the field. With the filter off, it's time to deal with the spheres. Sure, they look nice, but they completely distort the image and make it hard to tell similar images apart. With all materials still selected, right click the material preview sphere and choose Plane from the list. This will make all the materials change to a flat square facing the camera, exactly what you need for working with texture images. Now, it is possible to change the default from a sphere, but I advise against this. Keeping the default as sphere will let you keep track of which materials you haven't dealt with yet when it comes to adding new models to the scene. You are welcome to choose other shapes besides Plane (even Sphere if you want) as long as the shape is meaningful to you and doesn't hinder your ability to recognize it. I sometimes use cube myself for materials that are blocky. With these new display settings chosen, it's time to go through each material one by one.

What you'll be looking for as you go through the materials are whether or not the material has a color and whether or not the texture has a special alpha image. And by color, I mean anything other than white, which Nemu gives as 254,254,254. The farther the color is from white, the more vertex shading the object has. A scene file will normally come with multiple materials using the same texture but different colors. Whenever you find a non-white color in a material, change the Mix Type to Multiply and see how it affects the scene. It could be subtle or drastic, useful or just wrong. I'll talk about advanced coloring tricks in a new lesson, so for now, leave the mix type on Multiply and move on to the next material.

Working with Alpha is a bit tricky and takes a little more effort. Depending on the game, you will either have a lot of alpha channels to work with or almost none. Paper Mario has alpha channels with almost every texture. In this case, you'll be looking for alpha channels that are anything but a solid black square. Sometimes it will be obvious, other times it will not. Let's say you've found a texture that you know to have a unique alpha channel, like any of Paper Mario's character sprites. To apply the alpha channel, start by going to the material's Basic channel and activating the Alpha Channel. Switch to the Alpha tab to see the options you're given. You'll notice a texture field and some check boxes. Load the alpha image into the texture field by either clicking the empty filename bar or the "..." button next to it. You should probably pick the Thumbnail view while browsing for the file so that you know which one to pick. When the file is chosen, the alpha channel is applied and... what's this? It's cutting out the character and showing the blank space around it? That's right. The alpha channels generated by Lemmy's plugin are inverted when compared to the system C4D uses (black for solid versus white for solid). Luckily, there's an option for that, so check the Invert option to set it right. Keep in mind that you won't have to do this for grayscale images or alpha channels obtained through Project 64. But, before you go on to the next material, take a look at the texture. Like with the color channel, the default texture filter is MIP. Be sure to change it to None before you move on.

I think this lesson has dragged on enough for one day, so I'll just cover one more thing. Not every model that comes in the scene will be important to you. Often times, you will have to delete floating 3D HUD elements that are getting in your way. And, depending on the game you're working on, you may or may not want to delete the main character's model (or the enemies present). Leaving the main character in is a good way to establish the scale of the level, but scale can also be established through the other characters and objects present in the room. If you do decide to delete objects, their materials will be left behind in the Material list. You can get rid of unused materials by right clicking any of the materials and selecting Remove Unused Materials. Similarly, you can remove materials with identical parameters (often a side effect of pasting in new models to the scene) by choosing Remove Duplicate Materials. It will look through all the active fields and combine the materials that are exact matches (Name field ignored). Using these frequently will keep you from wasting effort on materials that don't show up onscreen. You can manually delete these textures, but it is very tedious and error-prone. When manually deleting duplicate textures, you will also have to assign the correct matching texture to take it's place on the model.


That's all for now! I should mention that the steps mentioned above aren't set in stone. You can do them in any order you choose. There's nothing wrong with fixing up the existing scene before looking for missing elements. Pick a flow that works for you, and feel free to change it on a whim. For the next lesson, we'll be looking at tiling and handling special textures.
« Last Edit: January 12, 2010, 01:32:03 pm by Peardian »
MM (10%) - SMA3 (33%) - DNS (0%)

Come check out the Nintendo 64 Mapping Workshop!

Offline Peardian

  • Hero Member
  • *****
  • Posts: 627
  • Busy busy
Re: Nintendo 64 Mapping Workshop
« Reply #18 on: January 14, 2010, 12:09:18 am »
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.
« Last Edit: January 14, 2010, 12:16:20 am by Peardian »
MM (10%) - SMA3 (33%) - DNS (0%)

Come check out the Nintendo 64 Mapping Workshop!

Offline Peardian

  • Hero Member
  • *****
  • Posts: 627
  • Busy busy
Re: Nintendo 64 Mapping Workshop
« Reply #19 on: January 15, 2010, 10:42:19 pm »
Again, no questions, so I'll continue on. I hope you're all regularly checking this thread for new posts.

8. Model Modification and Scene Setup
Before I can begin about setting up scenes, I need to teach you some of the basics of editing models in Cinema 4D. On the far left side of the C4D workspace, you have a toolbar with some strange-looking buttons. These are not actual tools, but modes. The topmost button brings up a list of workspace layouts, such as Animation and UV Editing. You'll be using this later. For now, we're sticking with the Standard layout. (If you ever lose track of one of the default windows or change things around on accident, selecting Standard again will reset it.) Below that is a button for changing primitive shapes like Spheres and Cubes into editable models. It's not really very useful to you for mapping, but it's a good thing to know about just in case. Below those are the five different editing modes, which determine what you can select and play around with. The default mode, which you've been working with, let's you move and maniupulate whole objects. The mode below that lets you control the axis of an object, for when you want to manually change it. Below those are the three modes for working with the actual structure of the models: Point, Edge, and Polygon. With one of these turned on, you can select and modify the points, edges, and polygon faces of the active model (you'll have to use the list to switch between models). Keep in mind that unless you optimize, the polygons will not be connected when you try to do anything to them. Since you are trying to map things as accurately as you can, you won't be doing much modification, but it does come in handy at times, especially the polygon mode. I'll explain a use for them in a little bit.

Now, unless you have some extra problems to deal with, most of you will be ready to render out the room for use in a map. This is where the Camera object will come into play. You've been using it the entire time, but probably haven't been paying much attention to it. It is worth mentioning that you don't need a Camera object to render a scene because of the default Editor Camera, but it really helps. Notice the little white crosshair icon next to the Camera in the object list. This lets you know it is your active camera. Clicking it will deactivate it and put you in the Editor Camera. If for some reason this does not work (perhaps you have a version earlier than 10.5), you can switch to the Editor Camera using the Cameras menu over the viewer panel. The green wireframe movie camera you see is how C4D represents inactive cameras. You can have multiple cameras, and can move them around like normal objects. They do not have any real polygons, and they do not show up in renders. The number of cameras you want to use depends on the game you're mapping and how complex the environment is. (For Paper Mario, I only used one per room with few exceptions.) To create a new camera, go to the top menu and choose Objects -> Scene -> Camera. The new camera is always created at the exact view you're seeing, which means you can scout around for new locations in the editor camera and create them when you find a good spot. Also keep in mind that the new cameras do not activate automatically, so you can continue to move around in the editor camera without messing up the position you chose. It is important that you keep track of which camera is active, because you don't want to accidentally move one. Changes in position to the active camera cannot be undone with Ctrl+Z unless you are in Camera Tool mode beforehand, and chances are you won't be. Now that you're more familiar with the camera, let's put it to work.

One of the problems you might have noticed so far is that the camera has a Perspective view, so that nearer objects are larger and farther objects shrink away into the horizon. Even if you positioned the camera up above the map and looked down, things wouldn't quite be right, with taller objects obscuring areas around them. This is the same issue you'd encounter if you tried taking a screenshot in the game from a high up location. The solution is to change from this perspective mode. In the Cameras menu that has the Editor Camera option, you'll find a list of different view types. At the top of the list are Perspective and Parallel, the two modes you'll be using most. Everything below that is somewhat limited, allowing you to only pan the camera two-dimensionally. There is a Top, but as I said is rather restrictive. It is very easy to create a top-down view in Parallel mode. Choose the Parallel view and note how things change.If things look like they're being cut into like a cross-section, this is because the model is going past the location of the camera and thus out of range. To fix this, go to the editor camera and move it away from the scene using the Z-axis arrow. Notice that the view cone for a camera in parallel mode is in fact a box, because it does not distort with distance.

Now, let's talk about camera placement. Three-dimensional games are difficult to map because they are just that: they have three dimensions, and images have only two. Unless the game has a fixed viewing position like Paper Mario, it will be impossible to show every bit of detail in every room like you could with 2D games. Details will be have to be sacrificed, and it's your job as the mapper to decide which details will be cut. If you tried to show every corner of every room in a dungeon, the map would be large and confusing and nearly unusable, not to mention a big waste of space. Again, what you choose will depend heavily on the game and the complexity of the environment. If the game has a set view like Paper Mario, try to choose a view that is very similar to the average viewing angle in the room. This will sometimes involve placing the camera between two angles in order to show the greatest amount of detail in both sides of the room. If the room has an angle that changes drastically (such as 180 or even 360) then you might have to set up a second camera on the opposite side of the room as well. For games without this kind of camera direction, you'll have to be a little more creative. One view that is typically a good idea is the Top view, laying out the room like in a floorplan. The disadvantages to this are that you cannot see details obscured by objects directly below it and that you cannot see any of the (vertical) walls, which are implied by the abrubt edges of the floor. Another view suggestion is the "video game isometric" view, seen in games like Super Mario RPG. (This is not true isometric, which is rather difficult to pull off in pixels without getting very messy. I will simply be referring to the video game kind as isometric from now on.) This is done by setting the camera's pitch (P) rotation angle to -30 and the heading (H) to +/- 45 or 135. You can use -20 for the pitch if you want to give a little more attention to the wall. Regardless of which view you choose for the main layout, you will probably want to suppliment it with additional viewpoints. These other views can be at any angle you want, because their purpose is to show details that are hidden or obscured otherwise in the main view. The view doesn't even have to be parallel, it can be in perspective if it benefits the view. The extra views in Paper Mario were done out of necessity, but you can add in views just to show off the scenery, if you so desire. Ocarina of Time and Majora's Mask are both beautiful games, so you can bet I'll be adding in some renders of the scenery to help enhance the map.

For the purpose of this lesson, we'll pretend we have chosen an isometric view. You set up the camera and position it, but there's a problem. The walls (and ceiling) are in the way! The inside of the room is barely visible, if at all. Since Cinema 4D doesn't have a Backface Culling option for rendering, you'll have to find a way around it. Sometimes, you can just hide the models in the way, but this only works when you only have one view and the object doesn't wrap around to reveal the front side. To hide an object, double-click the two little dots next to the model's tags in the object list. The top dot controls visibility in the editor, and the bottom dot controls visibility in renders. Change both dots to red to put it completely out of sight. When hiding isn't an option, you'll have to resort to transparent materials. Create a new material with only the transparency channel (just like in the texture lesson) and apply it to any object that is obscuring your view with its backside. The Transparency will override the color of the materials below it, making the object invisible. This is the key difference between alpha and transparency. Since you don't want the entire object to be invisible, select the invisible material tag for each of the objects you applied it to and set the Side from Both to Back. Now the object will only be see-through when viewed from behind and solid in front. This will really come in handy for cylindrical rooms. And don't worry, it will show the entire object as transparent in the editor, but it renders fine. This is just a limitation on the editor's part.

With this taken care of, you're just about ready to push the button and export a final render. But, that's for next lesson. Until then, keep practicing with the program's controls and experiment with the new tricks you've learned. Also, set up any cameras you want to use in tomorrow's lesson on rendering.
MM (10%) - SMA3 (33%) - DNS (0%)

Come check out the Nintendo 64 Mapping Workshop!

Offline Peardian

  • Hero Member
  • *****
  • Posts: 627
  • Busy busy
Re: Nintendo 64 Mapping Workshop
« Reply #20 on: January 16, 2010, 07:27:42 pm »
9. Rendering To File
This is probably the lesson you've been waiting for. After today, you'll be ready to begin rendering and putting together your maps... almost. There are still more advanced things to teach you to make your map as accurate as possible, but some maps are simple enough that they are ready to go right now. To start with, let's talk about the process of rendering to file. Take a look at the main viewing area. You'll notice that there are vertical bars on the sides. These lines frame your shot. Now press Shift+R. A separate window pops up and a render of the view is created. This is the window from which you can export renders to file. Notice that it doesn't render anything that falls outside the vertical bars. Notice also that the render is quite small and a little rough. These are the default render settings, which you will have to change for every new scene.

To change the render settings, use ctrl+B to bring up the Render Settings window. There are a good number of categories on the side, but you'll only be dealing with the top three. In the General category, go to the Antialiasing field, where it says Geometry. What this means is that the edges of models are antialiased, but the textures are left pixelly. This is most apparent when the textured object is very small. Click it (or scroll down on your mouse wheel while over the field) and change it to Best. Now the textures will be antialiased as well, giving you the best quality. Now switch to the Output category. This is where you control the dimensions of the final render. Put in the dimensions you want the render to be and ignore the rest of the fields. You'll notice that the letterboxing will automatically adjust as you enter the numbers. In Cinema 4D, the view is controlled primarily by the horizontal size and the vertical space is cropped based on the height. Because of this, you'll need to frame the scene horizontally first before messing around with the output size. You can pick the W/H sizes in any order, but it's generally easiest to start with Width. After you've chosen the size, switch to the Save category. This is where you'll control the output filetype and its settings. The default is TIFF, and unfortunately there doesn't seem to be any way to change it. Because you can't do much with TIFFs, click it and change it to QuickTime PNG. (Scrolling is not quicker for this.) Most of the time, you'll want the render to have an alpha channel, so check both the Alpha Channel and Straight Alpha boxes. While the first option alone will give you alpha channels, the second option makes C4D recalculate the colors affected by transparency so that edges aren't darkened. If you want to see the difference it makes, make to renders to compare them. I guarantee you'll prefer the straight alpha version. Those are the only settings you need to deal with. You can change these settings in any order, but just be sure that you change them all.

Picking dimensions isn't all that easy. Because the games are 3D, the rooms are going to be much larger than in 2D games, especially in action platformers. Depending on the game, there could be a lot of small yet important details in addition to huge sprawling rooms. Even if you pick a scale at which the main character would be 16x16 pixels, you could still end up with renders that are over 1000 pixels in both dimensions. This brings up another issue. Cinema 4D has no magical way to render multiple scenes with the same scale. Because of this, you have no way to ensure that two different rooms are rendered to the same scale. This is where the Reference Sphere comes in. The Reference Sphere is a method I came up with to keep all your rooms to the same scale when editing together your map. The concept is simple. A perfect sphere, when viewed from any angle, will always be circle. You can make a Sphere object from the primitive object list (hold down on cube icon). Position it somewhere away from the models so that you can easily remove it later. Since it is very hard to work with spheres that are all white, I recommend coloring them. Don't use textures, as they can obscure the edges of the sphere. You can give textureless objects a matte color by selecting the object and looking at its Basic attributes tab. Change the Use Color option from Off to Always and choose a color. Bright, vivid colors work the best. The more similar the colors are, the harder it is to distinguish them when they're overlapping. I typically just cycle with bright red and cycle through the spectrum. The default radius of 100m is a bit large, I suggest changing it to 50m. Make sure that the spheres have the exact same size in every scene. When you put together your separate renders while making the map, you can then identify the smallest sphere and shrink the other renders so that their spheres match. This way you can not only keep scale consistant from room to room, but from map to map, if you so desire. As you work with your renders, you'll find that the scale you want will always yield the same sized reference sphere. As you pick render dimensions, try to make one room get as close to the scale you want as possible, readjusting the width of the image multiple times until you get it right. After that, you can make the rest of the rooms have spheres that show up 10-20 pixels larger. Remember, it is always better to have the render be a little too big than a little too small. If you have multiple cameras and want to use different dimensions for each of them, I recommend renaming the cameras to include the desired sizes. If you're not concerned with scale for these alternate viewpoints, you don't need to include a sphere in the view. Keep in mind that perspective views will start to distort with narrow ratios, so you might want to use a standard 4:3 ratio for those.

As I said before, you use Shift+R to render the current view to the Pictures window, from which you can save it to a file. The menus at the top also let you disable/enable the RGB channels and view the alpha. The Save Picture As... option is located under the File menu. It is important to keep your renders organized just like your rips. I suggest a folder for each separate map you plan to make, containing all the renders for that map. As an example, here is how I have my Paper Mario folder structured: Paper Mario (exported/compressed maps go here) -> Raw Files -> Area Name Folder (renders and raw map file). Obviously, every person does things differently, so choose a method that works best for you.

That's it for this lesson. I apologize if it seems a bit jumbled, I can't seem to keep focused tonight. From this point on, the lessons will be about more advanced techniques, like how to deal with gradients and shadows. These lessons don't really have any particular order, so it would benefit you the most to request issues you want handled first. I'd also like to see some of the renders you all have produced after this lesson. I'm can still answer questions and provide feedback on your WIP renders. If you're having an issue with the scene that you want help on, please include a screenshot of how the game renders it so I know exactly what you want. I'm looking forward to seeing your progress!
MM (10%) - SMA3 (33%) - DNS (0%)

Come check out the Nintendo 64 Mapping Workshop!

Offline Trop

  • Hero Member
  • *****
  • Posts: 849
Re: Nintendo 64 Mapping Workshop
« Reply #21 on: January 18, 2010, 10:59:23 am »
OK I'm still having the same problem Piranhaplant was having.  The WRL dumps but nothing dumps with it.  And I don't know if this has anything to do with that but CD4 still won't accept my WRLs.

Offline Piranhaplant

  • Jr. Member
  • **
  • Posts: 60
Re: Nintendo 64 Mapping Workshop
« Reply #22 on: January 18, 2010, 11:00:23 am »
Here is a map I ripped from Super Mario 64.  I was pretty much guessing when it comes to scale, angle, background, etc. so suggestions would be appreciated.

View Image
Games I have mapped--Zombies Ate My Neighbors (SNES), Mario Party 3 (N64), Super Mario Bros Deluxe (GBC), New Super Mario Bros. (DS), Mario Kart DS (DS)

Offline Trop

  • Hero Member
  • *****
  • Posts: 849
Re: Nintendo 64 Mapping Workshop
« Reply #23 on: January 18, 2010, 05:42:40 pm »
No, it's perfect.  Why can't I do that, this is so embarrassing.

Offline Peardian

  • Hero Member
  • *****
  • Posts: 627
  • Busy busy
Re: Nintendo 64 Mapping Workshop
« Reply #24 on: January 18, 2010, 08:21:49 pm »
@Piranhaplant: That's a nice rip, but there's one major problem. Super Mario 64 falls into the "unmappable" category. Try pasting two VRML rips taken with the camera facing opposite directions and you'll find that they don't match up at all. If the models aren't aligned so that the Y axis is exactly up, then chances are you can't map it. Even so, games like this are good to practice on. The list in the first post shows which games are possible to map and which aren't, in case you want to tackle one of those. The list is missing a lot, so if you think of a game you want to try, go for it and let me know how it goes. The more games on the list, the better.

@Trop: Send me an email with all the specs of your emulator. I'm assuming you already put in the plugins I sent you. (You need both parts.)

Since there were no suggestions, I'll go ahead with a small lesson.

10. Shadows and Overlapping Planes
In many games, if not most of them, shadows are handled with flat objects that follow along under the characters. When you try to render them in scenes, however, they either don't show up or look chopped to pieces. This is because the N64 puts them in the same exact location as the ground and renders the shadow on top. This can occur with other flat objects, such as when they create texture gradients. (I'll explain this in another lesson.) The fix for this is really easy. Simply select the shadow object(s) and go to the Coordinates panel and add 0.001 to the Y position. This will put it high enough for C4D to distinguish which is on top while still making it look as though it is perfectly flat on the ground. Calculation is really easy, though negative Y positions can sometimes throw you off. A position of -30 will become -29.999 and a position of -56.348 will become -56.347. If the shadow still doesn't show up, you either moved it in the wrong direction or it wasn't exactly in the ground (happens with slopes). Just move it as little as possible until it becomes visible. This can also affect vertical objects, as well. Tubba Blubba's Castle had cracks and windows decorating the wall. In order to get things like these to show up, move them along the X and/or Y axis instead. Very rarely, an object will use this kind of thing but on 3 or more sides, and you'll have to adjust the position between different cameraviews. Keep in mind that vertical objects like this won't show up at all in top views, so don't bother with them unless you want to render another view.

That's all for now. Again, I'm open to requests for the content of the next lesson.
MM (10%) - SMA3 (33%) - DNS (0%)

Come check out the Nintendo 64 Mapping Workshop!

Offline JonLeung

  • Administrator
  • *****
  • Posts: 3629
Re: Nintendo 64 Mapping Workshop
« Reply #25 on: January 19, 2010, 07:24:02 pm »
I could use that image of Super Mario 64's Peach's Castle grounds if I could get around to making a front page feature image...or something else recognizeable and iconic of the N64 era...

Offline Peardian

  • Hero Member
  • *****
  • Posts: 627
  • Busy busy
Re: Nintendo 64 Mapping Workshop
« Reply #26 on: January 19, 2010, 09:36:20 pm »
That would make a good one, yes. The ironic part being that Super Mario 64 is one of the Nintendo 64 games we can't map in this fashion. :P


No lesson for today. Unless one of you requests a specific lesson (like gradients or UV damage) then I'll just pick them in whatever order I feel like.
MM (10%) - SMA3 (33%) - DNS (0%)

Come check out the Nintendo 64 Mapping Workshop!

Offline Trop

  • Hero Member
  • *****
  • Posts: 849
Re: Nintendo 64 Mapping Workshop
« Reply #27 on: January 20, 2010, 06:21:38 pm »
Well I'm slowly learning.  Some games do a lot better then others, Jet Force Gemini is just crap.  As for some stupid questions; Can you move PJ64 saves or savestates into 1964 and why does 1964 continusly complain about the lack of a controller pack?  This might have something to do with my computers lack of ability to read .chm help files.  I don't know why that is.

Offline Peardian

  • Hero Member
  • *****
  • Posts: 627
  • Busy busy
Re: Nintendo 64 Mapping Workshop
« Reply #28 on: January 20, 2010, 09:33:14 pm »
So, Jet Force Gemini is unmappable? I'll mark it on the list. Yes, there is a way to move from PJ64 back to 1964. Read the last part of Lesson 3 closely. As for the Controller Pack, I'm guessing it's tied to a setting or something, I don't know. It doesn't matter much, though, because you have Save States.
MM (10%) - SMA3 (33%) - DNS (0%)

Come check out the Nintendo 64 Mapping Workshop!

Offline Peardian

  • Hero Member
  • *****
  • Posts: 627
  • Busy busy
Re: Nintendo 64 Mapping Workshop
« Reply #29 on: January 21, 2010, 11:46:27 pm »
Trop clarified with me over email that it is mappable, there are just some issues with objects or something. Anyway, another small lesson for today.

11. Cheat Codes
This isn't much of a lesson as more of a tip. If you're mapping a game like an RPG and you want to make progress faster or want to reach areas of the level ahead of time, cheat codes will come in handy. (For Paper Mario, I regularly had to use cheats to get past blocks and partner-specific obstacles ahead of time.) Both emulators have cheat code menus, with lists that may or may not differ between the two. In 1964, you can bring up the cheat menu with ctrl+C. Selected cheat codes are highlighted in red and denoted with an asterisk (*). The check box at the top controls whether the cheats are on or off. This way you can choose a set of codes you like but only activate them when you want to. Be sure to read any notes that come with the cheats, as you can't just turn them all on for some games. Another important thing to keep in mind is that the cheats checkbox will stay activated if you close the emulator, so if you don't want the codes activated when you start the game up, turn off the cheats before closing the emulator.

Another thing I should mention is that it sometimes pays to have different versions of the game. Cheat codes depend on the region version, and some codes that you really want might only be available on the Japanese version, for example. I haven't tested for duplicating save files between versions, but I imagine it's possible. So, before you toss away the additional versions of the game you stumbled across, check the cheat lists to see if there is something of value. And remember to test these things before you come to rely on them. The PAL version of Star Fox 64 ("Lylat Wars") apparently had a "have all medals" cheat. When I tried it, I only got four random medals. So remember, test everything, because it's not always 100% reliable.


I'd like to remind you all that the game list in the first post is far from comprehensive, so I encourage you go out and test new games and experiment with the games on the list that need more research, such as the Castlevania games.
MM (10%) - SMA3 (33%) - DNS (0%)

Come check out the Nintendo 64 Mapping Workshop!