Difference between revisions of "Creating a Minimap"

From Custom Mario Kart
Jump to navigation Jump to search
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 work for you.  
+
==Introduction==
 +
This page will guide you through the process of creating a minimap model. The minimap, ingame, might look like an image, but it's actually a 3d model displayed from the top on the corner of your screen.
  
An alternative method exists [[BrawlBox Tricks#Creating_a_Minimap|Here]], if you do not have access to a Minimap large enough for your new Minimap to fit into.
+
==Using CTools and Wiimms SZS Tools==
 +
===Step 1: Creating a Minimap 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. To do this in [[SketchUp]], make a copy of your original SKP (SketchUp file) and name it with a descriptive name. In your new file, remove any and all meshes that should not appear in your minimap ingame; this includes walls, offroad sections, fall boundaries and possibly shortcuts (it's up to you if you want to make them appear in your minimap or not). Leave only the models which represent the main road. You might also want to include [[Object]]s in your map model, such as red and green mushrooms from Mushroom Gorge (kinoko); for more information on this check the [[KMP Editing|KMP tutorial]] and [[Object]].
  
= Minimap Creation =
+
After you've removed everything that should not appear in the minimap (and possibly added extra stuff you want there), delete every texture from SketchUp's material window, leaving everything with the blank default material. Export the OBJ the same way you exported the course model OBJ.
==Step 1: Creating a Minimap Model==
 
  
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 glitches such as driving up vertical walls and unintentional shortcuts. If you want to display 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.  
+
===Step 2: Importing the Minimap Model===
 +
It is recommended to use the [[CTools Pack#BRRES Editor|CTools Pack BRRES Editor]] to import your map model. The process is similar to importing a course model, as we did in the [[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.
  
The [[SketchUp]] method is recommended for creating a minimap with landmarks or a minimap with reduced complexity.
+
===Step 3: Fixing positions with Wiimms SZS Tools===
 
+
The BRRES file created in the previous step does not display correctly ingame; 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):
*'''SketchUp'''
 
 
 
[[File:MapmodelcreationSketchup.jpg|200px|thumb|Road surfaces selected in SketchUp, then pasted into a new file.]]
 
 
 
: 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. If you are creating a map model with landmarks, you can select the surfaces you want to add and paste them into your model the same way. If you haven't already, select your entire model, right click, and then  ''explode'' all components and ''convert all curves to polygons''. Next, delete any lines separating textures or holes in your map model to reduce the number of polygons. Save as a new SketchUp file, then export as an OBJ file.
 
 
 
*'''SZS Modifier'''
 
 
 
[[File:MapmodelcreationSZSModifier.jpg|200px|thumb|Roads selected in [[SZS Modifier]]. Notice that SZS Modifier mirrors the perspective in this view. This will not affect your level in any way.]]
 
: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. Look at the right-hand pane. It displays 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==
 
 
 
[[File:MinimapwithlandmarksforKMPediting.jpg|200px|thumb|A minimap with landmarks, viewed from the KMP Editor of SZS Modifier. The thin white lines are low barrier walls in the level. Using landmarks, you can place objects near, on top of, or behind the barriers with precision.]]
 
 
 
In the previous tutorials, we used the [[BRRES Editor]] to import our course model. While the BRRES ''can'' create 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 and it will be difficult to adjust.  SZS Modifier ''will'' position the minimap correctly. However, SZS Modifier can't expand files, so your minimap is required to be fairly simple.
 
 
 
It is recommended to use the BRRES Editor when importing a minimap model with landmarks for KMP editing. Use SZS Modifier to import a simpler minimap model for when you release the level.
 
 
 
*'''BRRES Editor'''
 
 
 
: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''. 
 
 
 
*'''SZS Modifier'''
 
 
 
:First you will need a minimap BRRES file from a large level that contains a lot of vertex space, such as Mushroom Gorge. 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.
 
 
 
: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.
 
 
 
==Step 3: Finding Minimap Position Values==
 
 
 
The next step is to find the position values for the view region of your minimap. These values can be approximate; larger numbers will make the view region larger and the minimap smaller. Skip to step 5 if you did not use SZS Modifier to create your map model file in Step 2. Skip to step 4, if you use [[Wiimms SZS Tools]] to find automatically good positions.
 
 
 
*'''SketchUp'''
 
 
 
: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.  Make the ''Left'' and ''Up'' values negative, assuming origin is near the center of your model. If you're not sure which direction is which, go to ''View > Toolbars > Views'' and activate the Views Toolbar. Click on the house icon labeled ''Top''. This will orient your perspective so that the top of the screen is ''Up'', etc.
 
 
 
*'''BRRES Editor/SZS Modifier'''
 
 
 
:Go back to Step 2 and create a map model file using the BRRES Editor, even though you used 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.]]
 
*'''SZS Modifier'''
 
:Open the map model you created with SZS Modifier in Step 2, go to ''Tools -> Minimap Control'' and enter the values you found in Step 3.
 
 
 
*'''Wiimms SZS Tools'''
 
:Wiimms SZS Tools can automatically define good values for the minimap view region with a well centered minimap. Use one of the commands
 
 
     wszst minimap --auto FILE
 
     wszst minimap --auto FILE
 
     wszst normalize TRACK.szs --minimap
 
     wszst normalize TRACK.szs --minimap
:Where FILE can be a [[SZS]], [[U8]], [[BRRES]] or [[MDL0]] file and TRACK.szs is a [[SZS]] file. This can also be done if other steps for positioning the minimap failed. More details about the minimap command and the --auto option can be found on [http://szs.wiimm.de/opt/auto Wiimms SZS Homepage].
+
: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].
  
 
: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.
 
: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.
  
==Step 5: Importing to Your Level==
+
With the new file imported, your minimap should display correctly ingame now.
 
 
Finally, use SZS Explorer to import your new map_model.brres file into your level's SZS.<br>Test it in-game once you have your player start positioned to see if the minimap is positioned and scaled acceptably.
 
 
 
= Colored Minimap =
 
==Create Colored Minimap==
 
 
 
Wii Layout Editor can change the color for you. You'll need to extract the game_image folder from Race.szs (including all subfolders).
 
Open Wii Layout Editor.
 
Click Open and go to the 'blyt' folder you just extracted
 
Then open common_w40_map_set_position.brlyt.
 
On the left side, click the + next to "Brlyt"
 
Then click the + next to "Mat1".
 
Then 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.
 
 
 
{{youtube-box|tutorial|OlkstNmKM4w}}
 
 
 
==Create Multicolor Minimap==
 
  
 +
==Create minimaps with darker areas==
 
[[File:Multicolormapkoopabeach.png|200px|thumb|Multicolor minimap used in [[N64 Koopa Troopa Beach (Zilla)]].]]
 
[[File:Multicolormapkoopabeach.png|200px|thumb|Multicolor minimap used in [[N64 Koopa Troopa Beach (Zilla)]].]]
 
A multicolor minimap is useful to show things like offroad location and submarine paths.
 
A multicolor minimap is useful to show things like offroad location and submarine paths.
  
To create one, first using CTools, import your minimap model as "Course model"; your model must have two texture; one for "regular" map and another for the other.
+
*Make a minimap model similar to the one described above, but instead of 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).
 
+
*Open a map model from another ([[Nintendo]] or [[Custom Track|Custom]]) track with [[BrawlBox]] and export the three bones from the MDL0: "map" and the two children "posLD" and "posRU".
Open with [[Brawlbox]] any map model and export these three things: Bones ("map") and the two references ("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: with Paint create two 8*8 images, one with white color and the second grey (any shade) or black; replace the "regular" map's texture with white and the other with grey/black in BrawlBox (both CMPR format).
Now open your map model, rename the model from "course" to "map" and import first the Bones, rename them "map" and then right click and select twice "Add New Child" (you can also use twice the sequence CTRL+ALT+N); now replace these references, posLD first and posRU second.
 
  
The last thing is replacing textures: with Paint create two 8*8 images, one with White color and the second Grey (any shade) or Black; replace the "regular" map's texture with White and the other with Grey/Black (both CMPR format).
+
Now you can save, 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 grey) for [[Battle Arena (Custom Track Tutorial)|battle arenas]]. Track maps cannot be colored as the game forces them grayscale.
  
Now you can save, import the file in your track's SZS and test in-game.
+
==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).
 +
*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.
  
=What's Next?=
+
==Next==
Proceed to the [[KMP Editing]] article set up your start positions, checkpoints, enemy routes and objects in your level.
+
With your minimap working, proceed to the [[KMP Editing]] article to set up your start positions, checkpoints, enemy routes and objects in your level.
  
 
{{Custom Track Tutorial}}
 
{{Custom Track Tutorial}}
 
[[category:Tutorials]][[category:Custom Track Tutorial]]
 
[[category:Tutorials]][[category:Custom Track Tutorial]]

Revision as of 04:51, 8 November 2016

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, ingame, might look like an image, but it's actually a 3d model displayed from the top on the corner of your screen.

Using CTools and Wiimms SZS Tools

Step 1: Creating a Minimap Model

To make your minimap model, you should usually start from the optimized collision model; starting from the normal course model is also possible. To do this in SketchUp, make a copy of your original SKP (SketchUp file) and name it with a descriptive name. In your new file, remove any and all meshes that should not appear in your minimap ingame; this includes walls, offroad sections, fall boundaries and possibly shortcuts (it's up to you if you want to make them appear in your minimap or not). Leave only the models which represent the main road. You might also want to include Objects in your map model, such as red and green mushrooms from Mushroom Gorge (kinoko); for more information on this check the KMP tutorial and Object.

After you've removed everything that should not appear in the minimap (and possibly added extra stuff you want there), delete every texture from SketchUp's material window, leaving everything with the blank default material. Export the OBJ the same way you exported the course model OBJ.

Step 2: Importing the Minimap Model

It is recommended to use the CTools Pack BRRES Editor to import your map model. The process is similar to importing a course model, as we did in the 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 ingame; 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 ingame now.

Create minimaps with darker areas

Multicolor minimap used in N64 Koopa Troopa Beach (Zilla).

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

  • Make a minimap model similar to the one described above, but instead of 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).
  • Open a map model from another (Nintendo or Custom) track with BrawlBox 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: with Paint create two 8*8 images, one with white color and the second grey (any shade) or black; replace the "regular" map's texture with white and the other with grey/black in BrawlBox (both CMPR format).

Now you can save, 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 grey) for battle arenas. Track maps cannot be colored as the game forces them grayscale.

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).
  • 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.

Next

With your minimap working, proceed to the KMP Editing article to set up your start positions, checkpoints, enemy routes and objects in your level.