Skip to content

Mesh Viewer

Kamzik123 edited this page May 11, 2024 · 9 revisions

Introduction

This page will tell you everything you need to know about the Mesh Viewer so you can start creating custom mesh mods as soon as possible.

Bone Count Limitations

All of pre-Assassin's Creed Unity games have a limit of 255 bones for each character, if you exceed the limit on a character, the game will crash.
All post-Unity games, Ghost Recon Breakpoint included, have a limit of 65535 bones.

Blender Versions

The toolkit has been made with Blender 4.0 and 4.1 in mind, it has not been tested on older Blender versions and probably won't work with older versions.

Mesh Viewer Window

1. Save Button

Saves your edits into the separate Mesh and Skeleton files.

2. Save As Button

Allows you to save the Meshes/Skeletons as either Mesh/Skeleton formats for other supported games or exporting the Scene or individual Meshes into the glTF format.

3. Add Button

Allows you to load more Mesh/Skeleton files.

4. Tools Button

This button houses an extra set of tools for editing the Mesh files. Currently there is only the option to merge two Mesh files into one Mesh file, however, this is no longer necessary as it can be done in Blender.

5. Scene Tree View

Shows a tree view of the currently loaded files.

6. Viewport

Shows a preview of the loaded Meshes and Skeletons.

7. Details Panel

Shows the details of the currently selected Mesh/Skeleton and allows you to edit them.

Loading files

Loading meshes

Files can be loaded either by double clicking the files or right clicking and selecting "Open mesh viewer".

Loading each mesh one by one

Loading multiple meshes at once

Loading skeletons

Loading skeleton files

Skeleton order

When loading skeletons, it is important to load the "main" skeleton first. It is easy to see when the skeletons were loaded in the incorrect order, as they will look deformed. In this example the main skeleton is the "Generic_Unique_Male" skeleton.
Is is possible to set which skeleton is the main one after loading all the skeleton files.

Setting skeleton as the main skeleton

Right click on the desired skeleton and click "Set as main".

Exporting files

This section will show you how to export Meshes/Skeletons to either glTF, BuildTables or XMLs.

Exporting to glTF

You can either export the whole scene as one glTF file or you can export all of the individual meshes as separate glTF files.

Exporting the scene from the tree view

Exporting the scene using the Save As button

Exporting each Mesh into an individual glTF file

Exporting to BuildTables

You can either export the whole scene into a BuildTable set or export Mesh/Skeleton BuildTables individually.
The scene BuildTable set will consist of three BuildTables, one for Meshes, one for Skeletons and a master BuildTable which loads the other two BuildTables. This way all you need to do is reference the master BuildTable in the EntityBuilder or another BuildTable to load all of the Meshes and Skeletons.
When exporting the scene or the individual Skeletons BuildTable, you have the option to include only addon Skeletons or all Skeletons. Including only addon Skeletons will skip the "main" skeleton we discussed earlier.

Exporting the scene to a BuildTable set with all Skeletons

Exporting the scene to a BuildTable set with just addon Skeletons

Exporting the Skeletons BuildTable with all Skeletons

Exporting the Skeletons BuildTable with just addon Skeletons

Exporting the Meshes BuildTable

Exporting to XML

You can also export all of the loaded Skeletons to the XML format for editing.

Importing files

Importing is done by drag and dropping a GLB file onto the Mesh Viewer window.
If you have any meshes loaded in the Mesh Viewer while you are dropping a GLB file onto it, all Meshes with matching IDs will be replaced, if a Mesh has a unique ID or no Meshes are loaded, the Meshes will be added.

Importing a GLB file

Blender exporting and importing

Blender import settings

When importing a GLB file into Blender, it is very important to use these import settings.

Creating a GLB file

It is recommended to use the AnvilToolkit Blender export preset when creating GLB files.
If you have meshes which you would not like to get exported, you must change the export settings to include only the selected files as shown in this gif.

Blender naming conventions

Materials

Since materials are used for defining the separate Mesh Primitives, it is useful to follow this naming convention so all materials get assigned correctly automatically.
The toolkit ignores everything after the dot in the material names, so, for example, Material_1.001 and Material_1.002 will import with the same ID.
If a material name is not numeric, the toolkit will automatically convert it to a numeric ID.

Vertex colors

Due to Blender's limitations, Vertex color must follow a set naming convention in order for the toolkit to import them correctly.

  • Color 0: This color can have any name you want
  • Colors 1 - 4: These colors must be named "_COLOR_n", with n representing the index of the color, so for example Color 1 would be "_COLOR_1". It is case sensitive.

Common errors

Missing camos in GRB or weird shading on some Meshes

This is usually caused by either not importing the necessary Vertex Colors or each Vertex Color being the wrong color.
When creating custom Meshes, it is best to try to match the Vertex Colors of the original Meshes as close as possible.
You must also select the required Vertex Colors in the Mesh Import Settings.

Greyed out Tangents

This is caused by the Mesh not being triangulated before exporting it from Blender. It can be fixed by first triangulating the Mesh, using the "Triangulate" modifier, in Blender and then exporting it.

Missing Tangents error

Same thing as Greyed out Tangents

Exceeding the bone limit

This is caused by having a Mesh Primitive exceed the game's limit for bones per Primitive. In most games it is 42. This can be fixed by assigning a separate material to some vertices in Blender and reexporting the mesh.
The Mesh Primitive number tells you which material you have to separate into two or more materials, it is a direct index in the materials list. You can follow the Materials naming convention so all of the separated Mesh Primitives import with the same Material ID.