Guideline:
This article talks about what the community knows about Starfield's mesh-related assets, where are they located, how are they organized, what does each type of file contain, and etc. These assets include:

  • Geometry data: .mesh files
  • Morph data: morph.dat

Disclaimer:
Other referenced files in this article include:
  • Nif files.
  • Material files.
  • Texture files.
and will NOT be discussed in detail in this article. Additionally, technical details will NOT be thoroughly discussed in this article.

Catalogue:

  • General Q&A: Brief introduction to Starfield's assets.
  • Assets Organization: How assets are referenced and organized.
  • Import Export Tips: Things you should care about when importing/exporting.

General Q&A:
Q: How do Starfield's assets differ from those of Skyrim of Fallout 4? 
A: In Starfield, the geometry data is no longer stored in .nif files, and what's make things worse is that most file formats are changed. Old tools without update will no longer apply to Starfield's assets creation. Besides all this, Starfield's assets are organized in a over-complicated and non-intuitive way which takes a lot of effort to comprehend.

Q: What's actually stored inside the aforementioned files?
A: Here's what we know so far about what these files hold:
  • Nif files: Transformations, Asset references, Physics data, Bone list/positions, and other property specifiers.
  • Geometry files: Mesh geometry data, UV coords data, Normal/Tangent data, Vertex color data, Bone weighting data, Mesh LoD data, Meshlets data, Face culling data.
  • Morph files: Morph offsets, Vertex color offsets, Delta normals, Delta tangents, Vertex indexing data.
  • Material files: Unclear to me. There are other groups trying to decode the .mat format.
  • Texture files: dds textures.

Assets Organization:
A. Geometry files: Data/geometries/foldername/filename.mesh
Nif file should be the first thing you look for when creating mods. Basically, Nif files contain a lot of references to other assets. To find the reference to a geometry file, you need to:
  • Locate "BSGeometry" node in the block list.
  • Find the property name called "Meshes".
  • These meshes represent different levels of LoD. Open the desired one.
  • Find "Mesh Path", and copy the hex string as hex1/hex2.
  • Browse the ba2 file containing meshes, locate geometries/hex1/hex2.mesh. This is the referenced mesh file.

Similarly, you can also find the material file paths in nif files.

B. Morph files: Data/meshes/morphs/.../morph.dat
All morph files are referenced in esm files and are associated with nif files. You can find the corresponding morph file the model is currently using with xEdit or alternative tools.

Import Export Tips:
A. Import Meshes and Morphs:

To import a mesh, you can simply use the import button in the import dropdown menu of blender. To import a morph, you need to firstly import the corresponding mesh file and then import the morph file with your desired mesh active.

After the import of geometry file is complete, the weighting data will be stored as Vertex Groups in your object, you can do weight painting as you wish. However, the names of the bones are lost simply because the names are stored in nif files. To match the Vertex Groups with the actual bone names, you can take the following steps:
  • Open the corresponding nif file.
  • Find the "BSGeometry" that referenced the mesh.
  • Find the "SkinAttach" block, under the properties, you should find the bone list.
  • Rename the bone0 to boneXX in blender to the corresponding names in nif.

After the import of morph file is complete, the corresponding model will have new Shape Keys, which directly correspond with the sliders in game.

B. Export Meshes:
To export a mesh, you need firstly to make sure:
  • Your mesh is UV unwrapped.
  • Your mesh has vertex number lower than 65535.
  • Your model has correct face orientation.
  • Your model has no duplicated faces.

To make sure your model is UV unwrapped:
  • Go to "UV Editing" workspace in blender.
  • Select all verts by pressing "A" button.
  • Check the UV map.
  • If UV map doesn't exist, try "UV -> Smart UV Project".
  • Make sure your texture is aligned with the new UV map.
To make sure your mesh has vertex number lower than 65535:
  • Find "Viewport Overlays" at the up-right conner of your blender viewport.
  • Toggle on "Statistics".
  • Observe the statistics at your up-left viewport window.
To make sure your model has correct face orientation:
  • In "Viewport Overlays", toggle on "Face Orientation"
  • Make sure red points to the inside and blue points to the outside.
  • If not, try using "Mesh -> Normals -> Recalculate Outside" in Edit mode with all verts selected.
To make sure your model has no duplicated faces:
  • If your model has duplicated faces, go to Edit mode.
  • Select all verts by pressing "A" button.
  • Press "M" button and select "By distance".
  • Check the face orientations and other properties after this operation.

C. Normals Export Control:
This part should no longer be your concern in version 0.10, make sure you turned on "Auto Smooth" for your mesh in Blender, and What You See Is What You Get.

How to follow the Seamless Workflow for body mesh creation:
  • Prepare your body mesh and reference meshes (head and hands).
  • Create Base Meshes from them. A Base Mesh means the mesh has "Auto Smooth" on with no visible seams in blender. Base Meshes are used to properly calculate normal and tangent information.
  • For instance, if you want to create Base Mesh for imported vanilla body, you should: "Merge verts by distance" -> "Turn on Auto Smooth".
  • Select the body Base Mesh as Active Object, and the reference Base Meshes as Selected Objects. Body mesh is now subject to reference meshes.
  • Set "Compression Border" to 2. This is to make sure the positions of verts will be quantified at the same level.
  • Export the body object to Mesh or Morph or both at the same time according to your needs.
  • Export the references normally, they don't need to reference the body mesh.
  • Import the exported meshes and morphs in game.

Some notes on how to prepare your Base Mesh:
  • Merge the verts by distance to eliminate seams from mesh islands.
  • Mark sharp edges if you want sharpness at certain area.

D. Export Morphs:
To export a morph file, you can either export the morph data individually by clicking on the export morph button in the dropdown menu, or export morph along with the mesh with the sidebar button. Before exporting the morph, you want to make sure:
  • Your model has one "Basis" morph key, which is the basic looking of your model without any morph.
  • All shape keys are from range 0 to 1, and they should be relative and referencing the "Basis" key.

Be Warned: Starfield's models are highly disorganized in terms of the definition of axes in the geometry file. Which means you have to be careful with the rotation of your model in blender and try different rotations if morph deformation doesn't work as expected.

E. Debug Tricks:
If you are experiencing issues with the exported meshes or morphs, you can always re-import the exported mesh files or/and morph data to check if things are good. The vertex normal and optionally meshlet and culldata will be preserved on import.

Article information

Added on

Edited on

Written by

SesamePaste

19 comments

  1. Abbalovesyou
    Abbalovesyou
    • premium
    • 514 kudos
    so what can you do with meshes that seem to have alpha mask on them like hair? i opened the vanilla hair model and on export it doesnt apply the mask to it in game
  2. VOR4DORSxRAVEN
    VOR4DORSxRAVEN
    • premium
    • 0 kudos
    Hello! I am so sorry to bother you but I am currently attempting to use your guide to make ship parts using new models (Halo ships), and I believe I have done all the steps to this point correctly, however I am currently running into a wall on the xEdit steps (using vers. 4.1.5.0 SF1Edit64.exe). I cant seem to find any info on how to actually use the .nif model file i made in order to create a new ship piece. I have made a separate ship piece show up in the game in ship editor, however it's still using the model that it references (in my case its using the Ares Bridge model). Any help at all would be greatly appreciated. You are pretty much the sole reason I even decided to do this in the first place. And this is my very first mod so I'm well aware I have an uphill battle. Thank you so much for all your work, and if you cant help its alright, just figured I'd ask.
  3. sTr4PPd7181
    sTr4PPd7181
    • premium
    • 74 kudos
    I'ma need a youtube video of this with Subways Surfers playing in the bottom
  4. AlexScorpion
    AlexScorpion
    • premium
    • 1,296 kudos
    Somebody should to make a video tutorial of import/export procedure.
  5. lilyderill
    lilyderill
    • member
    • 0 kudos
    Hi! Need help with extraction of mercury space suit mesh) But I don't know which geometry file for it (
  6. NoraCHUCHU
    NoraCHUCHU
    • supporter
    • 67 kudos
    It just works, thanks for this guide.. I'm going to replace things with fallout 4 for my personal use, I wish Todd would stop the mania of changing things that are already established
  7. sabster123
    sabster123
    • supporter
    • 67 kudos
    Hi
    Im very new to modding and am slowly learning blender, nifscope.
    I made some edits to Amanerinas outfit in blender. 
    Exported the meshes to a folder.  
    Then, I opened amanerinas outfit in Nifscope, Changed the mesh path to point to the new mesh i have created, exported to the folders as shown in screenshot. 
    Put nifs in meshes>clothes
    Put meshes in geometries


    Now im getting instant CTD when loading a save :-( My problem is: I dont know how to bring my meshes from Blender into Nifscope, so that I can save as .nif file. I saw an old Skyrim youtube video, that exported blender mesh in .obj format, and I can export my .blend file into .obj, and then load the .obj into nifscope. But that format has alot of missing elements, and the nif generated from .obj (i think) makes me CTD
     Any help would be much appreciated...
    1. sabster123
      sabster123
      • supporter
      • 67 kudos
      Also, when I first imported the original Amanerinas outfit in blender, the skin mesh is 90 degree rotated..

      Is this how its supposed to be? 
      After editing the dress, the skin file i made, I made it also rotate 90 degrees like the original skin. is that correct?
    2. SesamePaste
      SesamePaste
      • premium
      • 61 kudos
      The one on the left is not the correct format for Starfield. Starfield no longer uses NiTriShape but BSGeometry. If you wish to replace a mesh, simply overwrite the corresponding mesh file.

      As for the rotation, unfortunately if you look at the same mesh in Nifskope, it will most likely be rotated as well. Beth is the one to be blamed.
  8. LJXALKS
    LJXALKS
    • member
    • 11 kudos
    请教几个问题?

    1.我仍然没有搞明白这个变形是怎么使用的。我在blender里导入的自己的模型,骨骼和权重都弄好了。这时我导入Morph.dat,会显示找不到match的mesh。我不知道这个morph是依赖什么来寻找相应的mesh的?是只要名字一样就可以吗?但我的mesh名字是对的,仍然无法match。我只有把游戏原版的mesh导入blender里,再导入morph,才会正常导入为形态键。。自定义的mesh哪怕名字一样、骨骼一样和权重都一样。都会找不到match的mesh。

    2.理论上,我让所有的变形都为0的话,我的模型只要刷对了权重,在游戏里应该是不会有撕裂和变形的。哪怕1的问题里,我没有正确导入Morph,我直接用原版的Mesh再导入的morph形态键。这时所有数值都是0,是不是我不需要做任何修改,直接再把导入的morph文件再导出来覆盖。应该就是把所有的变形“归0”了?那么理论上我自定义的mesh,套用了归0后的morph,应该就不会出现撕裂变形。但实际操作后还是变形的,也不知道是权重没刷好还是变形的问题。

    1. SesamePaste
      SesamePaste
      • premium
      • 61 kudos
      1. morph需要和模型有相同的顶点数,如果你是从0开始做morph的话,不需要导入任何morph,因为不会有任何morph能够匹配你的自定义模型。如果你需要导出自定义的morph,只需要设置好shape keys,然后导出morph就行。导出的morph和导出的mesh是匹配的。

      2. morph的导出和你在blender里面设置的值无关。事实上,每一个形态键对应一个morph target,改变blender中的值不会影响存储的数据。如果希望生成空的morph,只需要删掉原来的形态键,然后重新添加同名形态键,导出即可。"撕裂变形"具体指的是什么样的情况?这个描述比较模糊,最好是有对应的图片才能知道究竟是什么问题。一般来说,变形不正确分为几种情况:1)Spiky,表面出现尖锐突起,这个通常是顶点数不匹配导致的。模型的顶点数和morph中的顶点数不相等,或者顶点顺序不匹配。有报告称0.10版本存在这个问题,暂时不明确原因。2)Warpped,扭曲变形,这个是和模型的旋转有关,morph和mesh导出时的坐标系旋转不一致。3)Stretched,拉伸变形,这个问题发生的机理暂时不明确。
    2. LJXALKS
      LJXALKS
      • member
      • 11 kudos
      谢谢回答~
      1.应该是顶点数不同导致的。我换脸,每个骨骼都刷对了,但还是会有那种尖刺状和破裂。。大的形状是对的,就是不完美。我再试试从头制作一个空morph看看,能不能替换一个不变形有尖刺的人脸。

      2.你说的第3点的,那种拉伸变形,拉得特别长,甚至频闪成一个方盒子形状,据我实验,猜测应该是因为找不到相应骨骼导致的,就是Mesh里标好了每个骨骼的权重,nifskope里也命名了相应的骨骼。但是实际游戏里的骨架上没有那么多骨骼,就会出现超级长的拉伸。

      3.身体换模也会有一些奇怪的缩水褶皱一样的问题,我的解决方法是直接在游戏里捏脸界面把身材调到圆环最中间的体型的位置。一切都正常了。我再探索探索能不能设置好morph文件,这样可以自己定义体型也不会出现模型变形。

      4.目前我自己的最大难点,还是换脸换掉femalehead。有时换完,脸甚至会在游戏里直接消失。而且我发现随从萨沙摩根好像和玩家公用一个脸模……其它Npc不受影响。我的目标是,把原本的femalehead换成我自定义的模型,而且不需要变形、捏脸且没有模型破损变形和尖刺,目前还没成功过。
    3. SesamePaste
      SesamePaste
      • premium
      • 61 kudos
      替换头模暂时没有人成功过,好像是因为游戏在别的地方要求顶点数完全匹配。目前推测在nif中有相关的记录,尚不明确导致bug的原因是什么。似乎morph文件的顶点数需要和nif中的数字匹配。

      有新的消息我会通知你的。
  9. Thanks for making this compreshensive guide! I was able to sucessfully import a model into my game! The helmet isn't so bad to do but I am not sure I am ready to tackle the rest of the body with all of it's complexities, morphs etc!8497525-1697678757.jpg
    1. SesamePaste
      SesamePaste
      • premium
      • 61 kudos
      You are doing great! Looking forward to the whole suit.
  10. FRIENDMYFRIEND
    FRIENDMYFRIEND
    • member
    • 90 kudos
    TODDY SAID ON A WORLD PLATFORM WE CAN MAKE IT ANYTHING WE WANT.  NOW HOW IS THIS POSSIBLE IF THE BEST TOOLS ARE TAKEN AWAY?   DDD   :-)=
    1. SesamePaste
      SesamePaste
      • premium
      • 61 kudos
      Maybe in 6 months Todd will release some official modelling tools. Can't say for sure if they will be some castrated version.