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

0 Members and 3 Guests are viewing this topic.

Offline DarkWolf

  • Hero Member
  • *****
  • Posts: 640
Re: Nintendo 64 Mapping Workshop
« Reply #45 on: January 24, 2010, 05:13:40 pm »
Just FYI Hexen mostly uses sprites for enemies and objects, so you that might explain the lack of stuff in your rips.   Also, as far as Puyo Puyo Sun goes, neither the Saturn nor Arcade versions have any 3d in them, so I doubt the N64 version would either.

Offline Trop

  • Hero Member
  • *****
  • Posts: 848
Re: Nintendo 64 Mapping Workshop
« Reply #46 on: January 24, 2010, 07:59:38 pm »
Here's what my Hexen rips looked like.
I've played all the way through Puyo Puyo Sun 64 and I can't think of any 3D objects either.  But maybe I'll use PJ64's tile ripper to rip some sprites.

Offline Peardian

  • Hero Member
  • *****
  • Posts: 627
  • Busy busy
Re: Nintendo 64 Mapping Workshop
« Reply #47 on: January 24, 2010, 08:01:11 pm »
@Tropicon: The output scene has whatever the N64 has. The real question is whether or not the camera trick will actually cause it to load more of the content without causing some to disappear because of zoom.

@Revned: I wasn't paying much attention to the filesizes, but yeah, it seems a bit much for the first/simplest map. I can get it down to 1.8 MB with a good-quality jpeg, and the only place you can notice the loss is in the course preview icon/minimap. I'll ask Jon what he thinks.
MM (10%) - SMA3 (33%) - DNS (0%)

Come check out the Nintendo 64 Mapping Workshop!

Offline JonLeung

  • Administrator
  • *****
  • Posts: 3695
Re: Nintendo 64 Mapping Workshop
« Reply #48 on: January 26, 2010, 07:38:55 am »
As we all know, I've been a big advocate of PNGs and have detested JPEGs because of the latter's havoc-wreaking compression.  But that applies mostly to predominantly 2D sprite/tile-based maps, and I suppose it makes less difference when mapping 3D games where textures are already distorted due to viewing angle/perspective and scaling.

I think I would still prefer the PNG image, if it's under a certain size.  6 MB may be larger than most, but it's not huge.  Perhaps we should establish some kind of baseline, like 10.0 MB or larger, where high-quality JPEGs would be acceptable alternatives.

If you insist that I replace your map with the JPEG you already sent me, Peardian, then I will do that, the 10.0 MB thing is just what I'm currently thinking would be a nice round number to go by as an easy rule-(or-guideline-)of-thumb.
« Last Edit: January 26, 2010, 07:41:23 am by JonLeung »

Offline Maxim

  • Hero Member
  • *****
  • Posts: 974
Re: Nintendo 64 Mapping Workshop
« Reply #49 on: January 26, 2010, 12:41:43 pm »
It might be good to offer both PNG and JPEG. JPEG with colour subsampling off gives pretty good quality with pixel art at low compression rates.

I think the biggest problem with 3D maps is that there is no 1:1 scale, so there's no way to get the right detail/size tradeoff. Seadragon type zoomers are a decent tradeoff, I think (but actually use more disk space/bandwidth overall).

Offline Peardian

  • Hero Member
  • *****
  • Posts: 627
  • Busy busy
Re: Nintendo 64 Mapping Workshop
« Reply #50 on: January 28, 2010, 04:54:26 pm »
And that's where we have to make a choice. Keep this in mind when you're putting together your maps. The more detail you show, the bigger the image and the bigger the filesize. As for my Mario Kart 64 maps, I'm going to wait until I finish the first cup or so before deciding. Anyway, I think it's about time for the next lesson. Some of you have probably been looking forward to this.

12. UV Editing
Because Nintendo 64 emulation is far from perfect, you will often find errors in texture mapping on models, which is stored as UV Data. Sometimes, this can be resolved with a little working of the Length/Tiles attributes of the material tags themselves, but many times you will have to get down and dirty and tackle the data itself. Cinema 4D has a good set of tools for creating/modifying UV data, accessible through the BP UV Edit layout. (BP stands for BodyPaint 3D.) To change layouts, click the button below the Undo button to bring up a little list of layouts. When you select BP UV Edit, you'll see a new set of panels and toolbars designed specifically for working with UV data. The old Materials list has been changed to a vertical list and squished a bit to make room for the Objects list, which now sits beside it at the bottom. The normal Attributes panel now has tabs for UV editing tools and a color palette for painting. Since you don't want to be messing with any of the textures themselves, the only tab you'll be interested in is the one labeled UV Mapping, which is itself divided up into five tabs. The first three are geared towards creating new UV maps, while the last two are for modifying existing maps. These are the two you'll be dealing with for the most part. The big empty area on the right is the canvas, where the UV maps are displayed.

Now let's look at the new toolbar. Almost all of the tools you see are for painting on the models, with the paintbrush tool selected as the default for this layout. Below the painting tools are the different selection modes, similar to the normal toolbar. The difference here is that the Polygon and Point edit modes are specific to UV maps, meaning they will let you select faces and points of the UV mesh instead of parts of the actual model geometry. How does this work? UV data is represented as a mesh of triangles, similar to that of the model itself, but spread out in various formations. There is always one triangle for each face of the model, though many times there will be overlap. The orientation, size, and proportions of the triangle affect how the texture is spread out on the polygon and are not tied to the real shape of the corresponding model face. The larger the triangle is one direction, the more times the texture will tile. The smaller, the more the texture is stretched. Up on the texture is not necessarily up on the model, so you might have to poke around to find the point you want. If you don't quite understand how UV maps work, the best way to learn is to just go to random models and play around. (Make sure you undo the changes!) Something you'll discover is that UV data can get quite messy, especially when curves come into play. Keep in mind that UV meshes will only show up when either UV Polygon Edit or UV Point Edit are selected.

The way UV Damage comes about is from either the Nemu64 plugin messing up some of the numbers when exporting to the VRML scene, or the emulator misinterpreting the data to begin with. A common manifestation of this is the UV map for a flat object being at the wrong scale when exporting, leading to crazy closeups on things like character sprites. Usually when this is the problem, the UV map will be a perfect rectangle that just isn't the right size. I had to deal with this throughout all of Paper Mario, and didn't figure out the solution until Chapter 2. With the model selected, go to the UV Commands tab under UV Mapping. Look for the button that says Fit UV To Canvas and press it. This will automatically rescale and reposition the current UV map to the exact size of the texture, which is often what you want. If any triangles are selected, the change will be limited to the selection.

Note that this solution will not work for every scaling issue. Sometimes, the desired size is larger than the texture, like when you have a texture that shows half of a symmetrical object. If this is the case, you will have to Transform it some. The controls for this are located under the tab of the same name. You are given five fields and an Apply button. The first two fields control changes in position for X and Y, with a value of 1 being 100% of the texture space, 0 for no change, and decimals for everything in between. The next two fields control changes to scale, using a similar range with 1 being 100% of the original size (no change). Negative numbers and numbers over 1 are perfectly fine, but make sure you know what you are doing before you start putting in values. The last field controls Rotation, which should be fairly obvious. Pressing the Apply button will make the change happen, but it will not reset the values. If you double the width of a triangle and then want to move it, be sure to change the Scale back to 1, or else your triangle will double in size again when it moves. This takes some getting used to, so you'll probably be using ctrl+z a few times.

Using the example I mentioned above, let's fix a UV map so that it goes from displaying half a tree to showing the whole tree like it should. After using Fit UV to Canvas, you'll end up with a perfect square made of two triangles. Go to the Transform tab and set the X Scale to 2.Upon hitting Apply, the square will stretch out to twice its original size, just like you want it. However, it will still be positioned in the center of the canvas, putting one half of the tree in the center and cutting up the other half on the sides. You want the triangles to align with the left edge of the texture area. To do this, set the X Scale back to 1 and the X Move to 0.5, which will slide the mesh over half the size of the texture, right where you want it. Again, this will not work for all problems. If you'd rather eyeball it instead of using math, there are the Scale and Non-Uniform Scale tools located at the bottom of the toolbar. To use them, hold your cursor near the point you want to base the transformation on and drag. If Polygon Edit mode is selected, the little orange cross in the middle of each triangle can also be used as the anchor.

If the problem involves one or more faces being messed up on an otherwise good model, you have no choice but to go in and grapple with the points. This kind of UV damage is caused by one or more of the points of the face's UV triangle being placed in the wrong spot. To fix this, you first have to identify which triangle is the problem. Selecting the face on the model itself is the easiest way. After that, it's just a matter of finding the misplaced point and putting it where it should go. Sometimes you can use the position of other triangles to figure out where it goes, other times you will just have to guess. If you want points to snap to each other, you can enable the option in the Attributes tab with the Move Tool selected. That's all I can really say about this, since it will be different for every model in every game. Just use your eyes and make it look right. It doesn't have to be 100% perfectly accurate, because the rip isn't perfect to begin with. The main thing is to get it to look right within the context of the map.

And so ends this lesson. Hopefully, this will help you all to solve any of your UV problems.
« Last Edit: January 28, 2010, 04:56:45 pm by Peardian »
MM (10%) - SMA3 (33%) - DNS (0%)

Come check out the Nintendo 64 Mapping Workshop!

Offline Trop

  • Hero Member
  • *****
  • Posts: 848
Re: Nintendo 64 Mapping Workshop
« Reply #51 on: January 29, 2010, 03:54:44 pm »
My camera trick works!  If a game gives off only a little area per rip you can use a camera control code to get more.  Here, in A Bug's Life, my initial rip was small and full of holes.  But my second rip, with the camera held far away, picked up the whole damn level!  I circled the original area in white.  Of course the detail is gone but if you wanted something to draw over or a reference for scale and accuracy a this trick really works.
« Last Edit: January 29, 2010, 03:55:18 pm by Trop »

Offline Peardian

  • Hero Member
  • *****
  • Posts: 627
  • Busy busy
Re: Nintendo 64 Mapping Workshop
« Reply #52 on: February 01, 2010, 09:14:08 pm »
I see, looks like the game makes use of low-poly models for far away views. Yes, as you've said, it's good for references and such but lacks detail. Now, onto lesson that requires more effort and brainwork.

13. Advanced Texture Techniques
Even with all the effort you've put into fixing up the scenery, there's still a chance that it still doesn't look quite like it should. That's because some of the effects the Nintendo 64 utilizes require advanced tricks to pull off in Cinema 4D. This section isn't easy, so read over it several times if you have to and practice at it. The tricks covered in this lesson are compound textures and gradients.

Some of you might have noticed that the amount of textures given to you with the rip is greater than the amount of textures used in the scene. This is because the N64 can assign two different textures to the same object, having the images mix on top of each other like when you set the color to Multiply. In order to figure out which materials are meant to have two textures, take a look at the Objects list. See how each model is named something like "Nemu_85D42EA_0_35"? There is actually a reasoning behind these names. Obviously, they start with the name of the plugin. The next set of numbers and letters you see is actually the name of the texture assigned to it, as you can see by quickly comparing the filenames. For objects that don't have textures assigned to them, this spot simply has a 0. Normally, the next spot you see is also a 0. This is actually the name of the second texture, but it is usually left empty. Any object that uses two textures will have two full texture names. Because of this, you can do a quick check for compound textures by seeing if the Object name column is wider than normal. The last number is simply the model number from the scene, starting at the top with 1.

So how do you go about doing this? You'd think you could slap on a second material and choose a setting, but it's not that simple. First, choose the object's material and click the dropdown arrow to the left of the filename. As you've probably already discovered, this will bring up a whole assortment of commands and built-in textures. What you want is the shader named Fusion, located between Filter and Layer. This effect lets you combine two textures in a variety of ways, including an option to use a mask. When you select it, the texture will go black, but don't worry. Click the black box to go to the Fusion's settings. You'll see a new set of options, including three texture fields. The Base Texture field has already been filled with the original texture you created the Fusion over. To add the second texture, just drag one in from the folder or use the file selector. The default mix mode is Normal, so the new bitmap will simply sit on top of the old one. Fix this by changing it to Multiply. (Don't forget to turn off the MIP filter for the new texture if that's what you want.) Now, you have the two textures mixed. For some textures, like the lava in Paper Mario, this is exactly what you need. But if the textures were to be combined in a 1:1 scale like this, why not make them combined in the first place? The truth is that most combined textures will in fact not be at the same scale. (For an example, see the painted walls in Clock Town.) Since you can't choose a scale or anything from the Fusion, what can you do? This is where you take advantage of another shader, the Projector. Open the dropdown for the Blend Channel and select it from the Effects category. This lets you control the mapping of the texture independently of the materal tag used. Click the seemingly-unaffected texture to be taken to the Projector's settings. The options you're given are very similar to that of a normal material tag, even down to controls for seamless tiling. Since we want the texture to follow the UV map of the model, change the projection from Sphere to UVW Mapping. The next step is to change the Length/Tiling fields. But to what size? This depends on the situation. Look at the game to see if you can figure out what the proper ratio is. Often, it will be something simple like 2:1 in one or both dimensions. If you're having trouble figuring out the exact size you need, do a texture rip in PJ64. This is in fact the only thing Texture-named files are good for, as they will show any results of texture fusion to the proper scale. (This is how I discovered it, when ripping the whale's blush for Lava Lava Island.) Comparing the size of the rip to the original size of the texture can help you figure out the proper ratio. If you want to see some examples of my work using double-textures, look at... pretty much all of Lava Lava Island. That place is filled with it.

The next trick is Gradients. Color gradients are used throughout all N64 games due to vertex shading. With a lot of effort, you could recreate all of the shading in a scene exactly. However, as you'll see, this would require an equally large amount of material duplicates. For starters, let's handle textureless objects that make use of gradients. Gradients on the N64 can not only be in the Color channel, but in the Alpha channel as well, as you see with things like shiny glass or rays of light. For the sake of simplicity, we're going to assume our test subject is a spherical object that the game shows as dark blue on the bottom and fading up to a lighter blue. Start off by going to the object's material and selecting the color channel. Open the dropdown list and choose Gradient, which sits near the middle just above Noise. You're given the default black-to-white, left-to-right gradient. Click it to bring up the options.

At the top of the gradient options is the gradient bar itself, which is where you can define and move around the colors from which the gradient is created. Unlike some other graphics programs you may have used, this gradient bar is fine with only having one defining color and gives you little diamond points between colors to control influence in either direction. Please leave this alone unless you are trying to create complex gradients. Below the bar is the Type of gradient, with the default being a simple horizontal sweep called 2D - U. (Vertical is called 2D - V.) These types are good in themselves, but they only apply to the space of the texture, meaning they are controlled by things like UV maps. Since the model you're working with doesn't have one, (or if you want to override it), you'll be choosing the type called 3D - Linear. (See bottom for a separate method to use on these types.) This creates a gradient from a pair of points in space, allowing you to define it across a specific area of the model or the model as a whole. The only limitation is that it is only a line, and thus you need multiple gradients if you want to shade something in a more complex way. Before you get to setting the point, check the Space field at the bottom of the options. This controls the reference on which the endpoints are based. The default is Object, which means the points are based on the center of the object using the texture. This is pretty useful when you want to apply the same gradient to multiple objects, but can get frustrating when you want to create the same gradient across walls and such made of multiple objects. For this, you'll want to select World, which bases the points on the absolute center of the scene. I personally use the World space the most, but it's up to you. Once you've decided the space to use, it's just a matter of finding the endpoints. You can switch to Point mode and use the Selection tool to find the coordinates of specific points to base the gradient on. If you want to apply the gradient across an entire object's height/width, you can just use the size of the object to help speed things up. If you plan on using the World space, you will have to find the coordinates of points every time you create a new gradient. For our sample object, let's say it is 120m tall, a decent size for a character or collectible. Start by picking the proper colors for the gradient, pulling colors from emulator screenshots to get the best result. Next, we'll say that we want to use World space. To pick the coordinates, start by changing the X start/end points back to 0, since the default is +/-100. (You can't imagine how many times you will forget to change them and be lost as to why your gradient is acting weird.) With the object selected, choose Point mode and pick a coordinate you want to use. Since the gradient is going from top to bottom, you can pick either the highest point or the lowest point. From the coordinates you are given for the point, take the Y value and enter it into the Start Y field (middle column). We'll say it's located at a nice value of 25. If you already know the size of the object, you can already figure out that the End Y value will be 145 (25 + 120). And just like that, you've created a gradient across the object. (If we were using Object space, the values would simply be -60 and 60.) It's up to you to figure out how to wrangle the gradients to fit your needs. Remember, you can set gradients for the Alpha channel in this same way.

Now, what happens if you combine these two tricks? Yes, you get a Fusion with a Gradient as the Blend Channel, which is exactly what you'll need for vertex shading more often than not. The only difference here is that you're a bit on your own when it comes to choosing the proper colors. Materials always come with some kind of color assigned to them, which is guaranteed to be used by at least one vertex on the model, often at one of the end points. For the other color, you'll pretty much have to guess and use trial-and-error, unless you're lucky enough to be working with a color that features pure white as one of its colors, from which you can draw a close approximate of the other end color. Something you can do for these kinds of gradients that you can't do otherwise is make use of 2D - U/V. This is used when the particular gradient you're seeking only applies itself in the context of the image and in a uniform matter. If you want the gradient to repeat itself over and over after the endpoints, select the Cycle option. Other than that, it's the same process.

There are some things that I should mention about Gradients. As I've mentioned before, the N64 achieves gradients through vertex shading. This means that changes will only occur from point to point and not anywhere in between. Because of this, you can be sure that all your gradients will start or end at the location of a point or edge (gives center between two points, when 2/3 of the vertices in a triangle have the same color). Another thing to mention is that many maps will have complex vertex shading, which usually can't be recreated with a simple line. Sometimes, you can get away with using one of the alternate gradient types like 3D - Spherical. If not, there is nothing wrong with creating multiple copies of the gradient material with different endpoints and applying them to polygon selections. If you are really keen on getting the greatest accuracy you can muster, you can very well create a separate gradient material for each individual face of an object, though this takes a considerable amount of time and effort. It all depends on how much work you're willing to put into the map.

Now, it's time to finally address those troublesome gradient texture changes that you see in places with lots of nature. These are always accomplished by having two near-identical polygons placed in the same location, each with a different material and often a different UV map. The way they accomplish this is by simply having one of them gradually change from solid to transparent through vertex shading. To imitate this, simply lift one of the identical models off the surface by 0.001m, so that one is always rendered above the other, and then apply a gradient in the Alpha channel. Remember, white is solid and black is transparent, but you can invert it. There is an alternative method to this, which is to use what could be called mask gradients. A new material is created with only the Alpha and Transparency channels, which is then put on top of the other materials to cut away the unwanted areas. This works because of the difference between the two channels. The Transparency channel controls how the material is see-through, like glass, while the Alpha channel controls the opacity of the material itself, like cutting holes. Because of this, it is possible to have transparency of an object that fades through a gradient in the alpha channel. Since this makes the material completely invisible by itself, it's a tad difficult to work with, so leave the Transparency channel disabled until you set up the gradient the way you want it. Remember that while the Transparency channel is disabled, everything that shows as solid black is what will be made transparent. This method is about the same as making an alpha gradient on the material, except that it works really well when you want to apply it to multiple objects with varying proportions. This is because of what you can do with Texture Axis mode.

To get to Texture Axis mode, click the button on the bottom of the left toolbar that looks like a checkerboard sitting on black arrows. With this mode, you can control the positioning of texture projections that aren't UVW Map. When you have an object and one of its materials selected, you are shown a yellow grid representing the space of the texture. Since the default is Sphere, you will usually see a large yellow sphere centered on the object. This sphere can be moved, scaled, and rotated just like a real object, and it will change shape depending on the Projection mode selected. This is what determines the space for 2D - U/V gradients when UV maps aren't involved. The projection you'll most likely want when working with this technique is Flat, which gives you a 2D plane to work with. Rotate it, scale it, and move it as you like, and note how it affects the gradient on the model. Ultimately, it is up to you on how you want to work your gradients, though chances are you'll be using a little of everything in order to make your maps look just right.

And that's all for advanced texture techniques. I hope I made sense, as this isn't something you can easily explain with a few words. If you want examples on how I used these in Paper Mario, combined textures started at Chapter 5 and gradients started back as far as Chapter 2, particularly in Dry Dry Ruins. The next lesson will be the last lesson I have on fixing up your maps, unless someone comes up with a topic that they want me to cover. As always, keep practicing and post any progress/improvement you've made.
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 #53 on: February 03, 2010, 10:03:06 pm »
We're almost to the end of the workshop in terms of planned lessons. Keep at it!

14. Dealing with Backfaces
Since all games restrict your camera movement to some degree, game developers can get away with not modeling out every side of every object, simply because you'll never see it. The more restricted your view is, the less they have to model. This is fine inside the game, but presents a bit of a problem when it comes to viewing it freely. You will often see objects that are halfway inside walls or ceiling, and thus have no back. If you don't do something about them, they will end up looking inverted or like paper cutouts. Even if you decide that you won't deal with these issues for your maps, I highly recommend following along anyway, as these techniques can help you with other issues you might encounter.

The first method is pretty simple. Let's suppose you have a rock that is protruding from the wall, with no backside so that it looks like a hole in the wall when viewed from the other side. A good method to deal with this is to color the backsides black. To do this, simply create a new material with no channels, unless you have a solid black material already handy, and stick it onto the object. Then, click the material tag and set the Side to Back. The whole object will still show solid black in the editor, but when you render the scene it will only show up on the back. If you plan to have a black background behind the map, the black backside will mingle with it and enhance the edge of the room. It will also give more of a cross-sectiony feel to your map, where objects that extend past the walls are chopped off. Even if you decide you will be using a colored background, it will still give a feeling that there's an obstacle there.

But what if the object is missing more than one side? If, say, the column you're dealing with has only half of the model done and the top is missing, or a wall is cutting through the middle of it, it will look very thin and hollow when viewed from any angle that allows you to see over the top, even with the backsides colored black. The solution to this is to make some of the missing polygons yourself. First, you'll want to make a copy of the object. Simply Copy and Paste to create a duplicate in the same exact position. Now, with the clone selected, switch to either Point or Polygon mode. You can work in either one, though Point mode will let you see the points easier when adding to the model. To create new polygon faces on an object, you use the tool called Create Polygon, which can be found under the Structure menu. (You can also use the shortcut keys M~E.) The way tool works is that one point of a polygon is created with each click. If there is no point present where you click (don't worry, it has snap settings) it will create a new point. Once you've defined the third point in the face, you can click the last point again to solidify it. You can create a polygon with as many sides as you want, but it's best to stick with triangles. You don't need to fill in every single hole of the model, just the areas around corners that would reveal the flatness. After you create the new polygons you want, switch to Polygon mode (if you're not in it already) and highlight only the new faces you've created using the Live Selection tool. Then choose Selection -> Invert from the menu (or U~I) to switch the selection to all the faces of the original model (as there are typically a lot more of them). Delete them and return back to Model select mode. Deleting faces alone will still leave their points behind in the newly created model, but you can get rid of them with the Optimize function. The only thing left to do now is to replace the clone's material with the solid black one. Voila! You've now given the object more a convincing shape in addition to plugging up its holes. But what if the object in question is made up of multiple models? As you've probably discovered, you can't create polygons across two separate objects. Luckily, there's an easy fix for that. Select all the objects that you want to patch up and choose Function -> Connect to create a new model out of them. The original models are unharmed, so no copying and pasting is needed. The combined model will have multiple materials assigned to it, but you'll be taking them off anyway to replace with the pure black texture.

Sometimes, you will have areas where paths and objects stick out through the wall where you are not supposed to see it. If this occurs in a location that you plan on giving a black background, there's an easy way to cover this up, and that is to extend the sides of the wall outward. Start by once again selecting the wall or pieces of the wall that you want to extend and either copying or connecting them to create a duplicate. Then, switch to Edge mode. Remember, this mode lets you select the lines between points (the edges of polygons). With the Live Selection tool, highlight the edges you want to extend, which will usually be the top and possibly one of the sides. Make sure you don't get any of the lines on the inside of the model. Use ctrl+click to deselect edges if you have to. Next, choose the Extrude tool from the Structure menu, which can also be accessed with a single press of the D key. This tool extends polygons and edges in the direction they are facing, either independently or in the group they are selected in. For our purposes, you will only need to click and drag a little to the right to extend the wall outwards a bit. It might not look like it will do anything for you, but you can stretch the newly created polygon faces by dragging the edges. Without losing the selection of the edges, switch to the Move tool and move the edges away from the wall. And, just like before, delete the old polygons from the clone and paint it black. You now have something to cover up the messy outside of the room. To see examples of this in action, look at my Mt. Lavalava map. I had to cover up all the tunnel exits and the backs of the curvy walls.

Now, what happens if the designers were lazy and simply placed a full model used elsewhere into the ceiling or wall? If your camera is placed behind a wall that has, for example, a half-submerged statue, it would be misleading and a bit confusing to show the whole statue floating out just beyond the boundary of a room. You can fix this through the use of Gradients. To handle such an issue, you can create a new material with transparency and alpha channels and put a gradient in the alpha channel. Like in the previous lesson, when we colored and masked objects, you will be creating a gradient that essentially chops off everything past the wall through the use of transparency. Doing this is a matter of choosing proper coordinates for the gradient endpoints and setting the color transition as tiny as possible (put the two color pegs as close to each other as you can and make sure the endpoints are close to each other). If the wall you're working with isn't at a 90-degree angle, you can use the Extrude tool on the wall to help you pick coordinates. Since this will leave the inside of the model exposed as well, you can throw on a black texture on the backsides like with the other models. (Just make sure that the transparent material goes on top or you'll see the black insides.)

Now, suppose you've done all this and all the loose ends have been patched up, but you still have a problem. That pillar or statue or lattice of rafters is in the way of the room, making it difficult to see. You have a couple of options to deal with this if you so choose. One option is to hide the object completely. This is fine for decorative things hanging from the ceiling. But for things like pillars, this could make the map misleading and potentially leave holes in the floor. The other option you have is to make it semi-transparent. But instead of going through the trouble of making duplicate materials and messing with the transparency channel and assigning the materials, there is an easier way. Find the object(s) in the Object List and right click it to bring up a bunch of options. Under the CINEMA 4D Tags category, pick the one with the eye, labeled Display. This lets you control a handful of options that would normally be controlled by the material or the program settings as a whole. The option we're interested in is the one that says Visibility. This has the same effect as using a basic transparency channel. When you've chosen a percentage you want, give it a quick render. You'll notice that you can see the backsides inside the object. To fix this, simply put a completely transparent material on it, assigned to the backside. You can use this same technique if you want to show hidden objects. If the object you're working with is too complex and still doesn't look good with the backfaces hidden, you can simply render the objects in a separate image and deal with them when you're putting together the map.


And that's it as far as fixing up your scene is concerned. However, one thing I would like to emphasize about this is to get creative. I used black as the color for covering up things here, but you can use any color you want. Practice with these techniques and experiment. By tweaking and combining methods I've described in this workshop, you can potentially overcome problems that I haven't covered here. Cinema 4D is a powerful tool, and there is more than one way to do many things, with no real "right" way. I haven't played all the N64 games out there, so there are probably issues I've never come across. If you discover one of these problems and discover a way to overcome them that isn't covered here, share it with us.

Past this, the only lessons left are ones about prettifying your rips and requests. Again, ask any questions you have and share with us your progress.
« Last Edit: February 03, 2010, 10:08:08 pm by Peardian »
MM (10%) - SMA3 (33%) - DNS (0%)

Come check out the Nintendo 64 Mapping Workshop!

Offline Trop

  • Hero Member
  • *****
  • Posts: 848
Re: Nintendo 64 Mapping Workshop
« Reply #54 on: February 07, 2010, 04:31:48 pm »
*sigh* humiliation.  Everything was going fine until a few days ago I decided to screw with the ucode in Lemmy's plugin.  Now I can't get Ogre Battle 64 to work at all.  Other games work fine, but no matter how I try to change or save the ucode OB64 always crashes either on start up or as soon as I try to dump any VRML.

Offline Peardian

  • Hero Member
  • *****
  • Posts: 627
  • Busy busy
Re: Nintendo 64 Mapping Workshop
« Reply #55 on: February 14, 2010, 12:36:42 pm »
I sent Tropicon another copy of the plugin. Yes, please don't mess with it, as you'll probably regret it. :P


As I said before, we're approaching the end of my lessons for this workshop. But keep in mind that this is still a workshop, so it will continue to go on even when I've finished my planned lessons. Having trouble with some aspect of making your maps? Post them here and I'll help you out. The lessons from here on out are focused on improving the quality of your renders and making use of them, as I've already given you everything you need to know for making a basic map.


Expect the next lesson in a day or so. I look forward to seeing your work.
MM (10%) - SMA3 (33%) - DNS (0%)

Come check out the Nintendo 64 Mapping Workshop!

Offline Trop

  • Hero Member
  • *****
  • Posts: 848
Re: Nintendo 64 Mapping Workshop
« Reply #56 on: February 14, 2010, 09:40:25 pm »
The bugs are too intense, I'm going to have reinstall 1964.  Fortunately that's no progress lost, my saves weren't 15 minutes into OB64.

Offline Peardian

  • Hero Member
  • *****
  • Posts: 627
  • Busy busy
Re: Nintendo 64 Mapping Workshop
« Reply #57 on: February 17, 2010, 11:31:45 pm »
I wish you luck with that. You could keep the safe files when reinstalling, though.

15. Artistic Renders
So, 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.
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 #58 on: February 19, 2010, 09:20:44 pm »
This lesson is rather short, and you'll see why.

16. Shadow Catcher
Here's another render I did using the same scene setup as last time.
[img width= height=]http://img14.imageshack.us/img14/6566/catchy.png[/img]
What's this? There's a shadow in the render? No, it's not a trick, that's an alpha transparent version of the shadow from the scene, and it was done using the Shadow Catcher plugin. To install a plugin, simply place it (uncompressed) in the Plugins subfolder of Cinema 4D and restart the program. I'm not going to teach you how to use it, because the website I linked to also has a complete tutorial for it, complete with lots of very helpful pictures. However, I will teach you some tricks and limitations of it.

For starters, the default shadow created with the plugin is completely solid. If this is too dark for you, you can always control the opacity of the shadow through the transparency channel. Since the plugin has to be applied to an object as a material, the object will affect the scene. In order to minimize it's impact, you can use a Compositing tag to stop it from casting its own shadows or affecting AO. Now, the plugin does have limitations. If you compare the shadows, you'll notice this new one isn't nearly as fancy. This is because the the shadow is created from the shape of the shadow from the light, not taking into account GI, AO, or other lights. In fact, each light in the scene will cause the material to react, which will create multiple full shadows. Because of this, you can really only have one light source in these scenes. Because of this, area lights/shadows are your best bet if you want any kind of realistic shadow. It's a neat plugin, so try messing around with it. It tells you to turn off the color channel in the tutorial, but you don't have to. Mess around with the channels to see what you can create.


There's only one more lesson that I have planned, and after that the workshop will be driven entirely by you. As always, I'm here to assist you with anything and answer questions. I look forward to seeing your work!
MM (10%) - SMA3 (33%) - DNS (0%)

Come check out the Nintendo 64 Mapping Workshop!

Offline Trop

  • Hero Member
  • *****
  • Posts: 848
Re: Nintendo 64 Mapping Workshop
« Reply #59 on: February 21, 2010, 07:08:36 pm »
« Last Edit: February 21, 2010, 07:09:35 pm by Trop »