Scripts Bundle
A bunch of scripts I happened to "make" that might be useful to someone else. Maybe. Perhaps...
Detailled instructions on how to use each one below.
Most require Python at least.
Anton's Animation Tool Updated & Anton's Behavior Creator
Related to both of Anton's mods, which are pretty old by now.
First one is an update to his scripts, since they didn't work for the latest blender version.
Second is just an aid to write the behavior text file; note that it won't help you understand what to write, it'll just write what you tell it to...
Bip00 to Human
Requires pyffi (pip install pyffi)
A script that interacts with nif files. It'll change the names of ninodes of a certain format to that of a human skeleton.
Used it to port models with the bone naming "Bip01". Works in batch.
It may miss some bones that don't have an equivalent in the human skeleton or just that I haven't encountered myself.
The nif must be in LE format.
Either drag&drop the nif on it, or just run the script in the nif's folder.
You can easily edit the script to fit your need in terms of bones change, it's just slow to change everything.
CBPC Spheres Blender
Requires pynifly blender addon
Because getting the collision data for the CBPC spheres is slow by hand.
Import a skinned mesh (aka a creature, human...) in blender using the addon.
Makes sure your armature is named "Armature" and your skinned mesh is named "SkinnedMesh" (you may want to "join" if you have several skinned meshes).
Run the script in the script tab.
It will generate a sphere for each bone in the skinned mesh and edit their translation & scale to match the mesh' shape.
It will then output the resulting translation & scale modifications in a text file in a folder named "bone_sphere_adjustments".
You can then use the informations in the output text file for your cbpc collision file.
It's fairly accurate, adjustements are up to you. It's vertice based, so a split mesh will give weird results.
Export AMR Data Blender
Basic blender script to export AMR data in annotation format from a selected animation.
It targets a the "NPC Root [Root]" node in an "Armature", make sure the names match.
Output is in xml format in the blender file's folder.
Grass Color Analyze
Requires numpy, skimage, scipy, & joblib (pip install numpy imageio scikit-image scipy)
Place the script in a folder with 3 grass textures in jpg format.
"Texture01" & "Texture02" must be the same texture but in a different shade (get a green & a dead version).
"Texture03" is a (green) grass texture you want to turn into a "dead" version following the same process as the first two.
Edit the script to change the sample size at the end (sample_size = 65536). You'll probably want to set it to your texture's resolution (ex 256*256=65536).
See if it works. Good luck.
Grass Color Blending
Requires numpy & imageio
A script to generate blends between 2 textures, used to get variants in colors.
In the script folder, place 2 grass textures, of different colors, named "Texture01" & "Texture02" (dds format is fine).
Run the script. You can edit the number of steps used (steps = 10) for the blending (100/number of steps).
An exemple using the 3d grass textures is available ("GrassBrownGreen").
Output Ninodes
Requires pyffi (pip install pyffi)
A script to output all the ninodes within a nif file. Works in batch.
Nif must be in LE format.
Output will be in xml "smp config" format.
Remove Vertex Color
Requires pyffi (pip install pyffi)
A script that removes the vertex color in a nif in batch.
Nif must be in LE format.
Used to be relevant when Outfit Studio's pose feature was still bugged.
Riekling to Human
Requires pyffi (pip install pyffi)
Same as "Bip00 to Human" but for rieklings to human process.
Nif must be in LE format.
It's not a do-all script, it'll just change the bone's names.
Works in batch.
Split Meshes by Material Blender
If a mesh in blender uses several textures but is a unique mesh, that script can split it by texture.
Requires blender obviously.
Comments
Post a Comment