This tutorial can also be viewed here and may be a bit more organised as gamebanana lacks a similar spoiler system.
A course located in content/course will contain mutiple files.
- BFRES Models, textures, and texture animations are stored inside
- KCL Collision files
- BYAML Course data for things like lap paths(checkpoints), enemy paths(ai routes), object placement, glider paths, ect.
- BFILM Stores ui stuff. In this case course_maptexture is the mini map.
- BARS Stores sound effects executed from the byaml
- BIN Ideally the course_mapcamera, which controls mini map paramters.
- PTCL Particle effects executed via byaml objects
- BGLPBD AAMP file. Not sure what they control.
- BGENV A sarc which stores AAMP files and sometimes a bfres files to control the looks of a course.
- collect.genvres. Some sorta 3D model and may have a small white texture. Unknown what this does.
Now lets make our course! We first are going to start the modeling part!
1. Part 1 ModelingThere are multiple ways you can make your own track. Here is just a list of a few programs.
- 3DS Max
- Sketch Up
Now for this test, i am going to make a very basic track. For this I will use blender.
First I will explain the size of a road.
(You can enable measurements in blender with this tutorial)
Enabling measurements in blender, the road is around 249 meters, (32.1 centimeters). You ideally want to make your road model around that size in whatever program you are using.
For those who would like to download a model to use for a size reference. Here you go! Please use the one for the right program and in max make sure scale = 1!
Making a track can be relatively easy.
Sketchup users use this tutorial:
3DS Max Users use this tutorial:
Blender Users can use this tutorial:
I hope to make a more in depth video regarding track making soon covering some tricks for anti gravity areas and such.
For now i will explain some basic track modeling.
The most common way a track would be made is using a curve and plane.
This allows your model to follow the curve path allowing you to design tracks that twist around and curve very well. To do this there are a few basic steps.
I suggest watching either this or this to get a better idea of how these are made.
- First add a plane to the ideal length of around 249 meters, (32.1 centimeters) as noted before or alternatively use the download of the road for reference.
- Then give it an array modifier. Set one of the 3 values to 1 till it goes into the right direction you want it.
- Add a curve with CTRL + A and Curves - Path
- Scale and align curve to plane
- Then add the curve in the array modifier
- Add curve modifier then add the curve you added from before.
Things to also take note of.
- Before applying any modifiers, in edit mode press U and unwrap your model.
- W key has many extremely useful options.
- Smooth - smooths your curve, great for turns.
- Subdive - Adds an extra point in between
- Smooth Tilt - smooths out tilts from using CTRL + T. Useful for making anti gravity stuff.
I've added 2 planes which will be a water section and a small little tunnel to show how shadows cast.
The track is mainly for the sake of go over things quickly and easily, but do not be afraid of doing anything complex as it is simply the same process.
Now that i got my models created, i will be exporting it an fbx to 3DS Max.
Then reimport it into max.
Also I will import a reference model to scale my track.
The reference model being blue, i now scaled it to around that size of my road. It may be a bit tricky to get the size right so i suggest using orthographic view and then switching sides with the viewport cube on the right.
2. Part 2 Shadows, Lighting, and Special effects! (Please use! Do not skip!)All tracks similar to the other Mario Kart series have their lighting and shadows baked onto a texture.
MK8 has 2 bake textures a model often uses.
Some may look like this:
And others may look like this (or very transparent)
As crazy as these might look, they're quite simple. First I will explain how they work.
Here i made a basic key on what color does what.
The first bake map controls lighting and shadows. Red being used for shadows
The second one is basically like vertex colors, they will color in particular spots. However the alpha channel controls the intensity or scale of how well these show.Often these are very dark and this alpha channel can be seen in Photoshop or similar.
For those who are curious why the map is yellow and red, the game only uses the red and green channels. The green one controlling shadows like this and the red one is ambient occlusion. The shadows being black in the green channel so it appears red.
Now to make these I will be using 3DS max. Blender can also do this however I had the best results in max.
Click this sun icon.
Click the lamp icon then set the settings from photmetric to standard.
Click on the Omni lamp.
Next check Shadows to be on and then set the color to be red like this.
Now you can configure and move around based on how you want shadows to look. I suggest moving it quite high up so it gets a good amount of the area.
Now apply the yellow texture found in the pack i gave on the top to the model you want to have the baked shadows to. This will act as the background for the shadows.
Lets unwrap all our models. Select all objects
Add a Unwrap UVW modifier
Switch to UV channel 2 and then select Abandon.
Now open the UV editor and flatten UVs.
Now exit out of the editor. Right click in the viewport and convert to editable mesh to apply the modifiers.
Select your object that you want shadows on and goto Rendering - RenderToTexture.
Use these settings.
-Use Scaline renderer
-Set the padding value to anything above 1. This will remove any seams.
-Set UV channel to 2 and use curremt uv channel
-Set resolution at what best fits. I suggest using x256 first and see how it looks, then use higher if it comes out bad.
-check lighting and shadows
-Click the add button highlighted in green and add a diffuse color
-Next add your file location highlighted in blue and save it as a png without alpha.
-optionally check both view and render with the baked setting to see how your bake map looks
Now click the Render button at the bottom. Your bake map is now complete.
To preview you can check these 2 settings like this and when you render it again it will appear on your model. Then set the viewport to shaded.
It worked! It will save in the output directory in max. Default is (C:\Users\UserNameHere\Documents\3dsMax\sceneassets\images)
Do not save it within max where you get the preview of your bake map! This will NOT have padding and will give UV seams!!!! It will save in the directory set in your render to texture settings!
Now i should note that yes shadows do cover the walls for inside areas aswell.
Now we got our main shadow map. We can also optionally bake ambient occlusion aswell as this is located in the red channel.
An example of this usage
This technique is used often to add nice lighting and shading to areas not exposed or obstructed too well.
I will go over that soon.
3. Part 3 Bake Maps (continued) Vertex Color to Bake Map, Light sources, and More!We got the first bake map done now onto the second one.
Now this one can control lighting and many other effects. You can even color parts of the stage Like this from this.
Also Bowser's castle uses these quite well.
Without these (using a basic color texture)
And with the second bake map
The way these work is like a layer of color on a model. If you've ever seen vertex colors get used on previous Mario Kart courses, this is basically the same thing.
It can control the brightness of shadows aswell, orange can often remove a shadow effect as it gives off light.
I've seen this primary to darken areas so light can stand out well.
Here is how the whole effect looks when shown in game (textures greyed and color scale maxed)
This gives off a nice shading effect based on the color.
It works like a hue selector. Purple will be the darkest, while red is the brightest. The alpha channel then controls how easy you can see the color. For bowser's course most of the blue parts are often black in the alpha channel so you don't get any blue colors in the map however it still darkens areas in game.
A light blue can slightly darken areas like in the Airport level.
While the Lobby can have an even lighter blue to brighten the room
Twisted Mansion having a darker color which helps lights stand out better
Now we need to make our own second bake map. This process is basically the same as before.
I however haven't found exactly a good way to replicate these effects sadly due to how games not using effects like these. Lamps and such may work but results always show faded unwanted results. If anyone figures this out I will update this part!
3.2. Baking Vertex Colors from a model or track.Mario Kart Double Dash!!!, mkwii, mkds, and mk7 all greatly use vertex colors for shading effects.
Some examples of these:
With Vertex Colors:
Without Vertex Colors:
(Screenshot taken from MKDasher's track and one i added vertex colors to)
With Vertex Colors
(screenshots taken in BMD viewer)
Of course some games use vertex colors more than others but if you plan on porting a track, i highly suggest doing this!
First open your track. I will have detailed info on importing each to maintain vertex colors in the bottom of this thread.
I will be using 3DS MAX for this
Go ahead and save your current object as a .max file. We will need to go back to it after we make our texture map.
First select an object. We need to combine models first so right click - convert to editable mesh.
Then click the attach button
Select all your objects and press attach. This will make them all one object.
Press the M key to open the material editor
Drag this white texture over to a material sphere
Then goto the maps section and click on the diffuse color map
Click the bitmap option
Then click on "vertex color map"
Now click this to assign this material to the model.
Alright last step. Open Render to texture like last time. You can use the same settings or use my preset however
check use existing UV channel and make sure it is set to 2.
Set renderer to scanline
Press the bake button.
It worked! It will save in the output directory in max. Default is (C:\Users\UserNameHere\Documents\3dsMax\sceneassets\images)
Now we also need to go back to our old save now that we have the texture!
Simply goto the exporting part of the tutorial now that this is done!
4. Part 4 Exporting our track into Wexos Toolbox & Material EditingNow for this step you will need a program called Wexo's Toolbox. You can obtain this here. (This tool is currently Windows only)
First need to export your model as a .dae. If you are exporting in max look at what rotation the front of your model is. I suggest having the front of your track be on the Top view like this. Then when you export as a .dae file, set Axis Conversion to Z up.
Obj files can be used but is not recommend as bake maps will not import!
List of formats I know work so far
Blender: .DAE (Sometimes unstable! May not work!)
3DS Max: .OBJ, .DAE
Sketchup ???? May want to run track through blender or max. May need to scale down to proper size if necessary.
Maya ???? May want to run track through blender or max. May need to scale down to proper size if necessary.
After exporting your model. If you wish for this effect in any underwater areas like this where it is wavy on the ground and walls, create a model that covers all the areas of the water effect (does not need to be exactly perfect, can go outside of the walls) like this. Then with that one object make it a separate dae.
Then goto the CausticArea section of material editing.
Now open the tool
If you are familiar with brawlbox, this tool is somewhat similar.
What we need to do first is open a course that we will use as a base. (This will not reflect on the actual course your track will go over! If you use rainbow road as a base then you can put it over Mario Stadium, ect)
I will be using Mario Stadium as a base. The course you choose will reflect the materials and shaders used however these are often very similar through each course and may not make a huge difference.
I highly suggest using Wario Stadium as a base. It has the best set of materials i've seen so far and i included alot of nice materials to use!
Now lets open our track base.
Now right click the "Models" section in the tool and click import.
Then change it to use dae.
Select your dae file you exported and then a settings box should appear.
These are the settings I use.
Then press OK.
Now your model will show in the models section.
You can rename your model anything you like. The tool also allows you to import multiple models if needed.
Now your objects will all appear under the materials section. We will need to transfer material data from our base track to our own. (If any model has no materials, it will crash in game!)
5. Material EditingA full set of presets can be found here.
Now lets open the base model and goto the materials.
You will be using the materials from the track you chose.
Materials are structured like this.
The only thing you will likely need to edit is the Attribute Selectors and the Selectors under the Textures tab. You can open these or anything with (Collection) by selecting the gray box after the option is clicked on.
Now lets get a few materials to use for our course. I will have a full pack of materials for easy use for those who do not want to do this and I highly recommend using them as it has a few things I needed to edit for bake maps to work!
For those who want to use materials from other tracks rather than my presets.
5.1. Extracting Track Materials:First I suggest looking at the texture selector option.
Your material needs to have each material map.
Alb is the main texture
Nrm being a Normal Map for a bump effect. Makes your texture appear less flat.
Spm is the shininess of your texture
Emm is the Emission texture which controls brightness or glow. Great for signs or panels.
Bake is the lighting and shadow effects.
Some materials will not have all the maps you need so you will need to keep looking for one. You can not remove or add any on an existing material!
Now to export a material simply right click and export the material.
Same goes for replacing a model with the replace option.
Replace a material from your base course or my material presets and do this for every object.
5.2. Texture MappingSimply open the "Selector" option under textures to rename the texture name to one of yours.
Now for those using my material preset, I made it fairly simple. There are basic secular, normal, emission, bake, and also main textures for tracks.
Every material given will have either these sets of textures:
Basic_Alb (Main Texture)
Basic_Nrm (Normal Map)
Basic_Spm (Specular Map)
Basic_Emm (Emission Map)
Bake_CustomTrack_bake1 (first bake map that was red and yellow)
Bake_CustomTrack_bake2 (second bake map)
These all will give a neutral effect so you can just edit the main texture and have it work. I suggest doing every map for the best possible look.
For those who want to mirror your texture, goto the attributes selection option and open it.
Change the WrapU or WrapV option from "Repeat" to mirror. Some tracks like from MK7 use this feature.
For the options on the right side:
_a0 = Main texture/alb
_n0 = Normal map/Nrm
_s0 = Spec Map/Spm
_e0 = Emission/Emm
_b0 = Bake Map 1
_b1 - Bake Map 2
5.3. TransparencyNow for transparent textures to work. Simply use the Alpha texture in my material presets or use one a material that supports this on your base course. This can easily be found if the Alpha Condition option is set to "Always"
5.4. CullingCulling is a technique used to make a certain part of a model not view able from a particular viewpoint.
You can remove this if you need to see both faces/sides of a model by setting this to both faces.
For most objects like roads on the ground or one sided walls, i suggest keeping this to front.
5.5. WaterIf you want to replicate the very nice water MK8 uses. Simply grab ef_waterF from your base course or my material presets. Water only uses a normal map, the rest is all material and shader based. Editing the color of this is currently unkown.
Also be sure to add the ef_water_Nrm texture from your base course aswell! More on that in the textures section of the tutorial
Lastly goto Texture SRT Animations and import the water animation from your base course.
Sometimes called ef_water_auto however other courses may vary.
5.6. Caustic Area (Underwater wavy effect)So if you made your model as noted in the beginning of this tutorial all you need now is to first import your object.
After the dae is imported name it CausticsArea like this.
Then use the CausticsArea9 material from either my preset or the stage your are using a base off of.
That should be all. Keep in mind this does not have any textures and does not need any! Adding any may not work or can crash.
5.7. Animated Gravity, Boost, and Glider Panels.Use the right material from your base course to get these working.
ef_dashboard - Boost Panel
ef_glideboard - Glider Panel
ef_gravityboard - Gravity Panel
5.8. Previewing Our Model(Back Up the szs/bfres before doing incase something breaks or crashes)
You can right click on your model and preview it! This is useful for looking at texture mapping and if the model looks fine.
5.9. Optimizing Our Model
(Back Up the szs/bfres before doing incase something breaks)
In the newest build you can optimize and fix possible lag from going to Edit - Optimize model!
The default settings are fine, just press Ok and your model is optimized!
5.10. Saving Our ModelOnce you have done your material edits you can goahead and save it.
First goto Plugin - Program Manager.
Set your compression to Yaz0 if it isn't already.
File - Save As and name it
Press "Yes" on this dialouge
Now it is saved! For testing I suggest making a quick KCL in the collision section of this tutorial and a byaml in the byaml section of this tutorial.
To test this out you can open cemu and launch the track. For Wii U users use SD cafiine. More noted on all this at the end of the tutorial in Part 9.
5.11. Checking Errors!Before saving our model always check for errors! These are often material errors!
First goto edit - check.
Here is a list of what errors mean.
(Material Name) links to buffer "B" but does not have a vertex input!)
This is an important error as this can cause a crash. To fix:
Goto vertex inputs under the shader control panel
Open it and add the buffer that appears in the error.
(Material Name) links to buffer "B" but does not exist! (buffer B being u0,u1,t0,b0,c0,n0,p0, ect) Example
This error often does not have any effect nor will break anything.
If you feel you want to fix this:
Goto vertex inputs under the shader control panel
Open it and remove the buffer that appears in the error.
6. Part 5 Texture EditingThis tool in particular makes it very easy to add textures.
First lets go over importing textures. Then I will go over making them.
Goto the textures tab.
Export any wanted textures first as .bftex. You may want to keep glider, gravity, and other panel related textures.
A list of these:
Now importing our own textures.
Right click the textures section like you did models and click import.
You have many options to choose from. I often use .png.
Once you have your texture clicked on you will get this settings box. The only thing you need is to edit the format.
T_BC3_UNORM or T_BC3_SRGB For transparent textures (and second bake map)
T_BC1_UNORM or T_BC1_SRGB For most textures not transparent (also first bake map)
T_BC4_UNORM or T_BC4_SRGB for black and white textures
T_BC5_UNORM or T_BC5_SRGB for normal maps (recommend UNORM, SRGB can be too shiny or weird at times)
(SRGB may have a slightly better color range. Whatever comes out best for you in the previewer)
These ones are often not used for tracks but you can if you want.
TCS_R8_G8_B8_A8_SRGB for very good quality. Should only be used on smaller textures however due to how big these can be. If used too much the game will crash due to size/memory limits!!!)
TC_R5_G5_B5_A1_UNORM (A bit smaller in size than TCS_R8_G8_B8_A8_SRGB)
T_BC2_UNORM or T_BC2_SRGB is slightly smaller than BC3 and supports transparency.
Size reference! Higher can risk crashes!
For saving bake maps
Set mipmap amount to 0.
Now that is done our texture is now added!
To apply all you need to do is goto the materials and add it to the selector as note in the materials section.
6.1. Creating Normal MapsNormal Maps give off a bumpy less flat look to your texture. These are used in most modern games due to how reliable and useful these can be.
The BEST possible way to make these is ideally 3D modeling a high poly to a low poly model. Another way is a texture to a normal map which can still look alot nicer however 3D modeling can give specific details not in the texture itself.
6.2. Normal Maps - High to Low Poly
Text Based Version:
So lets try this out.
So far I got a fully 3D modeled fence and then a very low poly 3D cube that is around the shape of the original model.
Go ahead and UV unwrap your low poly model in edit mode (by going into it with "Tab") with "U" to unwrap.
Now change the renderer from blender to cycles.
Then we need to allign our models to be in the same spot.
Now open the UV editor. Create a new image with Image - New Image
Now add the texture to the model. To do this simply go to materials tab with a sphere on it.
Then click "New".
In the color option set it to an image texture and select your texture.
Now lastly goto the render tab with a camera on it.
- Bake type -Normal
- Space -Tangent.
- Select to Active - On
Select your high poly model first then your low poly model.
Press the "Bake" option. It should output a normal map!
How it came out (shown in crazy bump)
Came out pretty good.You can always experiment with ray values or even in crazy bump to edit certain things or even use an image editor if any artifacts or issues exist.
In Game with some minor tweaks:
There is also this site online that can create these
Photoshop can be used as it has a 3D viewer depending on the version, and can generate these easily.
Another video on baking high to low poly models for normal maps.
Creating Secular Maps
Specular maps are the shininess of an object. These are controlled in a gray scale manor where white is shiny and black has no shine. Generally the best way to achieve this is to use the main diffuse and lower the contrast for more rough less shiny objects and lower the brightness a bit and the opposite for metalic objects.
Now I'm going to create some to set a good example of how I do these myself.
First open your texture in photoshop or similar.
Now if your texture is low on detail do not worry.
Go here and pick a texture for you to use for detail. You can grab up to 15 free textures a day with an account created.
Resize your base/lowres texture to something around 512x512 or higher
I will be getting a wood texture. Copy your texture and paste in into photshop as another layer (should paste it automatically as another one)
Now you need to add a "Multiply" effect. This will overlay the detailed texture and may darken it a bit.
You can change the opacity and all that too if you don't want it to be too noticable.
Of course you can always edit the brightness and make it brighter too if you want to use it as the main texture however for this we just need to make it black and white.
Right click the layers and flatten image.
Set the slider of the saturation all the way down.
Now we need to darken it a bit with curves.
Now setting this depends on material. Less shiny things like wood needs to be fairly dark, while metal should be grayish.
I moved the curve a bit low so it is nearly black but not too much.
Now lastly goto
Select "Use Legacy"
Turn up the contrast a bit till you start to see some details. The better the detailed texture, the better it'll come out. The black areas
Now mine didn't come out all too good. Here is a better one
Small scratches and detail shows up better.
Here are some great videos on this map.
Creating Emission Maps
These control glow in your texture, generally anything black has no glow, and any other color will glow.
Also can be known as Emissive Maps, you can simply remove anything in your diffuse map that you don't want to glow and have it black.
A video on these:
7. Part 6 KCL - Collision editingMario Kart 8 has collision done with a KCL file. This is basically a simplified model that has materials for specific properties such as boost panels or glider spots. These also can have invisible walls to prevent out of bounds or shortcuts if you're that cruel.
These are very easy to make. You have two options.
-Every File Explorer Modified by MasterFox (Seperates collision types by materials of model)
-Wexos Toolbox (Seperates collisions by objects)
For the Every File Explorer method. Make sure everything is textured. I suggest naming each texture based off the name you want the collision material to make it easy. Also try renaming each object to the material of the collision too. Like a model i want a wall to be, i'd name it "Wall"
Also remove any objects not needed like skyboxes or something the player cannot touch.
Make sure your poly count and vert count is lower than 65535! Press "7" in max to see total.
Export your model as a .obj. I will be using 3DS Max. Other programs may work aswell for exporting a model for collision. Not tested atm.
The settings don't need to be specific, just make sure it is set to triangles.
Then press Export.
Now i suggest downloading noesis. Open it and click on your model.
Your model should be facing in the front view like it did in max. If not then right click, export and set it as a .obj and flip 90 degrees.
Now open Every File explorer.
Goto the MK8 kcl option. Select it then open your .obj.
This window will pop up. If you get a null key error, run it through noesis anyways without 90 degree flipping.
You will get a box on material types.
Or if you are using Wexos Toolbox
Now you type in the collision types.
A full list can be found here however is incomplete and in decimal.
You will need to convert them into hex.
Here is a list of some that are very useful and in hex format:
0000 - Road
0051 - Basic Wall
000B - Gravity Panel (Possibly needed for anti-gravity sections)
001F - Glider (Needed for glider sections!)
0002 - Bumpy
003C - Water
0086 - Offroad
000A - Booster
0010 - Latiku
1000 - Trick
100A - Booster + Stunt
Now press the X in every file explorer to close that. Wexos Toolbox press OK.
Then File - Save As and then save as course.kcl
8. Part 7 BYAML (Map Object Placement, Checkpoints, AI paths, and more)This part is too big for gamebanana. Go here for this section.
9. Part 8 BGENV - Environment effects such as Fog, Day, Night, ectAlthough the main files cannot be edited, we can easily swap them around!
The course.bgenv controls most of the lighting effects. I will list a few courses and what effects can be done with them.
For some courses you need to also use the same skybox to get the right effects like for night or day time
Gu_FirstCircuit - Great effect for early morning, not too bright outside.
Gu_BowserCastle - Fog is alot less noticeable with this one
G64_KinopioHighway - Good for night time courses
Gwii_MooMooMeadows - Good for sunset courses
10. Part 9 Testing the track (Cemu and Wii U)If you have a PC good enough, I highly suggest using cemu for testing as it is very fast and easy to boot and test out the track. This doesn't have a specific set, just replace existing files in your dump.
Wii U users use SD cafiine using this guide:
11. Q&AAre you going to create CTGP for MK8?
Nope. If i think anyone should make it should be whoever can manage to add extra stage slots with memory edits but that's my opinion, anyone can if they want. We also have quite a lack of tracks atm to have such a pack. Not even a cup worth.
My mod crashes from the course_model.szs
-Make sure it is Yaz0 compressed
-Check errors in wexos toolbox with Edit-Check
-Make sure you are only using materials from one stage used as a base! Any other ones will crash
-Make sure you have everything with materials
-Only use a few TCS_R8_G8_B8_A8_SRGB textures. Any more can crash! If you really need to add more try lowering the resolution of the texture. BC1 or BC3 is also best for most transparent textures due to smaller size!
My mod crashes from the KCL (collision)
-Make sure your kcl is under 65535 polys/verts.
My mod crashes from the byaml
-try to re-extract it from yaml conv. If it breaks then you may be using a bad build.
-Make sure for lap paths there is no clip ID. It has to be set to ClipNum="-1"
-Enemy paths must loop
-Enemy paths must not intersect in the same group
-lap paths must not intersect in the same group
-lap paths must loop
-Removing certain things in the byaml with yaml conv can break stuff. Be careful with that
Will Mario Kart 8 Deluxe be moddable?
-The file formats are fairly similar, KCL is already editable and BYAML is getting there too so i can imagine it will once the bfres format is fully rebuilt and the switch is fully hacked.
Will you make a video on this?
-I spend weeks putting this together so i'll wait and see if track making starts to take interest. I'd see no reason to make one if this doesn't get much interest in the scene. Anyone else is welcome to make one and help me out as it also would just be a ton of work to do.