SDK tutorial

This page will go over how to make a custom model using the sdk for Super Mario 3D Land.

Prerequisite
Before we start this tutorial, you are required to have the SDK files as well as a compatible version of Maya, 3DSMax or Softimage in order to follow this tutorial. If you would like to follow a video use this video. This tutorial will be using Maya, however it is also possible to use 3DSMax and Softimage if prefered.

Steps to follow:

 * 1) Export your model as either FBX (recommended), DAE, OBJ or  or any file format Maya is compatible with.
 * 2) Now open up Maya with the corresponding NW4C plugin batch file and import your model. (You may need to increase clipping if you can't see your model)
 * 3) If you know how to configure materials and lighting then skip this step but if you don't then disable fragment lighting by going to Windows -> Rendering Editors -> Hypershade, highlighting all materials and unticking fragment lighting. (Note that this will make your model not have any actual lighting)
 * 4) Now you can export your model as CMDL under the NW4C tab in the top bar. You may also find it handy to export it as OBJ so that you can view your model and check the its position/size in The4thDimension.

BCMDL exporting

 * 1) Now open up CreativeStudio or 3DEditor and import your CMDL.
 * 2) Now you can either configure your materials and export or directly export to .bcmdl by going to File -> Save binary.

Model importer
This part assumes that you have set up The4thDimension, however if you haven't, then follow this page.
 * 1) Go to Tools -> Model importer and open up your BCMDL.
 * 2) Set the clipping radius inbetween a range of 6000-99999 so it appears in game.
 * 3) Click on Generate now (CollisionMng) and once the octrees have generated, you can either hold enter or input the Collision Codes into their respective sections.
 * 4) Click on the Generate SZS button (Collision) for collision or Generate SZS button (No collision/NPC) for no collision to export your .szs file.

CreatorClassNameTable setup

 * 1) Go to Tools -> CreatorClassNameTable editor.
 * 2) On Object name, type the name of the object which you are trying to add.
 * 3) Click Save.

Adding custom collision (KCL and PA)
This Section will require you to have the KCLImporter

Exporting custom collision model

 * 1) Export your custom collision model as .obj.
 * 2) In Blender export options, tick the Triangulate Faces button and set the scale to 100. In Maya, you can just export the model as .obj as normal.
 * 3) Now you can import your OBJ into KCLImporter
 * 4) Set the Sound,Floor and Wall codes as you desire and export your .kcl and .pa.
 * 5) Now open up EveryFileExplorer and open your .szs file.
 * 6) Replace the .kcl and .pa by right clicking and save the file.

Adding custom material animations
[WIP]

Miscellaneous
Models, textures and animations can be exported using Spica.

Configuring Lights and Materials
Fork of EveryFileExplorer which adds support for exporting material settings.

The game makes use of 2 Lookup Tables which can be used to preview materials more accurately in CreativeStudio:

Lookup Table used for stage lighting

Lookup Table used for object lighting

If the lookup table is to be used externally (which is mostly the case for objects in 3DL but not for stage models), you can delete it before exporting the binary model file. In that case the lookup table is mainly used to be referenced in the material's fragment shader settings.