Difference between revisions of "Modeling with 3D Editor"

From Custom Mario Kart
Jump to navigation Jump to search
(→‎Google Sketchup: deleted incorrect/irrelevant information (polygon rename in OBJ is Optional, not required and doesnt fit in this section))
(Adding some new info and trying to make this page more logical. I'll work on this page some more later.)
Line 6: Line 6:
 
== Using a 3D modeling program ==
 
== Using a 3D modeling program ==
  
If you have never made a 3D model before, it is recommended to use Google Sketchup 8, which is free and easy to learn to use.
+
If you have never made a 3D model before, it is recommended to use Google SketchUp 8, which is free and easy to learn to use.
  
=== Google Sketchup ===
+
==== Google SketchUp ====
 
You'll need the following downloads if you don't already have them:
 
You'll need the following downloads if you don't already have them:
* Google Sketchup: [http://sketchup.google.com/ Google Sketchup 8 Download]
+
* Google SketchUp: [http://sketchup.google.com/ Google SketchUp 8 Download]
 
* Obj exporter in the Plugins folder of GSU: [http://www.mediafire.com/?qh8hgo16ujvoi0h OBJ Exporter download].  
 
* Obj exporter in the Plugins folder of GSU: [http://www.mediafire.com/?qh8hgo16ujvoi0h OBJ Exporter download].  
  
 +
If you have never used Google SketchUp before, you should watch and follow along with some of the video tutorials found here: [http://sketchup.google.com/training/videos/new_to_gsu.html Google SketchUp Video Tutorials]
  
If you have never used Google Sketchup before, you can watch some of the video tutorials found here: [http://sketchup.google.com/training/videos/new_to_gsu.html Google Sketchup Video Tutorials]
+
==Creating Your Track in SketchUp==
 +
There are some important guidelines you should follow for the model to be Mario Kart Wii compatible:
  
 
+
*It is highly recommended to use the Simple Meters template. This is because 1 meter = 1 unit in Mario Kart Wii and it is easy to make accurate measurements using the tape measure tool in this template. 
Now, it is time to create the track using the information you learned in the video tutorials. However, there are some important rules not listed in the video that you must follow for the model to be Mario Kart Wii compatible:
+
* An ideal road should be about 4500m (15,000') across. This is the width of most roads in [[Fishdom Island]], [[Rooster Island]] and many other levels.  Narrow sections shouldn't be much less 2500m (8,000') across. If your model is too small or large you can use the scale tool to change its size.
 
+
*Boost pads can be easily made by creating drawing a flat shape on your track and applying a different texture.
* As a general rule, the road should be about 15,000' (or 4500m) across (you can use the Tape Measure tool to measure this, but make sure you are using the Simple Feet and Inches or Simple Meters template). This is the approximate width that an ideal road would have (for example, the width of the road at [[Fishdom Island]]). If the model is too small you will need to use the scale tool to make it all bigger.
+
* There are two options for creating trick ramps:  You can model it in your level or you can use an [[object]] like Mdush after importing.  To make your own, draw a triangle with a back between 200 and 500m vertically, and 1000 to 2000m from the back to front.  Use the pull tool to create the width. The width can be as much as the width of the entire road, or as little as 1500m. 
 +
* Jumps from trick ramps across gaps should be between 5000 and 6000m to allow jumping with out doing a trick.  Bots will usually fail the jump if it is more than 5500m.  
 
* The whole drivable road must be above the red and green axis in Sketchup. Mario Kart Wii enforces a fall boundary below these axis even if it is not in the course.kcl file. If you were to build a road on or below these axis you will respawn (be picked up by Lakitu) over and over again.
 
* The whole drivable road must be above the red and green axis in Sketchup. Mario Kart Wii enforces a fall boundary below these axis even if it is not in the course.kcl file. If you were to build a road on or below these axis you will respawn (be picked up by Lakitu) over and over again.
* The exporter below only exports the front (white) faces of the model. Make sure the white faces are pointing in the direction you want to see them. If they aren't, right click on them and click "Reverse Faces." Of course, if the faces are textured you cannot see which way they are facing, so click "Entity Info" to check which side(s) are textured, or go to "View => Face Style => Monochrome" which disable the view of textures, you can always put texture view back on. If you want a face to be visible from both sides, you will have to add depth to it.
+
* The recommended obj exporter only exports the front (white) faces of the model. Make sure the white faces are pointing in the direction you want to see them. If they aren't, right click on them and click "Reverse Faces." Of course, if the faces are textured you cannot see which way they are facing, so click "Entity Info" to check which side(s) are textured, or go to "View => Face Style => Monochrome" which disable the view of textures, you can always put texture view back on. If you want a face to be visible from both sides, you will have to add depth to it.
* Lines in Sketchup will not be visible in Mario Kart Wii; only faces appear.
+
* Lines in Sketchup will not be imported or visible in Mario Kart Wii; only faces appear.
* The OBJ file format does not support many of Sketchup's built in features such as camera animation, fog, shadows, or non-photo textures. These will not show up within Mario Kart Wii as they are controlled differently there. NEVER use solid colors unless they are an actual photo; they will appear black in-game.
+
*The OBJ exporter does not handle distorted textures very well.  So when lining up texture only use the green (rotate, scale, move) and red (move) pins. 
 +
* The OBJ file format does not support many of SketchUp's built in features such as camera animation, fog, shadows, and photo-wrapped textures. These will not show up within Mario Kart Wii as they are controlled differently there. NEVER use solid colors unless they are an actual texture; they will appear black in-game.
 
* To test the size and scale of your track in-game, use moon jump hacks (on Dolphin or with Riivolution and a Wii) or simply add solidity to the road portions of the track. You will also need to move the start position over the track. 1 unit in Mario Kart Wii (used within the KMP editor) is equal to 3.2808399 feet in Sketchup. But, it is actually more useful to use meters as the scale in Sketchup, as 1 meter in Sketchup is equal to 1 MKWii unit.
 
* To test the size and scale of your track in-game, use moon jump hacks (on Dolphin or with Riivolution and a Wii) or simply add solidity to the road portions of the track. You will also need to move the start position over the track. 1 unit in Mario Kart Wii (used within the KMP editor) is equal to 3.2808399 feet in Sketchup. But, it is actually more useful to use meters as the scale in Sketchup, as 1 meter in Sketchup is equal to 1 MKWii unit.
  
Line 51: Line 55:
  
 
If your model has transparent textures, you will need to order the polygons so that the transparent ones are last. This allows for objects behind transparent polygons to render. In the OBJ file, first put everything starting with v* outside polygons at the beginning of the file, in the same order as it first was. Then everything listed within the polygons start with f's that refer to the v* at the beginning. Now you can re-order them without corrupting the obj file. If you don't understand this, look here: [[Polygon order]]
 
If your model has transparent textures, you will need to order the polygons so that the transparent ones are last. This allows for objects behind transparent polygons to render. In the OBJ file, first put everything starting with v* outside polygons at the beginning of the file, in the same order as it first was. Then everything listed within the polygons start with f's that refer to the v* at the beginning. Now you can re-order them without corrupting the obj file. If you don't understand this, look here: [[Polygon order]]
 +
 +
Textures get flipped upside down (vertically) in-game. This doesn't really matter on a lot of simple tiling textures, but if your texture has printed text, complex patterns, or is vertically oriented, it will be very noticeable in-game. A good solution is to just work with your textures normally in SketchUp.  When you use the .OBJ exporter it generates a .MTL file (which can be edited with notepad) and a folder full of .png textures.  Open all the textures you need to fix and save them with a different name, add 'flipped' for example.  Then open the .MTL file and change the entries for all the textures you flipped to their new names.  Once you import your .OBJ into the BRRES editor, everything thing should be correct.  If you made a typo, you'll get an error message in red when importing, just go back and check that your .PNG file names match in both the folder and the .mtl.
  
 
== After The Model Is Done ==
 
== After The Model Is Done ==

Revision as of 18:53, 8 October 2011

Under Construction
This article is not finished. Help improve it by adding accurate information or correcting grammar and spelling.

This is part of the Custom Track tutorial.

Back to the main tutorial page

Using a 3D modeling program

If you have never made a 3D model before, it is recommended to use Google SketchUp 8, which is free and easy to learn to use.

Google SketchUp

You'll need the following downloads if you don't already have them:

If you have never used Google SketchUp before, you should watch and follow along with some of the video tutorials found here: Google SketchUp Video Tutorials

Creating Your Track in SketchUp

There are some important guidelines you should follow for the model to be Mario Kart Wii compatible:

  • It is highly recommended to use the Simple Meters template. This is because 1 meter = 1 unit in Mario Kart Wii and it is easy to make accurate measurements using the tape measure tool in this template.
  • An ideal road should be about 4500m (15,000') across. This is the width of most roads in Fishdom Island, Rooster Island and many other levels. Narrow sections shouldn't be much less 2500m (8,000') across. If your model is too small or large you can use the scale tool to change its size.
  • Boost pads can be easily made by creating drawing a flat shape on your track and applying a different texture.
  • There are two options for creating trick ramps: You can model it in your level or you can use an object like Mdush after importing. To make your own, draw a triangle with a back between 200 and 500m vertically, and 1000 to 2000m from the back to front. Use the pull tool to create the width. The width can be as much as the width of the entire road, or as little as 1500m.
  • Jumps from trick ramps across gaps should be between 5000 and 6000m to allow jumping with out doing a trick. Bots will usually fail the jump if it is more than 5500m.
  • The whole drivable road must be above the red and green axis in Sketchup. Mario Kart Wii enforces a fall boundary below these axis even if it is not in the course.kcl file. If you were to build a road on or below these axis you will respawn (be picked up by Lakitu) over and over again.
  • The recommended obj exporter only exports the front (white) faces of the model. Make sure the white faces are pointing in the direction you want to see them. If they aren't, right click on them and click "Reverse Faces." Of course, if the faces are textured you cannot see which way they are facing, so click "Entity Info" to check which side(s) are textured, or go to "View => Face Style => Monochrome" which disable the view of textures, you can always put texture view back on. If you want a face to be visible from both sides, you will have to add depth to it.
  • Lines in Sketchup will not be imported or visible in Mario Kart Wii; only faces appear.
  • The OBJ exporter does not handle distorted textures very well. So when lining up texture only use the green (rotate, scale, move) and red (move) pins.
  • The OBJ file format does not support many of SketchUp's built in features such as camera animation, fog, shadows, and photo-wrapped textures. These will not show up within Mario Kart Wii as they are controlled differently there. NEVER use solid colors unless they are an actual texture; they will appear black in-game.
  • To test the size and scale of your track in-game, use moon jump hacks (on Dolphin or with Riivolution and a Wii) or simply add solidity to the road portions of the track. You will also need to move the start position over the track. 1 unit in Mario Kart Wii (used within the KMP editor) is equal to 3.2808399 feet in Sketchup. But, it is actually more useful to use meters as the scale in Sketchup, as 1 meter in Sketchup is equal to 1 MKWii unit.


You can add your own textures to the track to let the OBJ exporter split your model in polygons based on textures and to change the way the texture is placed. How to change it is explained in the Texturing page. After your model is done and all textures are placed you can export you model with the OBJ exporter. The OBJ exporter is found under the File menu (not the Plugins menu!). It exports the whole model and textures to an OBJ file, and converts the textures to PNG.

All of BigOto2's track models are available on the Sketchup 3D warehouse: Fishdom Island and Volcanic Skyway are some of them. You can compare your track's scale to these other custom tracks.

Another 3D Model Editor

If you made your model in a 3D model editor that isn't Google Sketchup, you have to do it a little different. Just as in Sketchup you need to export it as OBJ file. Please be aware that you have to set your polygons, in 3DS Max MKWii polygons are equal to meshes; you can merge meshes using the collapse tool. The exported OBJ files are mostly not compatable with the SZS Modifier, but CTools fully supports it. So you have to import the models with CTools, which is recommended anyway as it can create BRRES files of any size. If you still want it in the SZS Modifier (to keep animated textures), open a CTools made BRRES with the SZS Modifier, export the model as OBJ and import in the BRRES file you want.

Importing Your Model

CTools Pack

Open the CTools Pack's BRRES Editor and click File-->New. The click File-->Import-->Wavefront OBJ. Use the '...' button next to the file path to open the OBJ model file.

If there is a problem with the OBJ file, a message should appear explaining what is wrong. If it is to do with materials, you can disable them using the Load Materials checkbox - but you'll have to import each texture manually later on. (the texture mapping goes OK, just the actual texture goes wrong) This should not happen if you use Google Sketchup and the plugin above. If it does, please send the OBJ file to Chadderz using Mediafire or post it on the Suggestions For Chadderz thread on the Mario Kart Workshop. This is for debugging purposes as CTools is still in development. Also, be careful not to flip through textures too fast with the arrow keys as this may also cause a crash.

If everything worked, more options should come available. If you are making a course model, be sure to check the Course Model box. DO NOT import map models here as the positioning will be glitchy (Chadderz is working on it). Normally you can leave all of the other settings alone. If any face(s) do not appear in game, you will need to reverse it in Sketchup so that the white face points in the direction that you want to see it from.

If your model is too big or small, use the scale feature to increase or decrease it's size. Typically a road in Mario Kart Wii is about 15000 feet across.

If your model appears rotated, or lying on its side, use the swap Y and Z check box to correct this problem. If you use Sketchup this will not happen, but any programs that use the Z axis for vertical will require this box to be checked.

After the OBJ model is imported, save the file as/over "course_model.brres" inside the SZS. If it is named anything else it will not appear in-game.

If your model has transparent textures, you will need to order the polygons so that the transparent ones are last. This allows for objects behind transparent polygons to render. In the OBJ file, first put everything starting with v* outside polygons at the beginning of the file, in the same order as it first was. Then everything listed within the polygons start with f's that refer to the v* at the beginning. Now you can re-order them without corrupting the obj file. If you don't understand this, look here: Polygon order

Textures get flipped upside down (vertically) in-game. This doesn't really matter on a lot of simple tiling textures, but if your texture has printed text, complex patterns, or is vertically oriented, it will be very noticeable in-game. A good solution is to just work with your textures normally in SketchUp. When you use the .OBJ exporter it generates a .MTL file (which can be edited with notepad) and a folder full of .png textures. Open all the textures you need to fix and save them with a different name, add 'flipped' for example. Then open the .MTL file and change the entries for all the textures you flipped to their new names. Once you import your .OBJ into the BRRES editor, everything thing should be correct. If you made a typo, you'll get an error message in red when importing, just go back and check that your .PNG file names match in both the folder and the .mtl.

After The Model Is Done

Once you finish your model, or if you want to test the scale of your model, follow the Solidity tutorial to make your track solid.

Links