Thank you Joshcka for your amazing work on this. Sorry it took so long for me to post this here, but I have been developing a lot of new features for your plugin. I redubbed this new version "
fmt_CP77mesh" to avoid confusion, since "mesh" is such a generic format name.
fmt_CP77mesh.py v1.44
New / updated features:
Textures (Import and Export):
- Preview of .xbm and .mi textures (as extracted by the latest CP77Tools), including files with multiple images inside
- Preview of other textures embedded inside meshes, particle files, and wherever else if you rename the file's extension to ".cp77tex"
- Beta texture export support for encoding images as new .buffer files by exporting as .cp77tex
Model Import:
- Imported models are rotated upright and scaled to a user-set scaling value (default 100x, found at the top of the .py file)
- Corrected bone maps when using a .rig file
- Correctly rotated normals
- Support for .morphtarget meshes (import and export) and export support for static meshes
Model Export:
- Export FBX to .mesh, writing new model data to a new .mesh.buffer file
- Modify only the bone positions in a .mesh by exporting them with the advanced option " -bones". A copy of the picked model will be created using the bone positions from your FBX (no need to rebuild this since no .buffer file is made)
- Modify the bone positions and model data of a .mesh simultaneously by exporting with the advanced option " -meshbones"
About Model Export:
You can create a mesh mod by importing an original .mesh into Noesis and saving it as FBX, editing it in a 3d editor, then loading that FBX back into Noesis and exporting it back to .mesh over the model you originally extracted it from.
Mesh editing seems to work well now as of v1.44; most of the issues with crashes and exploding verts have been fixed.
To get your mesh in-game, you need to reconstruct the .mesh file so that your new buffer is packed up and embedded inside it. The latest versions of CP77Tools can do this using the command:
Code: Select all
rebuild -p "MODDED FOLDER PATH" -b -t --keep --unsaferaw
The following options are available at the top of the .py file and can be changed with a text editor:
Code: Select all
#Mesh options:
meshScale = 100 #scale model to this size
bHighestLODOnly = True #if put to True, the low poly meshes will be loaded as separate models
bLoadRigFile = False #if put to True, enables user-selection of a paired rig file with the skeleton hierarchy info
bAutoDetectRig = True #if put to True, the plugin will search for and load the closest-named .rig file to the mesh filename
bParentToRootIfNoParent = True #if put to True, unparented bones will be parented to Root
bReadTangents = False #if put to True, tangents are read from the file and applied to the model
bImportGarmentMesh = False #if put to True, garment meshes will be imported along with the regular mesh
bImportExportDamageMeshes = True #if put to True, vehicle damage meshes will be imported along with the regular mesh, and will be exported if they are detected in the fbx
bImportMorphtargets = False #if put to True, morphs will be imported with morphtarget files (currently broken)**
bVertexColors = True #if put to True, vertex colors will be read and applied to the model on import, and will be written on export
bExportAllBuffers = True #if put to True, all buffers will be exported when saving meshes or textures, rather than just the ones modified
bConnectRigToRoot = False #if put to True, rigs will be assembled in such a way that a connection is always made to the Noesis_Root bone
bSplitDoubleSidedMeshes = True #If put to True, double-sided meshes (such as hair meshes) will be imported as inner and outer parts
bFlipImage = False #if put to True, images and UVs are flipped upright on imported textures and meshes
bManualDimensions = False #if put to True, the user can set their own texture resolution on import
bManualCompression = False #if put to True, the user can set their own texture compression on import
bReadAsSigned = True #if put to True, textures will be decoded as signed data, making normal maps yellow instead of blue[/code]
If you want to follow the development of this version more closely, you can on the Cyberpunk Modding Discords:
Cyberpunk 2077 Modding:
https://discord.com/invite/2bT93CkA4B
CP77 Modding Community:
https://discord.gg/Epkq79kd96
Recently updated:
-Fixed Noesis splitting some meshes
-Bone hierarchy is automatically from your extracted game files and saved to a text file "CP77ExtractedPath.txt" next to the plugin
-Single-LOD hack is applied when exporting with `bHighestLODOnly`
-Tangent space problems (causing neck seams) are fixed
-Bones are rotated upright in-place and in-world
-Morphs are automatically disabled on morphtarget export
-New advanced options "-cp77optimize" to optimize the mesh on import and "-vf [factory]" to set a morphtarget vertex factory on export
-A Maxscript is included with the plugin for use in remote-controlling Noesis from 3dsmax, for those who have it
-Double-faced hair meshes can now be imported correctly if they are split in two by enabling "bSplitDoubleSidedMeshes". These meshes must have their normals recalculated and their faces unified, but after doing that they will work correctly
Download Here:
https://www.mediafire.com/file/zyutd5se ... 2.zip/file
Old versions:
Code: Select all
https://www.mediafire.com/file/zyutd5se2dphute/fmt_CP77mesh_v1.52.zip/file
https://www.mediafire.com/file/8gpv9grobnu9y93/fmt_CP77mesh_1.5.zip/file
https://www.mediafire.com/file/rikr6retuqophs6/fmt_CP77mesh_1.49.zip/file
http://www.mediafire.com/file/g1t443fj7nfn6tt/fmt_CP77mesh_1.48.zip/file
http://www.mediafire.com/file/kkj9orx9qsucj8o/fmt_CP77mesh_1.47.zip/file
http://www.mediafire.com/file/bouaqa47ywpa9cn/fmt_CP77mesh_1.46.zip/file
http://www.mediafire.com/file/n1a2gy9s3arc3jt/fmt_CP77mesh_1.45.zip/file
https://www.mediafire.com/file/be5a61bpwd34maw/fmt_CP77mesh_1.44.zip/file
https://www.mediafire.com/file/ks3qun82ucvb8gg/fmt_CP77mesh_1.43.zip/file
https://www.mediafire.com/file/8ufh9m9andjsjtm/fmt_CP77mesh_1.42.zip/file
https://www.mediafire.com/file/ycyad5r3baiulod/fmt_CP77mesh_1.41.zip/file
https://www.mediafire.com/file/9hkm3lajxqmu993/fmt_CP77mesh_1.4.zip/file