This page is under construction!
Introduction#
A custom track is a track created or ported by an individual. This could include retro tracks based on other games, or original tracks designed by the creator. There are many components that a custom track is comprised of. This tutorial aims to provide you, the reader, the resources necessary to create your very own custom track. This tutorial will assume you have a basic knowledge of modelling, as it will be necessary for a number of steps in the creation of a custom track. If you are not familiar with any modelling software, Blender is most recommended for both beginners and veterans alike. There are many resources you may find on other platforms that cover the fundamental basics of Blender which is all you will need to know to get started.
Custom Track Directory Contents#
Custom Tracks must follow a very specific structure that the game expects. You can find the contents of any given track in romfs/data/data/Course. Do not worry if you don't know what this means, it will be further explained later. Many of the track names are fairly cryptic internally, as their names do not represent their final iterations and presumably reflect early placeholder names. Generally speaking, using your own intuition, you can make a safe assumption on what a course may be. For instance, you can safely assume that airship_course is Airship Fortress.
Most, if not all, courses have two directories inside the Course directory: a course_name_arc folder, and a course_nameTex_arc folder. course_name_arc contains most of the important assets to a track. course_nameTex_arc will contain the textures for the given track. This would include textures you see inside a course, the textures for the skybox, and the minimap you see on the bottom screen.
The actual contents of a given course is as follows:
- course_name_arc
- MapObj
- map_object.nsbmd - Assets for map objects go here. A map object is any game object placed via the nkm. Some map objects do not require their assets be in this folder, as they will always be loaded with a track, such as the item box. In cases where you require no map objects that necessitate assets in this folder, you can delete it.
- MissionRun - Alright I'll be blunt, I've never touched this file. If someone else can write this part of the tutorial, that'd be appreciated. For most cases though, this folder is pointless and it can be deleted.
- course_collision.kcl - This is the part of the course that the player interacts with. It is entirely separate from the course model. This is where you would define how the player will interact with a surface, whether it be grass, wall or what have you. You would also place elements here that aren't visible in the course model like invisible walls.
- course_map.nkm - This defines where map objects, enemy routes, checkpoints and routes go, among other elements that don't belong elsewhere.
- course_model.nsbmd - The visual model. This contains the model, materials, and vertex colors. Textures are stored in an archive elsewhere.
- course_model.nsbta - Texture SRT animations. This is the scroll, rotate and translate animations that affect materials in-game.
- course_model.nsbtp - Texture pattern animations. This will animate in-game by cycling through textures.
- course_model_V.nsbmd - The skybox. This is a separate entity from the course model. If anybody else can document the technical differences in the way the game handles skyboxes vs course models here, that'd be great. Otherwise, just use this for the skybox and course_model.nsbmd for the course model.
- course_model_V.nsbta - The same as course_model.nsbta, but for the skybox.
- course_model_V.nsbtp - the same as course_model.nsbtp, but for the skybox.
- MapObj
- course_nameTex_arc
- Map2D - This directory contains the minimap textures. All of them are generated at once by Nitro Paint given a texture provided by the user. As such, this will not cover every individual file contained.
- course_model.nsbtx - The textures used by course_model.nsbmd.
- course_model_V.nsbtx - The same as course_model.nsbtx, but for the skybox.
Note that this is not a comprehensive description of the entire contents of the Mario Kart DS romfs, but merely brief documentation on only the vital components of a custom track.
Nitro TGA#
The Mario Kart DS toolkit requires textures be in a special version of TGA specifically for use with nsbmd files. These can be created with Nitro Paint. Usage of this tool can be found on the Nitro Paint page.
NSBMD#
most custom tracks will start with the NSBMD, or the course model. This tutorial will not cover how to create the course model that you are working with. However, it will explain the processes required by MKDS to get your model in-game and provide some advice specific to Mario Kart DS and track development.
Blender#
Most custom track creators will opt to use Blender. This is for a wide variety of reasons, such as the software being free, open source, fast to use and most accessible to MKDS with the current toolkit. If you are using Blender, you will need nns-blender-plugin. This can be installed from the Blender plugin manager and enables you to export to IMD (An intermediate file for the nsbmd), Texture SRT animations and Texture pattern animations. The IMD is converted to nsbmd with another tool which I'm not sure I can name or link, if someone else can confirm that would be great. In order to export these files, there are a few things that must be done to the model first.NNS Materials#
Mario Kart DS doesn't understand blender materials, so you must create special materials, called NNS Materials. The button to create NNS Materials can be found on the material panel in blender. An interesting quirk of the NNS Blender plugin is that if your object currently has no materials, then the Create NNS Material button will not appear, so you must have a material assigned to your object before you are able to create an NNS material. If you still do not see the option to create an NNS material after you have assigned a material to your object, then ensure that you have the plugin installed correctly. Once you have assigned an NNS material to your object, you will be presented with a mostly accurate view of your model as it would appear in-game, and a handful of options to configure your material. Note that newer versions of blender may throw an error when creating an NNS Material. You may just ignore the errors as they have no significant impact. From here, you can define how your material will look. The necessary options presented should be simple enough to follow. Note that you must use Nitro TGAs as explained earlier. The IMD converter is not capable of handling traditional PNGs and, as such, will not export properly. You can select your Nitro TGAs in blender and they will render in the viewport just fine.DS Topology#
The DS is interesting because it's capable of natively rendering convex quads. When you're creating a model for the DS, it's capable of rendering up to 2048 triangles on-screen at a given time. If you exceed this limit, the polygons will begin to flicker much like how sprites on an NES game would. However, if you use convex quads in tandem with triangles, you can increase the number of faces capable of being rendered on screen at a given time. If your quad is not convex, or if you're noticing issues with the way a quad is displayed, you can triangulate it to fix any issues or move the vertices of the quad until it's convex.TexCoords#
One very annoying limitation you will probably learn very quickly is the Tex Coord limitation. If the coordinates of any vertex on your UV map exceed a certain value, you will be unable to convert your IMD to an NSBMD. This can be fixed by modifying the UV map to ensure that problematic vertices outside of this range are moved closer to 0, 0 in order to make your UVs fit.Exporting from Blender#
Once you have created your NNS materials using your Nitro TGAs, you can export your model as an IMD. This is found in Blender at the top left under the File context menu, from there you can export as Nitro Intermediate (IMD). If your model has no issues, it should export properly and you can then proceed to the next step.Maya#
This is where the Maya section would go...IF I USED IT!Tips#
None of the following is mandatory and some advice may be impossible to follow, such as if you're working with a direct port, where you're given a complete model and must tweak it to work within the confines of MKDS. -When iterating on a course, it is recommended not to create the visuals first. Block out your model with basic grey textures as this is easiest to iterate upon. -Test frequently in-game. This will enable you to verify that turns aren't blind and the scale feels appropriate, among other elements that a good Mario Kart track is composed of.Add new attachment
Only authorized users are allowed to upload new attachments.
JSPWiki v2.10.4