-
Notifications
You must be signed in to change notification settings - Fork 1
Export
Exports the currently selected armature and meshes as a .wimdo model.
The path for the original .wimdo model is required to allow for preserving model data that can't be generated yet on export. Newer versions of the addon store the path used for importing in an original_wimdo
custom property for the armature on import to avoid needing to specify it for each export operation.
Xenoblade 3 models should enable _speff mesh export to support the transition wipe effect used on the character menu and for certain transformations. Enabling this setting will have no impact on models for other games. Mesh and material names should have the correct index prefix from the original wimdo for this feature to work properly.
Enabling Export Images will convert the images for any of the assigned image texture nodes that use the appropriate naming conventions. See the naming conventions for textures below for details. Both packed and unpacked textures will be exported as long as they are used for an image texture node.
Specifying an Image Folder will instead replace textures with the appropriate naming conventions in the given folder. Any format supported by Blender will work like PNG, TIFF, or JPEG. Uncompressed formats will be encoded to match the format and mipmap count of the texture index they are replacing in the original wimdo. Image data from DDS files will be copied as is without any additional encoding or conversions. This allows for using a folder of DDS images exported by xc3_tex.
Edit the model textures in the .wimdo model using xc3_tex. See the material node groups in Blender for which channels of each texture are used for outputs like specular or metallic.
Use xc3_viewer for quickly previewing models before testing in game. Make sure to set the appropriate shader database to preview material texture assignments.
The model format has a limit of 4 weights per vertex. This can be enforced in Blender using Mesh > Weights > Limit Total in Edit Mode. Weights will be normalized on export, so there is no need to normalize weights within Blender.
Blender assigns vertex skin weights to meshes using vertex groups. In game models weight vertices to a list of bones defined in the wimdo. This list may not always include all of the bones in the skeleton. Any vertex groups with bones not found in the wimdo bone list will be skipped and generate a warning on export.
Blender meshes are assigned the index of the original mesh in the .wimdo model on import. The addon uses these indices to assign undocumented fields from the original mesh at that index on export. This can reduce the risk of crashes in game after exporting. The values after the prefix like the material name are ignored, so names like "0" are equivalent to "0.body" for exporting. If preserving the original mesh values is not desired, simply delete the prefix from the mesh name in Blender to use default values for mesh flags.
Materials should have the index of the original material like "0.body" instead of "body". Materials that do not have an index prefix will attempt to select the first original material with a matching name. Materials with an appropriate index prefix but a new name like "0.new material" will add a new material that uses the material at index 0 as a base.
Image textures should have the index prefix for the original texture similar to xc3_tex like "bl000101.0.texture". The index is needed for editing the assigned textures in materials. The name and prefix are both optional. If the index is not included, the image texture name will be searched in the original wimdo textures to determine the index. Names like "bl000101.0.BL000101_COL", "0.BL000101_COL", and "BL000101_COL" are equivalent as long as the original wimdo has a texture named "BL000101_COL".
Added textures should have consecutive indices starting with one more than the highest original texture index. For example, Pyra's model (model/bl/bl000101.wimdo) has 34 textures and "bl000101.33.temp0000" as the last texture. Additional textures should have a names like "bl000101.34.new_texture_1" and "bl000101.35.new_texture_2".
Each image texture material node also has an index for its label like "0" or "3" to indicate its index within the material. Unconnected image texture nodes still affect texture assignments on export as long as they have an appropriate index label.
Only numbered image texture nodes will affect texture assignments. Global textures like "gTResidentTex09" are hardcoded in the shader, so reassigning these textures in Blender will not affect exports.
When adding a new texture not present in the original wimdo, make sure the new texture is assigned to one of the numbered image texture nodes.
All UV and color attribute names must match one of the in game attribute names. For meshes with only a single UV and color attribute, rename the UV attribute to "TexCoord0" and the color attribute to "VertexColor" in the object data properties. Any attributes required by the shaders in game that are missing in Blender will have default values assigned when exporting.
There is no guarantee that Blender scenes will be fully compatible with a new release of the addon. For example, scenes using addon version 0.8.0 may not support all the new features in 0.9.0 when exporting. Patch releases like 0.11.0 to 0.11.1 are more likely be compatible without requiring any changes to the Blender scene.
Updating a model export to use a newer version xenoblade_blender version will typically only require updating the addon and then exporting the scene again. If the Blender scene has been lost or is no longer compatible with the latest addon version, import the exported wimdo with the latest version and export again using the unmodified in game wimdo as the original wimdo path. This will preserve as much of the data as possible. Make sure the original .arc or .chr file is in the same folder. Texture edits will need to be applied to the exported model again using xc3_tex.
Importing the model with outlines enabled to easily preserve existing outline data. Any mesh with the solidify modifier and a valid original mesh index will attempt to generate an outline mesh. For example, a mesh named "1.material" will find the original outline mesh used for the mesh at index 1 in the original wimdo. If the original mesh does not have an outline mesh in the original wimdo, no outline mesh will be generated. The generated outline mesh will use the original outline mesh flags and material.
Outline materials do not use textures, so the assigned material in Blender does not affect outline mesh generation. Outline material names are not always the original material name with "_outline" on the end, so only the original mesh index is used.
The RGB components of the "OutlineVertexColor" color attribute control the outline color. Outline thickness depends on the "OutlineThickness" vertex group values. These values can be edited in weight paint mode. Use the Material Preview or Rendered view mode to see the outline thickness in the viewport. Meshes that do not have the "OutlineThickness" vertex group will use the alpha of the "OutlineVertexColor" color attribute as a fallback if the vertex group is not present.
Toon shaders for Xenoblade 1 DE, Xenoblade 2, and Xenoblade 3 select a shading gradient from one of the 256 rows of monolib/shader/toon_grad.witex
. Editing the value for the "Toon Gradient Row" node will edit the selected gradient applied on export. This will only affect materials with an original wimdo material that uses toon shading.
The gradient texture will be loaded from the monolib/shader
folder on import if present in the wimdo path to see the effect of the selected gradient in Blender. When viewing this texture in an image editor, make sure that the vertical orientation and desired row matches the conventions of the generated material nodes in Blender.
Exporting is still experimental and may not work properly for all models. Please mention the file path of the original .wimdo file when reporting issues to aid in debugging.
- Material editing is limited to changing material assignments or adding new materials.
- Skeleton edits are not supported like transforming, adding, or deleting bones.
- Meshes should be split by material since meshes can only have a single material in game.
- Generating _speff meshes and materials for Xenoblade 3 won't always work properly when adding new meshes even if the correct naming conventions are used. Proper _speff material generation is being researched for a future release.
- The shaders in game have a hardcoded limit on the number of unique skin weights for a model. Models that would exceed the unique weight limit will raise an error when exporting. Reduce the number of unique weights in Blender by weighting more vertices to a single bone, limiting totals, cleaning small weights, or quantizing the weights. In game models typically use 100 steps between 0.0 and 1.0 for skin weights for 2 decimal places of precision.