Post by Creelien on Nov 20, 2021 14:40:45 GMT
Basic Commands for Ubuntu Subsystem
Replace ** with whatever value you have to change.
Unpack .DAT:
ruby dat_extractor.rb model.dat
Repack .DAT:
ruby dat_creator.rb folder_dat
Unpack .WTB (textures):
ruby wtb_wta_extractor.rb texture.wtb
Repack .WTB (textures):
ruby wtb_wta_creator.rb folder_wtb
Unpack .EFF or .IDD files:
ruby eff_idd_extractor.rb effect.eff
ruby eff_idd_extractor.rb idd file.idd
Repack .EFF or .IDD files:
ruby eff_idd_creator.rb effect_eff
ruby eff_idd_creator.rb idd fiel_idd
Remapping cloth physics, hitbox, and wind:
ruby clp_convert_bayo2_bayo.rb pl00xx_xx_xx.clp --remap-bones=bonemap.yaml
ruby clh_convert_bayo2_bayo.rb pl00xx_yy_zz.clh --remap-bones=bonemap.yaml
ruby clw_convert_bayo2_bayo.rb pl00xx_yy_zz.clw --remap-bones=bonemap.yaml
Use --no-poly if ever the physics imported from Bayonetta 2 are shaky.
Remap bones used in .MOT files:
ruby mot_tool.rb xx00yy_zzz.mot --remap-bones=bonemap.yaml
Get a sample frame from a .MOT file:
ruby mot_tool.rb --decode-frame=framenumber xx00yy_zzz.mot > matrix.yaml
Set pose or apply bone transform matrix:
ruby wmb_cleanup.rb model.wmb --set-pose=matrix.yaml
Convert degrees to radians before applying bone transform matrix:
ruby convert_noe_pose.rb degreesmatrix.yaml radiansmatrix.yaml
Get bone map:
ruby get_bone_map.rb model.wmb
Convert .EXP from Bayonetta Wii U:
ruby exp_convert_wiiu_pc.rb exp file.exp
WMB Cleanup
Generally, you could add --overwrite to the end of the command to overwrite the destination file.
-b, --[no-]bones Cleanup bones
-v, --[no-]vertexes Cleanup vertexes
-o, --[no-]remove-batch-offsets Remove batch vertex offsets
-c, --cleanup-materials Cleanup materials
-t, --[no-]textures Cleanup textures
You can stack them like -bvoct:
ruby wmb_cleanup.rb -bvoct model.wmb
Merge two Bayonetta and/or Bayonetta 2 models.
Add -o to overwrite destination model, -u to update bone positions coming from the source model,-t to import textures too.
You can stack them like -out:
ruby wmb_import_geometry_wiiu_pc.rb -out --bone-map=bonemap.yaml model 1.wmb model 2.wmb
Use --bone-map=same if both models have the same global bone index.
Import NieR: Automata models into Bayonetta:
Before importing, t-pose the model first with:
ruby wmb_cleanup.rb --set-t-pose model.wmb
ruby wmb_import_nier.rb -ot model 1.wmb model 2.wmb
Cleanup bone refs:
ruby wmb_cleanup.rb --bone-refs model.wmb
Rotating models:
ruby wmb_cleanup.rb --rotate=[[x,y,z)],[X,Y,Z]] model.wmb
x,y,z = Coordinates
X,Y,Z = Center of Rotation
(Angle value in degrees)*(Math::PI/180)
Delete bones:
Use brackets [a,c,e] to specify which bones to delete.
Use x..y to set a range of bones to delete.
ruby wmb_cleanup.rb model.wmb --delete-bones=[1,3,5,7,9] --overwrite
ruby wmb_cleanup.rb model.wmb --delete-bones=0..299
Reduce material data size:
ruby wmb_cleanup.rb --cleanup-material-sizes model.wmb
Increase material data size:
ruby wmb_cleanup.rb --maximize-material-sizes model.wmb
Rename global bone index:
ruby wmb_cleanup.rb model.wmb --remap-bones="{local bone index=>new global bone index}"
Duplicate meshes:
ruby wmb_cleanup.rb --duplicate-meshes=[1,2,3] model.wmb
Merge meshes:
ruby wmb_cleanup.rb --merge-meshes="{0=>[1]}" model.wmb
Delete meshes:
ruby wmb_cleanup.rb --delete-meshes=[2] model.wmb
Swap meshes:
ruby wmb_cleanup.rb --swap-meshes="{3=>4}" model.wmb
Move meshes:
ruby wmb_cleanup.rb --move-meshes="{5=>6}" model.wmb
Shift the whole model:
ruby wmb_cleanup.rb --shift=[x,y,z] model.wmb
x,y,z = Coordinates
Scale the whole model:
ruby wmb_cleanup.rb --scale=scaling factor model.wmb
Fix tangents for imported Bayonetta 2 mods made before June 07, 2018:
ruby wmb_cleanup.rb --reverse-tangents-byte-order=[meshlist] model.wmb
Delete batches (here batches 1 and 2 from mesh 0):
ruby wmb_cleanup.rb --delete-batches="{0=>[1,2]}" model.wmb
Import custom models:
ruby wmb_import_assimp.rb [bayonetta pc model].wmb [file name].[supported format]
The supported formats:
Autodesk ( .fbx )
Collada ( .dae )
glTF ( .gltf, .glb )
Blender 3D ( .blend )
3ds Max 3DS ( .3ds )
3ds Max ASE ( .ase )
Wavefront Object ( .obj )
Industry Foundation Classes (IFC/Step) ( .ifc )
XGL ( .xgl,.zgl )
Stanford Polygon Library ( .ply )
AutoCAD DXF ( .dxf )
LightWave ( .lwo )
LightWave Scene ( .lws )
Modo ( .lxo )
Stereolithography ( .stl )
DirectX X ( .x )
AC3D ( .ac )
Milkshape 3D ( .ms3d )
TrueSpace ( .cob,.scn )
Replace ** with whatever value you have to change.
Unpack .DAT:
ruby dat_extractor.rb model.dat
Repack .DAT:
ruby dat_creator.rb folder_dat
Unpack .WTB (textures):
ruby wtb_wta_extractor.rb texture.wtb
Repack .WTB (textures):
ruby wtb_wta_creator.rb folder_wtb
Unpack .EFF or .IDD files:
ruby eff_idd_extractor.rb effect.eff
ruby eff_idd_extractor.rb idd file.idd
Repack .EFF or .IDD files:
ruby eff_idd_creator.rb effect_eff
ruby eff_idd_creator.rb idd fiel_idd
Remapping cloth physics, hitbox, and wind:
ruby clp_convert_bayo2_bayo.rb pl00xx_xx_xx.clp --remap-bones=bonemap.yaml
ruby clh_convert_bayo2_bayo.rb pl00xx_yy_zz.clh --remap-bones=bonemap.yaml
ruby clw_convert_bayo2_bayo.rb pl00xx_yy_zz.clw --remap-bones=bonemap.yaml
Use --no-poly if ever the physics imported from Bayonetta 2 are shaky.
Remap bones used in .MOT files:
ruby mot_tool.rb xx00yy_zzz.mot --remap-bones=bonemap.yaml
Get a sample frame from a .MOT file:
ruby mot_tool.rb --decode-frame=framenumber xx00yy_zzz.mot > matrix.yaml
Set pose or apply bone transform matrix:
ruby wmb_cleanup.rb model.wmb --set-pose=matrix.yaml
Convert degrees to radians before applying bone transform matrix:
ruby convert_noe_pose.rb degreesmatrix.yaml radiansmatrix.yaml
Get bone map:
ruby get_bone_map.rb model.wmb
Convert .EXP from Bayonetta Wii U:
ruby exp_convert_wiiu_pc.rb exp file.exp
WMB Cleanup
Generally, you could add --overwrite to the end of the command to overwrite the destination file.
-b, --[no-]bones Cleanup bones
-v, --[no-]vertexes Cleanup vertexes
-o, --[no-]remove-batch-offsets Remove batch vertex offsets
-c, --cleanup-materials Cleanup materials
-t, --[no-]textures Cleanup textures
You can stack them like -bvoct:
ruby wmb_cleanup.rb -bvoct model.wmb
Merge two Bayonetta and/or Bayonetta 2 models.
Add -o to overwrite destination model, -u to update bone positions coming from the source model,-t to import textures too.
You can stack them like -out:
ruby wmb_import_geometry_wiiu_pc.rb -out --bone-map=bonemap.yaml model 1.wmb model 2.wmb
Use --bone-map=same if both models have the same global bone index.
Import NieR: Automata models into Bayonetta:
Before importing, t-pose the model first with:
ruby wmb_cleanup.rb --set-t-pose model.wmb
ruby wmb_import_nier.rb -ot model 1.wmb model 2.wmb
Cleanup bone refs:
ruby wmb_cleanup.rb --bone-refs model.wmb
Rotating models:
ruby wmb_cleanup.rb --rotate=[[x,y,z)],[X,Y,Z]] model.wmb
x,y,z = Coordinates
X,Y,Z = Center of Rotation
(Angle value in degrees)*(Math::PI/180)
Delete bones:
Use brackets [a,c,e] to specify which bones to delete.
Use x..y to set a range of bones to delete.
ruby wmb_cleanup.rb model.wmb --delete-bones=[1,3,5,7,9] --overwrite
ruby wmb_cleanup.rb model.wmb --delete-bones=0..299
Reduce material data size:
ruby wmb_cleanup.rb --cleanup-material-sizes model.wmb
Increase material data size:
ruby wmb_cleanup.rb --maximize-material-sizes model.wmb
Rename global bone index:
ruby wmb_cleanup.rb model.wmb --remap-bones="{local bone index=>new global bone index}"
Duplicate meshes:
ruby wmb_cleanup.rb --duplicate-meshes=[1,2,3] model.wmb
Merge meshes:
ruby wmb_cleanup.rb --merge-meshes="{0=>[1]}" model.wmb
Delete meshes:
ruby wmb_cleanup.rb --delete-meshes=[2] model.wmb
Swap meshes:
ruby wmb_cleanup.rb --swap-meshes="{3=>4}" model.wmb
Move meshes:
ruby wmb_cleanup.rb --move-meshes="{5=>6}" model.wmb
Shift the whole model:
ruby wmb_cleanup.rb --shift=[x,y,z] model.wmb
x,y,z = Coordinates
Scale the whole model:
ruby wmb_cleanup.rb --scale=scaling factor model.wmb
Fix tangents for imported Bayonetta 2 mods made before June 07, 2018:
ruby wmb_cleanup.rb --reverse-tangents-byte-order=[meshlist] model.wmb
Delete batches (here batches 1 and 2 from mesh 0):
ruby wmb_cleanup.rb --delete-batches="{0=>[1,2]}" model.wmb
Import custom models:
ruby wmb_import_assimp.rb [bayonetta pc model].wmb [file name].[supported format]
The supported formats:
Autodesk ( .fbx )
Collada ( .dae )
glTF ( .gltf, .glb )
Blender 3D ( .blend )
3ds Max 3DS ( .3ds )
3ds Max ASE ( .ase )
Wavefront Object ( .obj )
Industry Foundation Classes (IFC/Step) ( .ifc )
XGL ( .xgl,.zgl )
Stanford Polygon Library ( .ply )
AutoCAD DXF ( .dxf )
LightWave ( .lwo )
LightWave Scene ( .lws )
Modo ( .lxo )
Stereolithography ( .stl )
DirectX X ( .x )
AC3D ( .ac )
Milkshape 3D ( .ms3d )
TrueSpace ( .cob,.scn )