Difference between revisions of "Creating a Minimap"

From Custom Mario Kart
Jump to navigation Jump to search
m
 
(36 intermediate revisions by 16 users not shown)
Line 1: Line 1:
==Introduction==
+
This page is a part of the '''Custom Track Tutorial'''. [[Custom Track Tutorial|Back to the main tutorial page]].
  
This guide is presented as several steps with alternate approaches; choose the methods that works for you.  
+
== Introduction ==
 +
This page will guide you through the process of creating a minimap model. The minimap, in-game, might look like an image, but it is actually a 3D model displayed from the top on the corner of your screen.
  
==Step 1: Creating a Minimap Model==
+
== Preparing the model ==
 +
To make your minimap model, you should usually start from the [[Solidity|optimized collision model]]; starting from the normal course model is also possible. Begin by making a copy of your track project and name it with descriptive name. Remove any meshes you don't want to appear on the minimap; like walls, fall boundaries, offroad and possibly shortcuts (it's up to you if you want to keep them). Try to keep only meshes that represent main road of the track. You might also want to include [[Objects|object]]s in your map model, such as red and green mushrooms from [[Wii Mushroom Gorge|Mushroom Gorge]]. For more information on this, check the [[KMP Editing|KMP tutorial]] and [[Object]].
  
You should be using either one texture or a few different textures exclusively for roads in your model. If not, edit your model or create a [[collision model]] so that they are; road textures in the wrong places can lead to things like driving up vertical walls and unintentional shortcuts.  If you want to include some shortcut paths that share textures with other parts of your model or include other "landmark" features to help with positioning objects, paths and checkpoints in your KMP, you will need to make a separate minimap model. These positioning landmarks should be removed when you release your level.
+
== Creating minimap using [[ANoob's BRRES Material Tool]] ==
 +
=== Step 1: Exporting the Minimap Model ===
 +
When you have a ready model you need to export the minimap model as a DAE file.
  
*'''SketchUp'''
+
The scale of the minimap model should be the same as for your [[KCL]] file. Save the output as <tt>map_model.dae</tt>.
  
[[File:MapmodelcreationSketchup.jpg|200px|thumb|Road surfaces selected in [[SketchUp]], then pasted into a new file.]]
+
=== Step 2: Creating the Minimap [[BRRES]] ===
 +
Import the file into [[ANoob's BRRES Material Tool|ABMatt]] using <tt>File</tt> &rarr; <tt>Import</tt>. If you see <tt>map</tt> bone under <tt>map_model.brres</tt> that means the model imported correctly.
  
: Select one instance of each texture used on your roads, then from the right click menu choose ''Select > All with same Material'', then ''copy''. Next go to ''File > New''. Select ''Paste In Place'' from the Edit Menu.  Next, delete any lines separating textures or holes in your map model to reduce the number of polygons.  If there are a lot of height variations on your road, it may be necessary to flatten your model to further reduce the number of polygons.  Search Google for a plugin that does this. <!--- I haven't been able to find it.  Someone post a link please. ---> Save as a new SketchUp file, then export as an OBJ file.
+
Save the file as <tt>map_model.brres</tt>. Your minimap should display correctly in-game now.
  
 +
== Creating minimap using [[CTools]] and [[Wiimms SZS Tools]] ==
 +
=== Step 1: Exporting the Minimap Model ===
 +
After you have removed everything that should not appear in the minimap (and possibly added extra stuff you want there), remove every material and export the model as an OBJ.
 +
=== Step 2: Creating the Minimap [[BRRES]] ===
 +
The process is similar to importing a course model in [[Creating a BRRES with CTools]] tutorial; however, you should check the "map model" option. Save the file as <tt>map_model.brres</tt> and overwrite the previous one if needed.
 +
=== Step 3: Fixing positions with Wiimms SZS Tools ===
 +
The BRRES file created in the previous step does not display correctly in-game; the map appears incorrectly and out of place. You must fix and center it using [[Wiimms SZS Tools]]. Use one of the commands (the first one is recommended):
 +
    wszst minimap --auto FILE
 +
    wszst normalize TRACK.szs --minimap
 +
:Where FILE can be a [[SZS]], [[U8]], [[BRRES]] or [[MDL0]] file and TRACK.szs is a [[SZS]] file. More details about the minimap command and the --auto option can be found on [http://szs.wiimm.de/opt/auto Wiimms SZS Homepage].
  
*'''SZS Modifier'''
+
:If you have used the bottom code and you got an error opening the [[SZS]] in [[CTools]] or [[SZS Modifier]] such as "Arithmetic operation resulted in an overflow", then you should try again using the top code.
  
[[File:MapmodelcreationSZSModifier.jpg|200px|thumb|Roads selected in [[SZS Modifier]].]]
 
:Load your SZS in SZS Modifier.  Click on the course_model for your level, which will open up a new window displaying your model.  Zoom in once the textures have finished loading.  On the right hand pane will be displayed all the of textures used in your model.  Holding the CTRL button, select only the textures used on your roads.  Next choose ''Export'' from the File Menu and save as an OBJ file. 
 
  
==Step 2: Importing the Minimap Model==
+
With the new file imported, your minimap should display correctly in-game now.
  
In the previous tutorials, we used the BRRES Editor to import our course model. While the BRRES ''is'' capable of creating a map model, the minimap will usually not be displayed under the player icons in the correct positions. Additionally, trying scale and position a BRRES Editor-imported minimap will also fail to maintain the correct position on the screen relative to the player icons.  So even if the minimap does line up, it usually won't be the right size. SZS Modifier ''will'' position the minimap correctly. However, SZS Modifier can't expand files, so your minimap is required to be fairly simple.
+
== Create minimaps with darker areas ==
 +
[[File:Multicolormapkoopabeach.png|200px|thumb|Multicolor minimap used in [[N64 Koopa Troopa Beach (zilly)]]. (Texture Method)]]
 +
A multishade minimap is useful to show things like offroad location and submarine paths.
  
It is recommended to use the BRRES Editor if you importing a minimap model with landmarks for KMP editing, then use SZS modifier to import a simpler minimap model for when you release the level.
+
==== With Vertex Colors ====
 +
Recommended method. You can paint vertex colors onto your model in [[3ds Max]], [[Blender]] or other advanced [[3D Tool]] and export your model as a DAE, preferably in the [[3ds Max]] format.
  
*'''BRRES Editor'''
+
If you do not own a 3ds Max software you can export the file as a FBX and convert it to DAE using [https://www.autodesk.com/developer-network/platform-technologies/fbx-converter-archives Autodesk FBX Converter 2013.3].
  
:Using the same procedure as when you [[Modeling_With_3D_Editor#Importing_Your_Model|imported your course model]], import the OBJ file you created in Step 1.  Click on the ''Map Model'' checkbox instead of ''Course Model'', then click ''Import''.
+
When [[#Creating minimap using ANoob's BRRES Material Tool|creating minimap using ANoob's BRRES Material Tool]] vertex colours will be imported and applied automatically.
  
*'''SZS Modifier'''
+
Alternatively you can import your model using other [[BRRES]] creation programs and manually replace the bones.
  
:First you will need a minimap from a large level, preferably Mushroom Gorge or Rainbow Road.  Open the map_model.brres file with SZS Modifier. Select ''Import'' from the File Menu. When prompted to disable culling, choose ''Yes''.  Import the OBJ file you created in Step 1.  If the model was imported successfully, your model will now be visible in the window.  Save the file.
+
==== With Textures ====
 +
Make a minimap model similar to the one described above, but instead of having no textures, it should have two: one for "regular" map and another for the darker one. Import it using CTools as course model (not map). Then, you need to replace the bones in your [[BRRES]] file.
  
:If it was unsuccessful, you will see an error message that says: ''The model is too complex to fit in the selected polygons. Select more polygons or reduce the model complexity.'' You will need to go back to Step 1 and simplify your map model.  
+
==== Replacing the bones with [[Brawlcrate]] ====
 +
*Open a map model from another ([[Nintendo]] or [[Custom Track|custom]]) track with [[Brawlcrate]] and export the three bones from the MDL0: "map" and the two children "posLD" and "posRU".
 +
*Now open your map model, rename the model from "course" to "map" and import the first bone over the existing one; name the first one "map" and then right click and select "Add New Child" twice (you can also use twice the sequence Ctrl+Alt+N); now replace these references, posLD first and posRU second, naming them accordingly.
 +
*The last thing is replacing textures. You only have to do this if you used the texture method. Otherwise, you are done. Create two 8x8 pixels images, one with white color and the second gray (any shade) or black; replace the "regular" map's texture with white and the other with gray/black in BrawlBox (both CMPR format).
  
==Step 3: Finding Minimap Position Values==
+
Now you can save and fix the positions with Wiimms Tools as described above, import the file in your track's SZS and test in-game. This can also be done to create minimaps with various colors (other than gray) for [[Battle Arena (Custom Track Tutorial)|battle arenas]]. Track maps cannot be colored as the game forces them grayscale.
  
The next step is to find the position values for your minimap. These values can be approximate; larger numbers mean the minimap will be displayed smaller. Skip to step 5 if you did not use SZS Modifier to create your map model file in Step 2.
+
== Extra ==
 +
=== Change the Minimap Colors ===
 +
[[Wii Layout Editor]] can change the colors for you. This will change the color of the map in your entire game.
 +
* Extract the "game_image" folder from Race.szs (including all subfolders, otherwise the program will not be able to open the file).
 +
* Open Wii Layout Editor.
 +
* Click "Open" and go to the "blyt" folder you just extracted.
 +
* Open "common_w40_map_set_position.brlyt".
 +
* On the left side, click the "+" next to "Brlyt".
 +
* Click the "+" next to "Mat1".
 +
* Click on "race_null".
 +
* On the left side, click on the numbers inside "BackColor".
 +
* You can either start typing in a value here or you can press "..." and choose a color.
  
*'''SketchUp'''
+
; With gradient
 
+
* Follow the same steps as above until you have clicked the "+" next to "Brlyt".
:Measure in meters from origin (where the red, green and blue axes meet) a bit farther than the farthest edge of your drivable roads in each direction. Write down these values and label them ''Left'', ''Down'', ''Right'' and ''Up'', in that order.  The ''Left'' and ''Up'' values should be negative if your model is centered on origin.
+
* Click on the "+" next to "RootPane" and click on "race_null".
 
+
* On the left side, find the "Vertex Colors" section, where there is a value for each corner of the minimap color.
*'''BRRES Editor/SZS Modifier'''
+
* You can change the colors for each corner of the minimap by clicking "..." next to each value.
 
 
:First, create a map model file using the BRRES Editor in step 2 even if you are using the SZS modifier technique in that step. Open that map model file with SZS Modifier, go to ''Tools -> Minimap Control'' and write down the settings.
 
 
 
 
==Step 4: Positioning the Minimap==
 
[[File:MapmodelcreationSZSModifierMinimapcontrols.jpg|200px|thumb|The Minimap Control interface in SZS Modifier.]]
 
Using SZS Modifier, open the map model your created with SZS Modifier in Step 2, go to ''Tools -> Minimap Control'' and enter the values you found in Step 3.
 
 
 
==Step 5: Importing to Your Level==
 
 
 
Finally, use SZS Explorer to import your new map_model.brres file into your level's SZS.  Test it in-game once you have your player start positioned to see if the minimap is positioned and scaled acceptably.  
 
 
 
==What's Next?==
 
Proceed to the [[Important_Stuff_(Custom_Track_Tutorial)|Important Stuff]] if you want to set up a cannon, import or edit objects to put in your level, or edit post effects to give your level different look. If not, go to directly to the [[KMP Editing]] article set up your player start, enemy routes and position objects in your level.
 
 
 
==Links==
 
  
 +
== Links ==
 
{{Custom Track Tutorial}}
 
{{Custom Track Tutorial}}
[[category:Tutorials]][[category:Custom Track Tutorial]]
+
[[Category:Tutorials]]
 +
[[Category:Custom Track Tutorial]]

Latest revision as of 17:28, 28 December 2022

This page is a part of the Custom Track Tutorial. Back to the main tutorial page.

Introduction

This page will guide you through the process of creating a minimap model. The minimap, in-game, might look like an image, but it is actually a 3D model displayed from the top on the corner of your screen.

Preparing the model

To make your minimap model, you should usually start from the optimized collision model; starting from the normal course model is also possible. Begin by making a copy of your track project and name it with descriptive name. Remove any meshes you don't want to appear on the minimap; like walls, fall boundaries, offroad and possibly shortcuts (it's up to you if you want to keep them). Try to keep only meshes that represent main road of the track. You might also want to include objects in your map model, such as red and green mushrooms from Mushroom Gorge. For more information on this, check the KMP tutorial and Object.

Creating minimap using ANoob's BRRES Material Tool

Step 1: Exporting the Minimap Model

When you have a ready model you need to export the minimap model as a DAE file.

The scale of the minimap model should be the same as for your KCL file. Save the output as map_model.dae.

Step 2: Creating the Minimap BRRES

Import the file into ABMatt using FileImport. If you see map bone under map_model.brres that means the model imported correctly.

Save the file as map_model.brres. Your minimap should display correctly in-game now.

Creating minimap using CTools and Wiimms SZS Tools

Step 1: Exporting the Minimap Model

After you have removed everything that should not appear in the minimap (and possibly added extra stuff you want there), remove every material and export the model as an OBJ.

Step 2: Creating the Minimap BRRES

The process is similar to importing a course model in Creating a BRRES with CTools tutorial; however, you should check the "map model" option. Save the file as map_model.brres and overwrite the previous one if needed.

Step 3: Fixing positions with Wiimms SZS Tools

The BRRES file created in the previous step does not display correctly in-game; the map appears incorrectly and out of place. You must fix and center it using Wiimms SZS Tools. Use one of the commands (the first one is recommended):

    wszst minimap --auto FILE
    wszst normalize TRACK.szs --minimap
Where FILE can be a SZS, U8, BRRES or MDL0 file and TRACK.szs is a SZS file. More details about the minimap command and the --auto option can be found on Wiimms SZS Homepage.
If you have used the bottom code and you got an error opening the SZS in CTools or SZS Modifier such as "Arithmetic operation resulted in an overflow", then you should try again using the top code.


With the new file imported, your minimap should display correctly in-game now.

Create minimaps with darker areas

Multicolor minimap used in N64 Koopa Troopa Beach (zilly). (Texture Method)

A multishade minimap is useful to show things like offroad location and submarine paths.

With Vertex Colors

Recommended method. You can paint vertex colors onto your model in 3ds Max, Blender or other advanced 3D Tool and export your model as a DAE, preferably in the 3ds Max format.

If you do not own a 3ds Max software you can export the file as a FBX and convert it to DAE using Autodesk FBX Converter 2013.3.

When creating minimap using ANoob's BRRES Material Tool vertex colours will be imported and applied automatically.

Alternatively you can import your model using other BRRES creation programs and manually replace the bones.

With Textures

Make a minimap model similar to the one described above, but instead of having no textures, it should have two: one for "regular" map and another for the darker one. Import it using CTools as course model (not map). Then, you need to replace the bones in your BRRES file.

Replacing the bones with Brawlcrate

  • Open a map model from another (Nintendo or custom) track with Brawlcrate and export the three bones from the MDL0: "map" and the two children "posLD" and "posRU".
  • Now open your map model, rename the model from "course" to "map" and import the first bone over the existing one; name the first one "map" and then right click and select "Add New Child" twice (you can also use twice the sequence Ctrl+Alt+N); now replace these references, posLD first and posRU second, naming them accordingly.
  • The last thing is replacing textures. You only have to do this if you used the texture method. Otherwise, you are done. Create two 8x8 pixels images, one with white color and the second gray (any shade) or black; replace the "regular" map's texture with white and the other with gray/black in BrawlBox (both CMPR format).

Now you can save and fix the positions with Wiimms Tools as described above, import the file in your track's SZS and test in-game. This can also be done to create minimaps with various colors (other than gray) for battle arenas. Track maps cannot be colored as the game forces them grayscale.

Extra

Change the Minimap Colors

Wii Layout Editor can change the colors for you. This will change the color of the map in your entire game.

  • Extract the "game_image" folder from Race.szs (including all subfolders, otherwise the program will not be able to open the file).
  • Open Wii Layout Editor.
  • Click "Open" and go to the "blyt" folder you just extracted.
  • Open "common_w40_map_set_position.brlyt".
  • On the left side, click the "+" next to "Brlyt".
  • Click the "+" next to "Mat1".
  • Click on "race_null".
  • On the left side, click on the numbers inside "BackColor".
  • You can either start typing in a value here or you can press "..." and choose a color.
With gradient
  • Follow the same steps as above until you have clicked the "+" next to "Brlyt".
  • Click on the "+" next to "RootPane" and click on "race_null".
  • On the left side, find the "Vertex Colors" section, where there is a value for each corner of the minimap color.
  • You can change the colors for each corner of the minimap by clicking "..." next to each value.

Links