This is a character template that uses the original Fast64 blend file and expands upon it to take advantage of the fewer limitations the PC Port has. Not only does it rename the offsets with appropriate names, but also contains multiple heads for the unused eyestates.
Fast64 is required for this. Blend file. You can download it these two:
Fast64-Coop - Provides the basic necessities for overall anything Mario 64 related. Such as: Levels, Characters, Objects, Animations, etc. It's updated for Level Lightmaps and Scrolling Managers.
Fast64-Gart - Made specifically to lessen any Manual work for Custom Character Creation as much as possible. Provides Recoloring features in Blender to set up so that you no longer manually edit the code.
Recommended to use Blender ver. 3.6 as ver. 4 breaks Fast64.
To install it, head to the icon on the upper left and switch to Preferences then head to Add-ons.
To rig the body parts, you must have the mesh triangulated.
Step 1: Set to Object Mode
. Have all the body parts joined using Ctrl + J. While holding Shift firstly click on the mesh, then the armature, and make sure it's in that order, then hit Ctrl + P and click With Empty Groups
.
Step 2: Select just the mesh and set it to Edit Mode
, then Right Click and click on Separate
then select Loose Parts
.
Step 3: Pick a body part, then switch to Edit Mode
. Press A to select the entire mesh and head to the Object Data section, before selecting the appropriate Vertex Group. Then click Assign
. Repeat the process.
Step 4: Set up your EyeStates by finding the Eye State Switch
bone! You can also replace a switch option with an entirely new model for the head instead of a texture.
Eye states are as follows:
- Switch Option 1: Half-Closed Eyes
- Switch Option 2: Closed Eyes
- Switch Option 3: Left Eyes
- Switch Option 4: Right Eyes
- Switch Option 5: Up Eyes
- Switch Option 6: Down Eyes
- Switch Option 7: Dead Eyes
And you're done! You are now ready to export the model!
You must have all the mesh parented and assigned vertex groups for the export to happen.
Step 1: Hover to the right side on the toolbar and look into GeoLayout Exporter. Then select the directory. Either you place the files under "sm64coopdx/mods/character_mod/actors" or dynos/packs. However, if you prefer exporting to DynOS Packs, you must have it named one of the following depending on what character you want to replace (Note that you can always rename the _geo.bin files):
- Mario:
mario
,mario_geo
- Luigi:
luigi
,luigi_geo
- Toad:
toad_player
,toad_player_geo
- Wario:
wario
,wario_geo
- Waluigi:
waluigi
,waluigi_geo
Step 2: Click the Mario Armature and Export Armature GeoLayout.
Step 3: Open the game to build the model into a .bin file.
The model has now been built and is ready to use for modding! Any change to the model must have the old .bin file deleted!
This is for AgentX's Fast64-Coop. If you're using ManIsCat2's Fast64-Gart, click here for instructions.
Make sure all the mesh has the materials all shared AND organized. A program such as Visual Code is needed to manually edit the files.
The game has eight recoloring slots for recolorability!
CAP
SHIRT
SKIN
HAIR
PANTS
GLOVES
SHOES
EMBLEM
Step 1: Open the geo.inc.c
file and scroll to the bottom.
Type in the following lines in between. These will activate recolorability for most materials. You MUST have them in for recolorability to work:
GEO_ASM(LAYER_OPAQUE + 3, geo_mario_set_player_colors),
GEO_ASM(LAYER_ALPHA + 3, geo_mario_set_player_colors),
GEO_ASM(LAYER_TRANSPARENT + 3, geo_mario_set_player_colors),
GEO_ASM(LAYER_OPAQUE << 2, geo_mirror_mario_backface_culling),
GEO_ASM(LAYER_ALPHA << 2, geo_mirror_mario_backface_culling),
GEO_ASM(LAYER_TRANSPARENT << 2, geo_mirror_mario_backface_culling),
GEO_ASM(0, geo_mirror_mario_set_alpha),
Step 2: Make sure this code is added near the end of the geo.inc, replacing the old backculling code.
GEO_ASM((LAYER_OPAQUE << 2) | 1, geo_mirror_mario_backface_culling),
GEO_ASM((LAYER_ALPHA << 2) | 1, geo_mirror_mario_backface_culling),
GEO_ASM((LAYER_TRANSPARENT << 2) | 1, geo_mirror_mario_backface_culling),
Step 3: Open the model.inc.c
file and head to 3/4 of the code. Replace the highlighted code with gsSPCopyLightsPlayerPart(???),
to add in the coloring! Replace the ???
with the recoloring slot you want the material to use.
Step 4: Delete any old .bin
file and restart the game to create a new one! And you're set!
This is for AgentX's Fast64-Coop. If you're using ManIsCat2's Fast64-Gart, click here for instructions.
In order to make proper faithful colors to the Vanilla models, you must follow these first!
To make this simple, these are your LIGHT GROUPS as each have proper names. Each light group is set up here so you'd use them for special coding. However, you can also type in and add a new light_group specifically for a few materials!
Here's what you'd need for proper coloring! Make sure to rename test_???_lights
to your liking! NOTE: The wings can share the metal_lights group with no issues.
Lights1 test_logo_lights = gdSPDefLights1(
0xFF, 0x0, 0x0,
0x0, 0x0, 0x0, 0x49, 0x49, 0x49);
Lights1 test_sideburn_lights = gdSPDefLights1(
0x73, 0x6, 0x0,
0x0, 0x0, 0x0, 0x49, 0x49, 0x49);
Lights1 test_metal_lights = gdSPDefLights1(
0x7F, 0x7F, 0x7F,
0x0, 0x0, 0x0, 0x28, 0x28, 0x28);
Lights1 test_metal_wing_lights = gdSPDefLights1(
0x7F, 0x7F, 0x7F,
0x0, 0x0, 0x0, 0x49, 0x49, 0x49);
Here is a picture explaining this code which will be used for LIGHTS: gsSPLight(&luigi_light_group.l, 1),
Here is also a picture explaining how THIS specific code for AMBIENT: gsSPCopyLightEXT(2, 15),
Now that you understand a BIT more about how it works, let's get to each material in order.
LOGO
Replace the COMBINELERP with this -> gsDPSetCombineLERP(TEXEL0, SHADE, TEXEL1, SHADE, TEXEL0, 0, ENVIRONMENT, 0, TEXEL0, SHADE, TEXEL1, SHADE, TEXEL0, 0, ENVIRONMENT, 0),
METAL
SIDEBURNS
Replace the COMBINELERP with this -> gsDPSetCombineLERP(TEXEL0, 0, SHADE, 0, TEXEL0, 0, ENVIRONMENT, 0, TEXEL0, 0, SHADE, COMBINED, 0, 0, 0, COMBINED),
METAL WINGS
gsDPSetCombineLERP(TEXEL0, 0, SHADE, TEXEL1, TEXEL0, 0, ENVIRONMENT, 0, TEXEL0, 0, SHADE, TEXEL1, TEXEL0, 0, ENVIRONMENT, 0),
Aaaaaand you should be good!
Wanna add your custom animations to your character? Here's how!
Step 1: Check your Animation Pointers file that is included in the ZIP file. It will help you identify which animation belongs to which action.
Step 2: Set it to Dope Sheet
, then set it to Action Editor
.
Step 3: Go to Pose Properties and set the layer to ONLY the first one. The first one is to move the limbs, while the 2nd is for functions such as switch, scale, etc.
Step 4: Because of the game's current limitations, you can only move and rotate the bones, so any scaling effect will not show in-game. Select a bone and start with one frame. Then press I and select Location & Rotation
, this will insert a new frame on the current frame.
Step 5: Move to another frame and move the limb to how you want it, and then press I and Location & Rotation
yet again.
Repeat the process with the rest of the limbs and animate your characters. NOTE: Animations C3, C4, and C5 are all a part of the idle animation. For the custom idle animations to not break, you must have each animation start on frame 0 and end on frame 29. You can also set up the manual range of the frames.
There are two ways of adding them.
This one is easy, but you can only replace existing animations with this.
Step 1: Head to Action Editor
and select the animation.
Step 2: Head to the SM64 tab and find the Animation Exporter
. Make sure you have the directory under dynos/pack/[DYNOS NAME]
.
Step 3: Once the animations are exported, head to the animations C files and open them to manually edit them. Table and Anim MUST be edited!
Step 4: Delete the white highlighted mario_
parts so that the animations can work.
Step 5: Once that's saved, delete the old .bin
file and open the game to generate a new one!
And it's done!
NOTE: You don't need to re-export the geo.inc.c
and and model.inc.c
files as the animation files are their own thing. You ALSO don't need to replace the table.inc.c
file once it's edited.
This is for AgentX's Fast64-Coop. If you're using ManIsCat2's Fast64-Gart, click here for instructions.
With this, you can add any custom animation and have it be played without replacing a vanilla animation! But it takes lua
knowledge and a lot of work to do so.
Step 1: Create a lua file and write smlua_anim_util_register_animation(
, then the name of the animation. For example:
Step 2 If the animation file is exported, open it and copy its contents. Here's the order of how it's done:
Tables
Values
Indices
Example of how it's set up:
smlua_anim_util_register_animation("luigi_run",
0,
0,
0,
0,
71,
{
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
},
{
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
}
)
Lua Example:
And that's how it's done! You can either add the code in main.lua
or add it in a completely different animation.lua
file!
Errors, they stink, but we've been through this before!
All the models don't show the colors, except the textures. This is because the template is using an outdated version of Fast64. This is easily fixable.
Go to the Fast64 settings, then head to Fast64 Material Converter, the click "Recreate F3D Materials as version X". It should resolve the issue.
This one is classic, it's annoying when it pops up but not that hard to fix, so don't worry and follow this guide:
This means one of three things:
- The mesh is assigned to two or more bones.
- The mesh is assigned to two different armatures.
- There is an ungrouped vertex or vertices in one of the meshes.
To fix the first 2 issues, join the main armature's mesh and right-click, then hover over Parent
and click on Clear Parent and Keep transformation
.
To fix the third issue, firstly select all used meshes and go into Edit Mode
, then switch to vertex select and click on the Select
tab, then hover over Select All by Trait
and click on Ungrouped Vertices
, it should select all ungrouped vertices, after that, go into the meshes with ungrouped vertices and select the ungrouped vertex or vertices, and lastly assign them to the appropriate vertex groups.
That should do it!
This just means the multi-textured materials aren't formatted right.
Step 1: Head to the Materials section, then head to the texture settings.
Step 2: Select format of the Image (NOT CI-Format) to RGBA 16-Bit or 32-Bit!
Make sure ALL mutli-textured Material's texture formats are set correctly.
If your model was exported successfully, yet the model won't generate, this means the texture path is incorrectly set.
Step 1: Make sure this option is enabled. This is the only way for the Texture Path to appear as this is required for multi-textured materials such as Metal or Metal Wings.
Step 2: Head to the Geolayout Exporter and enter /actors/folder name
/. This is a guaranteed way for texture path to work no matter which computer uses the blend. Remember, Texture Path is the RESOURCE you're pulling from. It MUST match the folder name.
NOTE: Geolayout name does NOT need to match the folder name if the model will be loaded by mods such as Character Select.
This is a Fast64 bug that occurs due to an update that changed how the materials work.
There are four constants for Cap Switches in order:
- Vanish
- Metal + Vanish
- Metal
Only the custom head GEO_BRANCH
with a clear name should be deleted.
Ever wonder why your model always was away from the shadow and you don't know how to fix it? Here's how!
- Select the mesh and set the 3D Cursor to the ROOT / Body bone.
- Then go into the
Object
tab at the top of the 3D viewer and hover overSet Origin
. - Lastly, click on
Origin to 3D Cursor
to snap the origin to the Root bone of your armature.
And that's it, now the model should be centered:
If your character is floating or sinking through the floor, you can easily fix it by following this guide:
Step 1: While you're in Object Mode
select the armature to lower its origin point by firstly setting the action to the In-Game Example (DO NOT EXPORT WITH THIS)
action, then go to the top right corner of the screen and click on the Options
tab and check the Origins
and Parents
boxes (make sure to uncheck them when you're done), then move the origin point down using the move tool until it's exactly under your character's feet, the orange point should look something like this:
Step 2: Find the Scale
bone in your armature and go into its bone properties
Step 3: Here is where it gets slightly more complicated, you will have to do some math here, and find the scale value (by default it should be 0.25) and change it depending on your character (taller = increase, shorter = decrease), and keep the new value noted (you might have to change it multiple times so that it displays correctly in-game):
Step 4: Remember when I said that you will have to do some math, here is the formula:
0.25/n * 212.766
where n
is your new value, just put it in a calculator and get the result
Step 5: Lastly, in the SM64
tab of Fast64, find the SM64 File Settings
menu and find the Blender to SM64 Scale
value, insert your value from the last step here.
Now your model should have most of its offsets fixed (some animations like ledge grabbing will still look like you're floating depending on the arm length)
Due to how the new Metal Texture works, it messes up with the romhack textures. to fix this, open model.inc.c
file, then replace the code in the screenshot entirely with this:
Original Code (At the VERY bottom!):
New Code:
Gfx mario_material_revert_render_settings[] = {
gsDPPipeSync(),
gsSPSetGeometryMode(G_LIGHTING),
gsSPClearGeometryMode(G_TEXTURE_GEN),
gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT),
gsSPTexture(65535, 65535, 0, 0, 0),
gsDPSetEnvColor(255, 255, 255, 255),
gsDPSetAlphaCompare(G_AC_NONE),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, 0),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0),
gsDPLoadBlock(7, 0, 0, 1023, 256),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, 0, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0),
gsDPSetTileSize(0, 0, 0, 124, 124),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, 0),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 256, 6, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0),
gsDPLoadBlock(6, 0, 0, 1023, 256),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 256, 1, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0),
gsDPSetTileSize(1, 0, 0, 124, 124),
gsSPEndDisplayList(),
};
NOTE: Make sure you replace mario
with the correct default character you're replacing.
Default Characters:
mario
luigi
toad_player
waluigi
wario
Want some tips based on what we learned? No problem!
Y'know how in BETA Mario's running animation his torso never tilts?
Well.. you can do something like that!
Head to geo.inc.c
file of your model and locate it in search for GEO_ASM(0, geo_mario_tilt_torso),
, it should be located at the last constant of the file, then delete it! That's it!
Is your character's body too different from Mario? Do this!
Step 1: Make sure you select the armature in Object Mode.
Step 2: Head to the pose settings and select both layers.
Step 3: Set to Edit Mode
and multi-select that one bone. Remember each offset bone has other bones attached to it. Perspective WILL help you with this!
Is the main armature being a pain to you due to many errors but you're too scared to redo everything? TRY THIS!
Step 1: Click the meshes and right-click. Then hover to Clear Parent
and select Clear Parent and Keep Transformation
. Then, head to the Modifiers
section and delete the Armature modifier. Do this to ALL of your meshes!
NOTE: As long as you have these vertex groups left alone, you SHOULD be fine once you head to the new armature.
Step 2: Multi-select all the unparented meshes and head to the Select
tab. Click Invert
and delete everything BUT the meshes. Once the meshes are left alone, copy and paste them into the new unbroken armature.
Step 3: Make sure the meshes on the new template have the parent cleared AND the Armature modifier removed. Mult-select the mesh with the cleared parent and the removed modifier be deleted. Note: I'd recommend removing the vertex groups from those meshes as safekeeping. But that's up to you.
Step 4: Paste the old meshes on the new armature, then just parent them to the appropriate armature. That's pretty much it!
Does your character have two shades of the same color but more recolor slots? Follow this:
Make a material with the same color as the other. Set the 2nd Material to Sm64 Decal
. Make an image with a transparent color of your choice (either white or black).
Here's the result! They BOTH use the CAP color!
You can download the textures here:
Do you want to change where the wings are on your character? It's easier than you may think, check this out:
Step 1: With your armature selected, go into Pose Mode
and select the Left/Right Wing
bones
Step 2: Select each one individually and go into the Item
tab
Step 3: There will be locked locks beside the location fields, unlock them so you can move the wing bones
Step 4: Move your wing bones to where you want them and apply as rest pose, make sure to lock the bones again
Step 5: Go into Edit Mode
and find the wing bones and once again select them individually
Step 6: Change both of their parents to the Torso
bone
Step 7: Find the Eye State Switch
bone and change its parent to the 1 C-Up Head Rotation
bone
Step 8: Find the Capless Switch
bone and change its parent to the Torso
bone, this is how the game handles the showing and hiding of wings on your head
Step 9: Find the Head
bone and change its parent to the Capless Switch
bone
Once you're done with that, the wings should be on Mario's back, but now the capless head is broken, so we need to fix it:
Step 1: Select the Capless Head
armature and go into Edit Mode
Step 2: Create 3 new bones by hitting Shift+A 3 times
Step 3: Rename the first one to Capless Head Color
Step 4: Rename the second one to 0 Capless C-Up Head Rotation Function
Step 5: Rename the third one to 1 Capless C-Up Head Rotation
Step 6: Change the 0 Capless C-Up Head Rotation Function
and 1 Capless C-Up Head Rotation
bones' parents to Capless Head Color
bone
Step 7: Change the Capless Head Color
bone's parent to the Capless Head Switch Option
bone
Step 8: Change the Capless Head Eye State Switch
bone's parent to the 1 Capless C-Up Head Rotation
Step 9: Go into Pose Mode
and do the change the following:
- For the
0 Capless C-Up Head Rotation Function
change the geolayout command toFunction
and theFunction
field to802773a4
- For the
1 Capless C-Up Head Rotation
change the geolayout command toRotate
And now you're done, now you have wings on your character's back with no issues.
Since the vanilla game only handled culling for fully opaque materials in Mario's reflection, this breaks on models that use alpha clip or transparent materials. Let's fix that:
Step 1: In your geo.inc.c
, search for GEO_ASM(0, geo_mirror_mario_backface_culling),
, it should be near the bottom of the file.
Step 2: Replace it with the following:
GEO_ASM(LAYER_OPAQUE << 2, geo_mirror_mario_backface_culling),
GEO_ASM(LAYER_ALPHA << 2, geo_mirror_mario_backface_culling),
GEO_ASM(LAYER_TRANSPARENT << 2, geo_mirror_mario_backface_culling),
Step 3: Search for GEO_ASM(1, geo_mirror_mario_backface_culling),
, this should be one of the very last few lines in the geo.inc.c before the material_revert_render_settings
displaylists.
Step 4: Replace it with the following:
GEO_ASM((LAYER_OPAQUE << 2) | 1, geo_mirror_mario_backface_culling),
GEO_ASM((LAYER_ALPHA << 2) | 1, geo_mirror_mario_backface_culling),
GEO_ASM((LAYER_TRANSPARENT << 2) | 1, geo_mirror_mario_backface_culling),
And now you're done, this should fix the backface culling in mirror reflections.
Do your models sometimes mess with the UI when you get the vanish cap? There's a relatively easy way to fix this, and it can also indirectly fix the metal cap romhack texture bug too!
NOTE: the bug only occurs in newer fast64 versions, so if you want a faster way to fix this for good, use older fast64 versions! This is for people using blender 4.0
Step 1: In your geo.inc.c
, search for the second-to last GEO_CLOSE_NODE(),
and replace it with:
GEO_CLOSE_NODE(), GEO_DISPLAY_LIST(LAYER_OPAQUE, mario_material_revert_render_settings ), GEO_DISPLAY_LIST(LAYER_ALPHA, mario_material_revert_render_settings), GEO_DISPLAY_LIST(LAYER_TRANSPARENT, mario_material_revert_render_settings)
If in doubt, it should be just right under the last backface culling code!
Step 2: Now open geo_header.h
, and paste this line at the very end: extern Gfx mario_material_revert_render_settings[];
Step 3: Almost there! Finally, open model.inc.c
and at the end, paste:
Gfx mario_material_revert_render_settings[] = {
gsDPPipeSync(),
gsSPSetGeometryMode(G_LIGHTING),
gsSPClearGeometryMode(G_TEXTURE_GEN),
gsDPSetCombineLERP(0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT, 0, 0, 0, SHADE, 0, 0, 0, ENVIRONMENT),
gsSPTexture(65535, 65535, 0, 0, 0),
gsDPSetEnvColor(255, 255, 255, 255),
gsDPSetAlphaCompare(G_AC_NONE),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, 0),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 0, 7, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0),
gsDPLoadBlock(7, 0, 0, 1023, 256),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 0, 0, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0),
gsDPSetTileSize(0, 0, 0, 124, 124),
gsDPSetTextureImage(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 1, 0),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b_LOAD_BLOCK, 0, 256, 6, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0, G_TX_WRAP | G_TX_NOMIRROR, 0, 0),
gsDPLoadBlock(6, 0, 0, 1023, 256),
gsDPSetTile(G_IM_FMT_RGBA, G_IM_SIZ_16b, 8, 256, 1, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0, G_TX_CLAMP | G_TX_NOMIRROR, 5, 0),
gsDPSetTileSize(1, 0, 0, 124, 124),
gsSPEndDisplayList(),
};
NOTE: Make sure you replace mario
with the correct default character you're replacing in EVERY material_revert_render_settings
line!
Default Characters:
mario
luigi
toad_player
waluigi
wario
Step 4: Delete any old geo_bin file, and enjoy a properly functional Vanish Cap!