Importing Custom Models

Tools and requirements

 * The model you want to import, its textures, animations, etc.
 * A tool you can use for importing/exporting 3D models (3DS Max is recommended. Blender is more accessible, but only works with the latest versions of BrawlCrate. BrawlBox does not support Blender.
 * A blank .arc file with the "g3d" folder. You can make one yourself simply by taking an existing .arc from the game's Object folder and deleting all .brres files, or by downloading this empty one here. Afterwards, you can import an existing .brres, or create a new one.

Process
todo:

- importing (converting with 3ds max or fbx converter)

- fixing materials and shaders

You can also refer to this side for another tutorial made for MKW, though be aware that there might be differences between MKW and NSMBW model importing processes!

Rigging
Often you have a model but it isn't rigged to bones. This means you can't animate it which basically makes it unusable in a game. Below are two tutorials, one for 3ds Max and one for Blender:

3ds Max

Blender

Transparent textures
Refer to this side to see how to setup the materials for transparency!

Setting up the lightmaps in the code
In Newer we got functions called. These have to be called in order to get your model to display correctly with applied lightmaps. Which one to call depends on the lightmap textures your model uses. E.g. if it has  and   for example, you will have to call.

Loading a model
The above code loads the Cheep Cheep model from the original game. For a list of the models in the game see here.

Notice, that the bitmask passed to  controls which parts of the model are copied. Most of the time you will see  in Newer but for example for pat0 animations to only apply to one actor or sprite at a time and not all of them that are spawned somewhere, you have to bitwise or the bitfield with 0x3, so each time to object is spawned, a new copy of the animation is created that will only affect the newly spawned object and not the previous ones. Below a list of flags for different animation types: And that's why above you see  instead as the code was written with the intention to use a pat0 animation. So:.

CHR0 Animations
After adding above to your class definition you have to get an animation and set it up. This happens in line 7 of the second code block of "Loading a model": Usually for chr0 animations we define a function like the one below so we only need to call that one function whenever we want to change to another animation: This function you also call at the end of your  function next: Just call this functions with changed parameters whenever you want to switch to another chr0 animation from here on. Lastly you have to make sure the contents of the functions above is in your code so the model gets updated correctly and the animation loops (lines 19-21).

PAT0 animations
Again you have to put above in your class definition. Then you add this at line 7 of the second code block of "Loading a model" to load the pat0 animation. Lastly you can define yourself a simple function which switches the texture according to the entries in your pat0 animation.

SRT0 animations
Above needs to be added in the class definition. Above has to be at line 7 of the second code block of "Loading a model". Lastly you need to process the srt0 animation each frame so you likely want to put above in your.

VIS0 animations
to be added

CLR0 animations
to be added

SHP0 animations
to be added