Meshes
Meshes are the collection of polygons that define the form of a 3D object. This section overviews how to export your meshes from blender (or other 3D programs if analogous export parameters are set appropriately) and subsequently import it into the CAS.
Exporting from Blender
The CAS works best if the meshes are exported in glb format. This guide is using Blender version 4.3.2 but other versions should have similar parameters.
Export Settings: Importing a Static Mesh
This includes objects like map/level meshes or props that would not require a skeleton for animations.
1. With the appropriate mesh selected and the export function selected (good advice would be to check Selected Objects for the Include tab), set Transform tab to +Y up as we have the Y axis set as vertical for Babylon |
|
2. For the Data tab, we want to ensure that most of the data is unselected, with the exception of UVs and Normals for the Mesh sub-tab (circled in red) and the appropriate Vertex Colors options if you are using them (circled in blue) | |
3. Once these are set, name your export appropriately, export your mesh, and your mesh glb is ready for import. |
|
Export Settings: Importing an Non-Player Character (NPC) Mesh with a Skeleton for Animations
This includes characters and/or creatures that require a skeleton to attach animations to.
1. With the appropriate mesh and skeleton/armature selected and the export function selected (good advice would be to check Selected Objects for the Include tab), set Transform tab to +Y up as we have the Y axis set as vertical for Babylon | |
2. For the Data tab, you want the following under the Mesh, Vertex Colors, Armature and Skinning tabs selected, with everything else unselected
| |
3. Once these are set, name your export appropriately, export your mesh, and your mesh glb is ready for import. |
|
Importing Meshes into the CAS
1. In the CAS, meshes are imported and housed here: |
|
2. In the meshes page, there will be a list of mesh assets and an upload function on the right: |
|
3. You can drag and drop your mesh into the upload area, or click on that area to navigate to your mesh file in your folders and select the mesh file: |
|
4. Once you have the appropriate file chosen, you can upload the mesh by pressing the upload button circled below: |
|
5. Viola, your mesh has been uploaded to the mesh repository, and you should be able to navigate down the list to find your mesh |
|
Best Practices
Here are some general guidelines for meshes to be set up for import into the CAS:
Your mesh should ideally have a low polygon/face count. For characters, for example, depending on its size and complexity, you’d ideally want no more than 10k polygons on the high end, and you would imagine less complex npcs and props would have far less. Environment meshes in general should also be as low count as possible without compromising your artistic vision.
You want to ensure that there is no material data on your mesh since these will be made in the CAS. This is especially so if the mesh uses vertex colors, and if you are using that make sure that there is only one color attribute in the mesh data.
Generally, you’d only need one UV map data set per mesh too.
We recommend naming your files and your mesh data in a way that best makes sense to you and your organisational sensibilities.