alphaZomega Tool (Maxscript)
May 30, 2020 14:47:29 GMT 10
EvilLord, JTeghius Kittius, and 10 more like this
Post by alphaz on May 30, 2020 14:47:29 GMT 10
This is my own MaxScript tool that I made for speeding up various RE Engine modding-related tasks in 3DS Max. Pretty much all of the functions are used by selecting one or more meshes, running the script, and clicking one of the buttons. I'm posting it here in the RE3 section because RE3 is the newest game, but this tool can be used for RE2, DMC5 and general purpose Max stuff.
Generate Weighted Normals is like the function in the MESH script: it creates normals better suited for the kind of low-poly geometry seen in games.
This function was originally by Martijn Buijs in 2014, so all credit goes to him. It does not average to fix seams; you still have to do that manually.
Sel Edge Normals selects only the normals on the edges of UV maps. Must be in selection mode inside an Edit Normals modifier. It allows you to select only the seams on a model, to average them only and ignore the rest:
Generate Tangent lets you visualize how the tangents are generated on your model when the script exports them to the game, by showing them in the form of normals in an Edit Normals modifier
Tangents should look like this when generated:
If they are not like that and they are generated all garbled, it is because there is something wrong with your mesh. This same problem also prevents your mesh from having its normals imported properly by the MESH script. You can fix it once and for all by exporting your MESH from Noesis as an OBJ file, or by using my ResetMesh script.
Quantize Skin rounds all the skin weights to 1/256th of 1.0 (or 0.0039), because that's how the skin weights are stored in the MESH file -- as bytes, with only 256 possible values per weight. It lets you see how your rigging will look after your model has been exported from Max; after all the weights have been rounded to each fit within a single byte.
Notice how two weights of this one vertex on the model have the exact same value. That is because quantize skin rounded them to that value:
Transfer Skeleton lets you transfer the rigging of mesh A to a copy of mesh A that has the skeleton of mesh B. This is very useful for porting a Claire mod to Jill, for example, where the Claire mod needs Jill's bones in order to work.
Here is an example of using Transfer Skeleton. I am transferring Jill to Ada's skeleton. Starting with the source mesh -- Jill's body in this case:
I then select any one of Ada's meshes 2nd, as the "target" mesh:
Then I bring up the tool and click "Transfer Skeleton" and the bone matching window comes up, with both skeletons having no bone numbers.
"Match by name" works here, to match the bones instantly. If the characters have other bones that serve the same function as the bones in the source character's list, like Jill's breasts to Ada's breasts, then match those up manually:
Bone numbers are restored after the matching is complete.
The new mesh has the original rigging from Jill, but on Ada's bones:
Generate Weighted Normals is like the function in the MESH script: it creates normals better suited for the kind of low-poly geometry seen in games.
This function was originally by Martijn Buijs in 2014, so all credit goes to him. It does not average to fix seams; you still have to do that manually.
Sel Edge Normals selects only the normals on the edges of UV maps. Must be in selection mode inside an Edit Normals modifier. It allows you to select only the seams on a model, to average them only and ignore the rest:
Generate Tangent lets you visualize how the tangents are generated on your model when the script exports them to the game, by showing them in the form of normals in an Edit Normals modifier
Tangents should look like this when generated:
If they are not like that and they are generated all garbled, it is because there is something wrong with your mesh. This same problem also prevents your mesh from having its normals imported properly by the MESH script. You can fix it once and for all by exporting your MESH from Noesis as an OBJ file, or by using my ResetMesh script.
Quantize Skin rounds all the skin weights to 1/256th of 1.0 (or 0.0039), because that's how the skin weights are stored in the MESH file -- as bytes, with only 256 possible values per weight. It lets you see how your rigging will look after your model has been exported from Max; after all the weights have been rounded to each fit within a single byte.
Notice how two weights of this one vertex on the model have the exact same value. That is because quantize skin rounded them to that value:
Transfer Skeleton lets you transfer the rigging of mesh A to a copy of mesh A that has the skeleton of mesh B. This is very useful for porting a Claire mod to Jill, for example, where the Claire mod needs Jill's bones in order to work.
Here is an example of using Transfer Skeleton. I am transferring Jill to Ada's skeleton. Starting with the source mesh -- Jill's body in this case:
I then select any one of Ada's meshes 2nd, as the "target" mesh:
Then I bring up the tool and click "Transfer Skeleton" and the bone matching window comes up, with both skeletons having no bone numbers.
"Match by name" works here, to match the bones instantly. If the characters have other bones that serve the same function as the bones in the source character's list, like Jill's breasts to Ada's breasts, then match those up manually:
Bone numbers are restored after the matching is complete.
The new mesh has the original rigging from Jill, but on Ada's bones: