-
Notifications
You must be signed in to change notification settings - Fork 1
Export
Exports all meshes parented to the currently selected armature or all selected meshes as a .nud model.
The path for the original .nud model is required for preserving data that can't be recreated on export. The addon assigns the path used for importing to an original_nud custom property on the armature to avoid needing to specify it for each export operation. The original model.nut and model.vbn should be in the same folder. The original_nud property should be set in the export settings when exporting selected meshes without an armature like for stage models.
Exports a model.nut file by encoding all textures used by materials assigned to the exported meshes when enabled.
All assigned image names or "TexID" should be valid hexadecimal hash with exactly 8 characters using the numbers 0-9 and the letters A-F like 4011000F. Any valid hash will work, but names should follow in game conventions for character and slot naming to avoid conflicting with other textures.
Edit the export settings for a particular Blender image in the sm4sh_blender tab of the Image Editor. Most textures are 2D and should use BC3Unorm with generated mipmaps enabled. Use Rgba8Unorm for textures that should not be compressed like gradient textures or low resolution sprite textures.

Cube maps should use the Cube setting. Mipmap generation is currently disabled for cube maps even if the Mipmaps option is checked. Cube map images should use a vertical layout with dimensions w x (h*6) with images for X+, X-, Y+, Y-, Z+, Z- stacked vertically.

Export a generated metal.nud file. This setting is enabled by default to ensure edits to fighter models have a correct metal.nud file. Disable this option when working with models that do not need a metal.nud like stages, items, trophies, etc.
The generated metal.nud will use all the same data as the model.nud and replace the first material from each mesh with a metal box material. The generated metal material will use the standard metal box material used by in game fighter models and preserve the normal map from the model.nud material if present.
Each Blender material has metal.nud export settings in the sm4sh_blender section in the Properties editor. Only the settings from the first material will affect the metal.nud export.

Meshes will be grouped into mesh groups for export based on their mesh name in Blender. Meshes within a group are sorted by their indices like "mesh.001" or "mesh.003". A mesh name without an index like "mesh" indicates the first mesh.
A material will be exported for each material assigned to each mesh. Smash 4 supports up to 4 materials, but only two materials are used in practice for some eye materials. Shader nodes with a label starting with "NU_" will export their values as material properties. Image texture nodes with indices as labels like "0" or "3" will export as material textures with the texture hash from the assigned image name like "40220005".
The first color attribute with the name "Color" will be exported as vertex color. Vertex colors are multiplied by 2.0 in game, so use a value of (0.5, 0.5, 0.5, 0.5) in Blender for fully opaque white. If a Blender mesh does not have any color attributes, a value of (0.5, 0.5, 0.5, 0.5) will be used for all vertices on export.