Guide to exporting and importing meshes (2026) - ME3Tweaks/LegendaryExplorer GitHub Wiki
This is a draft. It is based on new, experimental methods. Some details may change.
This guide is written with a recent version of Blender in mind, but it should work similarly with most 3d modeling programs.
Previously, there were several different ways to get meshes out of the game and back in after editing, or to import new meshes into the game. They all involved convoluted workflows (fbx using an outdated version of the format and custom scripts, going through UDK) or lost some of the information from the mesh (UModle psk + UDK losing vertex count and order, vertex normals, experimental PSK still losing vertex normals). Other things like multiple LODs and socket positions have remained confined to UDK. I am hoping we can finally put this all behind us and have a convenient, standardized workflow that maintains all of the mesh information using standard tools and formats. For that reason, I have implemented mesh export and import in the glTF 2.0 format. glTF 2.0 is widely supported. Blender has bundled the importer/exporter since version 2.8, so you can keep using an older version if you prefer. Most other 3d modeling programs also have the ability to import and export it. It supports all the data we need for meshes, including custom vertex normals. It is extensible if there is ever anythings else we want to include. And now LEX can directly import and export it.
Here is an overview of the process as it stands now. (once the pull request is merged) O* pen LEX Package Explorer and find the mesh you want to export (Skeletal and Static meshes are supported).
-
Enable Experiments in LEX if not already enabled (Debugging > Enable Experiments)
-
Click Experiments > Squid's new and exciting ways to break stuff > Export to glTF/glb (with or without textures; either is fine)
-
Save your file.
-
Import your file into Blender by dragging and dropping it. The default import settings are fine
-
Make your edits
-
Export the mesh and armature if needed to glTF/glb (Again, defaults are acceptable)
-
in LEX, select the mesh you want to replace
-
click Experiments > Squid's new and exciting ways to break stuff > Import glTF/glb
-
select your file
-
profit!
That's the whole process. No UDK, no custom scripts, no outdated formats. This will export and reimport all LODs, the socket positions, the skeleton, and the mesh data including custom vertex normals. It will automatically hook back up your materials most of the time as well. You can replace a mesh by selecting it before import or import a new one by selecting anything else. If you are already a veteran, you can likely figure out the details from there. If not, or if you want more tips, let's go into more detail.
##What are the best import settings? As I said above, the defaults will work. But I recommend checking "Merge Vertices", unchecking "Merge Material Slots When possible", checking "Disable bone shape". You should leave the bone direction dropdown on "Blender" and leave Shading mode on "Use Normal Data". You can decide whether to pack images or not.
##What are the best Blender export settings? As before, the defaults will work most of the time, but tuning it can be useful. Because glTF files can contain multiple meshes, by default it will export everything in your file. This may not be what you want. the "Include" section will let you narrow it down to just visible or just selected options. If you are exporting skeletal meshes, make sure the mesh is parented to the Armature and has an armature modifier, and make sure both are selected/visible if you narrow down what you are exporting. Otherwise you might accidentally export your mesh as a static mesh. Similarly, make sure the Empties representing the sockets are visible/selected if you want to export those. If you export multiple meshes, you will not be able to replace a mesh in LEX, but you can import them all as new meshes. You must leave the transform to Y up setting checked or your models will get imported into LEX rotated 90 degrees. any animation data will be ignored (for now) so I recommend unchecking this. Similarly, any material data will be ignored, so I recommend changing Data > Material > Images to None so the textures don't get exported for no reason. Do not change any of the settings under "Armature". Under "Mesh" I recommend checking "Shared Accessors." This changes the format of the export slightly in ways that are not worth going into right now, but it will help keep your vertex count down. The default with this option unchecked may unnecessarily duplicate vertices at material seams. I also recommend checking "Attributes" to get your vertex count down. My code has some logic for de-duplicating vertices that relies on the attribute data. "Apply Modifiers" may be useful depending on your workflow. Tangents are optional. Loose points or edges will be ignored on import. Once you get all this set, make sure you check "Remember Export Settings" so you don't have to do this every time. I receommend gltf binary format (default), but glTF separate will also work fine.
##How do I work with sockets? Sockets get imported into Blender as Empties parented to bones in the armature. These are placeholder objects that have a location, rotation, and/or scale (relative to their parent) but no actual geometry data. They show up in the viewport as dotted lines along their local axes. I recommend importing a weapon mesh and parenting the armature to a socket Empty for reference, then adjusting the position and rotation to get it looking correct. Scale is supported if you want to change the gun scale or hide the guns entirely by scaling them down. These changes can be imported back into LEX. Sockets are not required, but are highly recommended for outfit meshes so that guns can be holstered and held, and certain animations like holding cups will work. They are also used by weapon meshes to determine where attachments will go, where effects like muzzle flash and tracers will go, etc. You should try to match the sockets that exist in vanilla.
##What is a LOD? Level of Detail, or lod, is a system for saving resources by showing a lower quality version of things when they are further away. Most vanilla meshes have 3 LODs. These are number 0, 1, and 2, with 0 being the highest quality mesh and 2 being the lowest quality.
##How do I work with LODs? Are they required? LEX will export all of the LODs of a mesh, and they will get imported into Blender as separate meshes under the same armature (or Empty for static meshes). You can make edits to the LODs, or generate new ones, or just delete them. They are not required. If you make new ones, the naming is fairly flexible. They just need to have the same parent as the highest quality LOD, and they need to be named with the main mesh name as a prefix, and will ordered alphabetically. So naming them Foo, Foo1, and Foo2 will work. so will Bar, Bar_LOD1, and Bar_LOD2. They need to be exported in the same glTF file to be imported as LODs.
If you want to generate LODs, I recommend waiting until the end when you are happy with the main mesh, then duplicating it and applying a decimate modifier to the lower quality LODs. There are Blender extensions that can make this process easier.
If your outfit mesh is primarily going to be used by Shepard, it will nearly always be at the highest LOD and there will only be one copy, so LODs are probably overkill. If it is going to be used by NPCs or there will be multiple copies around, LODs are highly recommended to help with the performance, especially if the mesh is fairly high poly.
##Can I have multiple meshes under the same armature? Yes. Including with LODs on them. Just follow the (very loose) naming rules above. As long as you name them differently, they will get imported as separate meshes. They will have identical sockets, as those are parented to the bones, not to the mesh. If you want them to have different socket positions, they need to have separate armatures.
##How do I work with Static Mesh collisions? This in not fully implemented. For now on import they will use simple box collisions or the collision of the mesh you are replacing. If there is demand, it is likely possible to implement more complex collision. You can also generate this in UDK.
How do I get the best looking Normals?
The vertex normals on vanilla meshses are baked from higher quality meshes. I recommend keeping them mostly as is. But I do have some tips to work with them, which may also be helpful when porting meshes from other games. When you import a glTF, check "Merge Vertices." Mass Effect and the glTF format duplicate vertices across UV seams and material seams, so there will be overlapping vertices with the same normal, but different Materials/UVs. Blender can handle these as a single vertex, and it will work better with sculpting if they are a single vertex. Merge Vertices on import will de-duplicate these vertices wherever it can while maintaining the vertex normals. It will merge vertices if the the normals match, but leave them separate if they do not, making this better than just merging by distance. It will maintain sharp edges with a change in normal. Next, select your mesh, go into edit mode, go into edge selection mode, deselect everything, and then click Select > Select All By Trait > Non Manifold. This will select any edges that aren't part of a closed shape, like sharp parts of the mesh or holes, such as at the neck or wrists if the hand goes up the sleeve and then ends. It is worth cleaning up anything that shows up here that is undesirable before you do anything else with the mesh. If you see a few edges selected where you don't expect which should be smoothly shaded, you may have a hole that didn't merge quite right select only those edges and merge by distance to close that hole. You can confirm whether it is closed by selecting non manifold edges again and seeing that part not selected. This makes sure that as you reshape the mesh, that part will stay smooth and you won't accidentally open up hole later or get gaps during animations as the hole gets slightly different weight paint values. If you see any sharp edges that you do expect, like the corner of an armor plate or the edge of a belt, where you want those vertices to move together, but to maintain the sharp shading, you can do that. Select only those edges, and then click Edge > Mark Sharp, then merge by distance. This way, it will merge the vertices and make sure they sculpt and weight paint together, so you won't accidentally open a hole in the mesh later or during animation, but it will maintain the sharp shading. Mark Sharp is also very useful if you want to introduce sharp shading to your model without leaving holes that can open up.
Finally, I recommend an Edge Split Modifier with just "Sharp Edges" checked, applied before export (you can do this with the "Apply Modifiers" checkbox in the export setting). This will ensure that your sharp edges are maintained when you import back into LEX. Your model will be smooth where you want it to be, sharp where you want it to be, and without holes or gaps.
How do I order the triangles for alpha rendering order?
Some materials, especially hair, have some transparency, and render order for triangles matters a lot to get the mesh looking good. some older workflows, especially going through UDK with psks, completely mess up your triangle order and ruin your hair meshes. This glTF workflow should maintain your triangle order with the following rules:
- Triangles will be grouped by material slot, in the order they appear in Blender.
- order within a material slot will be maintained.
Note that I said material SLOT, not material. This means you don't actually have to introduce more materials, you can have multiple slots in Blender assigned to the same material. So, say you have the under layer of your hair that you want to render first. Assign all of those triangles to the first material slot. Next, you want the main parts of the hair to render, so you assign those triangles to the second material slot. Finally, you have various wispy bits and parts that stick out that you want rendered last. assign these to the third material slot. These slots can all point to the same material in Blender. In LEX this will become a single material with multiple sections if you dig into the mesh binary. Suffice it to say, you can order your triangles this way and it should carry through to LEX. You can split it as many times as you need to to get the hair looking how you want. You can also use multiple materials if it makes sense to do so.
How does this play with older methods?
Good question. If you have previously imported a model into Blender with either psk workflow, you need to scale your meshes and armatures down to 0.01 (1% size), apply that scale, and then you are ready to export as glTF and import using this workflow. You will need to reattach sockets manually in LEX.
If you have previously used the fbx workflow to get things into Blender, it is already at the right scale and you can simply export as glTF. You may need to replace the armature if the bone directions are different.
If you have previously used the glTF export using umodel, the skeleton is slightly different and this will mess things up. The bones are rotated 90 degrees from where my code expects them to be due to differences in coordinate systems. You need to replace the armature with one from the psk or new glTF flow. Then you are ready to export.
##What is the difference between glTF and glb? glTF stands for Graphics Library Transmission Format (same GL as OpenGL or WebGL). Glb stand for glTF Binary. glTF is a semi human readable format (it's just json if you open up the file) useful for debugging. It comes along with a bin file and png texture files, if applicable, which must be moved with that glTF file for it to work. glb bundles all of the data into a single file, which is easier to copy around and share. LEX and Blender support both. I recommend glb by default.
##How do I do animations? The glTF format supports animation data, but this is not yet implemented in LEX. For now, you can still export animations as PSA and import them onto your armatures in Blender just like you would before. You just need to scale the animations down to 0.01 on import.
##What about Morph Targets? This will eventually be done with glTF, but it is not yet implemented. stick to the psk workflow for now if you need to work with morph targets specifically.
##What is the "With Textures" export option? The glTF format supports some very powerful material options, as it is able to contain all the information needed to render a scene, not just mesh geometry data. LEX takes advantage of this to attach the diffuse and normal textures on export in a way that will work in any glTF viewer and can import into Blender seamlessly. The only disadvantage is that the file size will be much larger and the export takes much longer. It can be upwards of a minute if there are multiple materials. If you do use textures, when you import into Blender, you need to enable Texture object color in viewport shading mode or go into render mode to see the textures. If you choose to export without textures, you will need to set up your materials like you would with any of the older methods if you want better preview functionality. Material information besides material name will be ignored when LEX imports a glTF.
What are the limitations of this new Export/Import stuff?
You can't export/import skeletal meshes from/to OT1. You can't export/import Static meshes from/to OT1 or OT2. The mesh formats are slightly different and it hasn't been implemented. You can export or import both skeletal and static meshes from ME2, ME3, and any LE game. You cannot import or export from UDK files.
##Can I export multiple meshes at once? yes, though it's fairly limited at the moment. If you select a BioPawn, SFXStuntActor, or SkeletalMeshActor and then use the export experiment, it will export all of the meshes associated with that actor in a single file. This includes any of body mesh, head mesh, hair mesh, headgear meshes, accessory meshes, etc. It does not support Exporting BioMorphFace yet, so you may get a generic head shape in that case. If there is a usecase where you want to export multiple meshes at once in a different way, it is likely we can implement it, so open a feature request on Github or talk to DropTheSquid on Discord.
##Can I replace a mesh during import? Yes. Select the mesh you want to replace and then import it. It will replace the selected mesh. If you select anything else (or nothing) it will import as a new mesh.
##Can I import multiple meshes at once? Yes. You can export multiple meshes at once from Blender or other software, and you can import them all as new meshes at the same time to LEX. Replacing a mesh is not supported in this case.
##What else might this be able to do in the future? glTF 2.0 is a very flexible and extensible format. There are a lot of things we could potentially do in the future.
- We could export animations as glTF alongside an armature.
- We could export meshes with morph targets, bone offsets, etc in glTF.
- We could support exporting/importing static mesh collision information.
- We could export more complicated materials for simpler rendering workflows. glTF materials support metallic, roughness, and emissive. we understand Mass Effect materials well enough that we could translate these to glTF materials in a somewhat automated fashion in the future.
- We could potentially export entire sections of levels, with the correct relative locations for meshes and duplicated meshes where needed.
- Almost certainly things I have not thought of. AS I said, the format is extensible.
##What are other useful experiments for working with these meshes? I have several other useful ones. There is another new experiment that will export all of the textures associated with a material to a folder. Very useful if you want to set up more advanced materials in an external program. I have an experiment to invert the green channel of a texture. This is useful because there are two different conventions for how Normal maps are made and used, and they differ in the direction the green channel indicates. Mass Effect and Blender use opposite conventions. The green channel is automatically flipped when you export a glTF with textures. If you bake a new normal map or import it from another game, you may need to flip the green channel when you get it back into ME. I have an experiment to generate the blue channel of a normal map. Because the blue channel of the normal map can be calculated from the red and green channels, some games store other information on the blue channel of the normal map. This experiment will fix that for you, calculating the correct blue channel information from the red and green channel data. Similarly, some games store data in the alpha channel of the normal texture. I have experiments to make a texture opaque or transparent, clearing out all the alpha information. This can also fix issues such as armors ported between games glowing or looking wet due to different meanings of alpha channels data. I have an experiment to convert a BioMorphFace into a unique mesh in LEX itself. You can use this experiment and then export as glTF and edit i you want. Note that glTF does not yet include the bone offset information, so it may look off.