1. Welcome to VRCat! Please note that this message board is not related to VRChat in any official manner. It is run entirely by the community, and moderated by the community. Any content present has not been reviewed by VRChat moderators or staff. Your use of these forums implies understanding of this message. Thanks!
    Dismiss Notice

Avatars Cats Blender Plugin (0.14.0)

Discussion in 'Tutorials and Tools' started by GiveMeAllYourCats, Nov 15, 2017.

  1. GiveMeAllYourCats

    Joined:
    Nov 15, 2017
    Messages:
    46
    Likes Received:
    56
    Cats Blender Plugin (0.14.0)
    A tool designed to shorten steps needed to import and optimize models into VRChat. Compatible models are: MMD, XNALara, Mixamo, Source Engine, Unreal Engine, DAZ/Poser, Blender Rigify, Sims 2, Motion Builder, 3DS Max and potentially more

    With Cats it takes only a few minutes to upload your model into VRChat. All the hours long processes of fixing your models are compressed into a few functions!

    So if you enjoy how this plugin saves you countless hours of work consider supporting us through Patreon. There are a lot of perks like having your name inside the plugin!

    [​IMG]

    Features
    • Optimizing model with one click!
    • Creating lip syncing
    • Creating eye tracking
    • Automatic decimation
    • Creating custom models easily
    • Creating texture atlas
    • Creating root bones for Dynamic Bones
    • Optimizing materials
    • Translating shape keys, bones, materials and meshes
    • Merging bone groups to reduce overall bone count
    • Protecting your avatars from game cache ripping
    • Auto updater
    More to come!

    Website
    Check our website to report errors, suggestions or make comments! https://catsblenderplugin.com

    Requirement
    • Blender 2.79 or 2.80 (run as administrator is recommended)
      • mmd_tools is no longer required! Cats comes pre-installed with it!
    Installation
    [​IMG]

    • Check your 3d view and there should be a new menu item called CATS ....w00t
      • Since Blender 2.80 the CATS tab is on the right in the menu that opens when pressing 'N'
    [​IMG]

    • If you need help figuring out how to use the tool:
    [​IMG]

    Skip the step where he installs "mmd_tools" in the video below, it's not needed anymore!

    [​IMG]

    Code contributors:
    • Hotox
    • Shotariya
    • Neitri
    • Kiraver
    Model
    [​IMG]

    This tries to completely fix your model with one click.

    Import/Export Model
    • Imports a model of the selected type with the optimal settings
    • Exports a model as an .fbx with the optimal settings
    Fix Model
    • Fixes your model automatically by:
      • Reparenting bones
      • Removing unnecessary bones
      • Renaming and translating objects and bones
      • Mixing weight paints
      • Rotating the hips
      • Joining meshes
      • Removing rigidbodies, joints and bone groups
      • Removing bone constraints
      • Deleting unused vertex groups
      • Using the correct shading
      • Making it compatible with Full Body Tracking
      • Combining similar materials
    Start Pose Mode
    • Lets you test how bones will move.
    Pose to Shape Key
    • Saves your current pose as a new shape key.
    Apply as Rest Pose
    • Applies the current pose position as the new rest position. This saves the shape keys and repairs ones that were broken due to scaling
    Model Options
    [​IMG]

    Translation
    • Translate certain entities from any japanese to english. This uses an internal dictionary and Google Translate.
    Separate by material / loose parts / shapes
    • Separates a mesh by materials or loose parts or by whether or not the mesh is effected by a shape key
    Join meshes
    • Joins all/selected meshes together
    Merge Weights
    • Deletes the selected bones and adds their weight to their respective parents
    Delete Zero Weight Bones
    • Cleans up the bones hierarchy, deleting all bones that don't directly affect any vertices
    Delete Constraints
    • Removes constrains between bones causing specific bone movement as these are not used by VRChat
    Recalculate Normals
    • Makes normals point inside of the selected mesh
    • Don't use this on good looking meshes as this can screw them up
    Flip Normals
    • Flips the direction of the faces' normals of the selected mesh.
    Apply Transformations
    • Applies the position, rotation and scale to the armature and its meshes.
    Remove Doubles
    • Merges duplicated faces and vertices of the selected meshes.
    Custom Model Creation
    [​IMG] [​IMG]

    This makes creating custom avatars a breeze!

    Merge Armatures
    • Merges the selected armature into the selected base armature.
    • How to use:
      • Use "Fix Model" on both armatures
        • Select the armature you want to fix in the list above the Fix Model button
        • Ignore the "Bones are missing" warning if one of the armatures is incomplete (e.g hair only)
        • If you don't want to use "Fix Model" make sure that the armature follows the CATS bone structure (https://i.imgur.com/F5KEt0M.png)
        • DO NOT delete any main bones by yourself! CATS will merge them and delete all unused bones afterwards
      • Now you have two options:
        • Only move the mesh:
          • Uncheck the checkbox "Apply Transforms"
          • Move the mesh (and only the mesh!) of the merge armature to the desired position
            • You can use Move, Scale and Rotate
            • CATS will position the bones according to the mesh automatically
        • OR move the armature (and with it the mesh):
          • Check the checkbox "Apply Transforms"
          • Move the armature to the desired position
            • You can use Move, Scale and Rotate
            • Make sure that both meshes and armatures are at their correct positions as they will stay exactly like this
        • If you want to merge multiple objects from the same model it is often better to duplicate the armature for each of them and merge them individually
      • Select the base armature and the armature you want to merge into the base armature in the panel
      • If CATS can't detect the bone structure automatically: select a bone you want to attach the new armature to
        • E.g.: For a hair armature select "Head" as the bone
      • Press the "Merge Armatures" button -> Done!
    Attach Mesh to Armature
    • Attaches the selected mesh to the selected armature.
    • How to use:
      • Move the mesh to the desired position
        • You can use Move, Scale and Rotate
        • INFO: The mesh will only be assigned to the selected bone
        • E.g.: A jacket won't work, because it requires multiple bones.
        • E.g.: A ring on a finger works perfectly, because the ring only needs one bone to move with (the finger bone)
      • Select the base armature and the mesh you want to attach to the base armature in the panel
      • Select the bone you want to attach the mesh to in the panel
      • Press the "Attach Mesh" button -> Done!
    Support us:
    • We worked hard on this feature. If you like it consider supporting us, it helps a lot!
    [​IMG]

    Decimation
    [​IMG]

    Decimate your model automatically.

    Save Decimation
    • This will only decimate meshes with no shape keys.
    Half Decimation
    • This will only decimate meshes with less than 4 shape keys as those are often not used.
    Full Decimation
    • This will decimate your whole model deleting all shape keys in the process.
    Custom Decimation
    • This will let you choose which meshes and shape keys should not be decimated.
    Eye Tracking
    [​IMG] [​IMG]

    Eye tracking is used to artificially track someone when they come close to you. It's a good idea to check the eye movement in the testing tab after this operation to check the validity of the automatic eye tracking creation.

    Disable Eye Blinking
    • Disables eye blinking. Useful if you only want eye movement.
    Disable Eye Movement
    • Disables eye movement. Useful if you only want blinking. IMPORTANT: Do your decimation first if you check this!
    Eye Movement Speed
    • Configure eye movement speed
    Visemes (Lip Sync)
    [​IMG]

    Mouth visemes are used to show more realistic mouth movement in-game when talking over the microphone. The script generates 15 shape keys from the 3 shape keys you specified. It uses the mouth visemes A, OH and CH to generate this output.

    Bone parenting
    [​IMG]

    Useful for Dynamic Bones where it is ideal to have one root bone full of child bones. This works by checking all bones and trying to figure out if they can be grouped together, which will appear in a list for you to choose from. After satisfied with the selection of this group you can then press 'Parent bones' and the child bones will be parented to a new bone named RootBone_xyz

    To parent
    • List of bones that look like they could be parented together to a root bone. Select a group of bones from the list and press "Parent bones"
    Refresh list
    • Clears the group bones list cache and rebuild it, useful if bones have changed or your model
    Parent bones
    • Starts the parent process
    Texture atlas
    [​IMG]

    Texture atlas is the process of combining multiple textures into one to drastically reduce draw calls and therefore make your model much more performant

    Create Atlas
    • Combines all selected materials into one texture. If no material list is generated it will combine all materials.
    Generate Material List
    • Lists all materials of the current model and lets you select which ones you want to combine.
    Useful Tips:
    • Split transparent and non-transparent textures into separate atlases to avoid transparency issues
    • Make sure that the created textures are not too big, because Unity will downscale them to 2048x2048. Split them across multiple atlases or reduce the individual texture sizes. This can be easily done in the MatCombiner tab.
    • You can tell Unity to use up to 8k textures. Do so by selecting the texture and then choose a different Max Size and/or Compression in the inspector: https://i.imgur.com/o01T4Gb.png
    Bone merging
    [​IMG]

    Lets you reduce overall bone count in a group set of bones. This works by checking all bones and trying to figure out if they can be grouped together, which will appear in a list for you to choose from. After satisfied with the selection of this group you can then set a percentage value how much bones you would like to merge together in itself and press 'Merge bones'

    Refresh list
    • Clears the group bones list cache and rebuild it, useful if bones have changed or your model
    Merge bones
    • Starts the merge process
    Copy Protection
    [​IMG]

    Can protect your avatars from being ripped from the game cache. Game cache rips in most common cases do not include blendshapes and shaders. This method will make it much harder for people that try to steal your avatar through ripping from cache.

    This is NOT a 100% protection, but it's the best what you as a creator can currently do. If you want to be 100% safe, stay in private worlds with people you trust.

    How to setup:
    1. Do all the modifications to your model in Blender before you follow the next steps! This option should be the last one you do in Blender before exporting!

    2. You won't be able to see the mesh of your model inside the Unity bone mapping screen (it will be garbled mess, but only in there). Because of that, if you need to actually see your models mesh (e.g. for straightening the fingers for VR), follow the extra steps below. If you don't need to see the mesh (e.g. for unassigning the jaw bone) skip to step 2.
      • Export your model from Blender without enabling the protection
      • Load it up in Unity and configure it in the bone mapping screen and press "Done"
      • In Blender: Click the "Enable Protection" button and export your model
      • Then, except for just dragging the fbx into Unity, you need to go into the folder where this Unity project is located and then replace the unprotected fbx with the protected one. That way your configurations will be kept.
      • Skip to step 5
    3. In Blender: Click the "Enable Protection" button

    4. Export it to Unity by either using the "Export" button within Cats or set the fbx export option by yourself: Geometries > Smoothing > Set to "Face"

    5. In Unity: Set the value of the blendshape 'Basis Original' to 100 like so:

    6. To fix any lighting issues select your .fbx and then select "Import" as the Tangents option here:

      [​IMG]

    7. Because (for some odd reason) the protection increases your bounding box it could be too big to upload your model. If the VRCSDK complains about your model being too large, edit your bounding box back to normal here: (this option is below the blendshape list from above)

      [​IMG]

    8. Your avatar now behaves just like a normal one.
    People that try to steal your avatar will then only see a box of mangled waifu trash instead of your original character.

    special thanks to @zarniwoop#6081

    Shape Key
    [​IMG]

    Apply Shape Key as Basis

    • Applies the selected shape key as the new Basis and creates a reverted shape key from the selected one.
    Settings and Updates
    [​IMG]

    This plugin has an auto updater. It checks for a new version automatically once every day.

    Changelog
    0.14.0
    • Cats is now fully compatible with Blender 2.80!
    • Fix Model:
      • Improved DAZ compatibility
    • Model Options:
      • Added "Merge Weights" and "Remove Zero Weight Bones" to the spacebar search
      • Added "Apply All Transforms" button to correctly apply the transforms of all objects
      • Separating Meshes now deletes the Basis shape key if it is the last shape key left
    • Custom Model Creation:
      • Added "Apply Transforms" option to "Merge Armatures"
        • Use this if both armatures and meshes are already at their correct positions
      • Merge Armature and Attach Mesh now correctly restore the initial state from before the operation
    • Visemes:
      • Fixed shape keys sometimes not appearing in the viseme list
    • Optimization:
      • "Combine Same Materials" and "Convert Textures to PNG" are now compatible with Blender 2.80
      • Added loading cursor to "Convert Textures to PNG"
      • Added support for Shotariyas Material Combiner in Blender 2.80
        • Minimum required Material Combiner version is now v2.1.1.1
          • It now fully supports VRM models, has a greatly improved combining logic and an updated UI
          • It also got compression removed, so you will always get full quality images now
    • Updater:
      • Made it more robust to different version naming schemes
    • General:
      • Improved shading in 2.80
      • Improved initial state restoration after an operation
      • Backface culling is now always toggled on
      • Removed tons of unintended functions from the spacebar search
      • Upon startup Cats now enables "Testing" as supported addon level
      • Updated mmd_tools
      • Fixed a bug while loading settings during startup
      • Fixed a bug while loading the initial state after an operation
    0.13.3
    • Importer:
      • Fixed imported armatures being in edit mode
    • Custom Model Creation:
      • Merge Armatures now properly merges bones when the vertex group of one of the merging bones is missing
      • Attach Mesh no longer removes zero weight bones and constraints
    • Model Options:
      • Fixed error when switching to object mode during pose mode
    • General:
      • Updated mmd_tools
      • The Blender 2.80 API is stable now, so Cats should no longer break in 2.80
    0.13.2
    • Importer:
      • Now selects the imported armature in Cats
      • Added bone orientation fix after import if all bones point in the same direction
    • Fix Model:
      • Changed clipping planes to 0.01 and 150
        • This prevents rendering inaccuracies (thanks Rokk!)
      • Fix Model also no longer resets the visibility of objects
      • Added option to not connect the bones to their respective child
    • Eye Tracking:
      • Added random vertex movement back in
        • Instead of the exporter, Fix Model deleted empty shapekeys now (whoops)
    • General
      • Disabled backface culling in mmd_tools again
    Read the full changelog here.

    Roadmap
    • MOAR updates on the armature code
    • Texture translation should have an option to rename the filename also
    • Automatic lower lid creation for eye tracking
    • Manual bone selection button for root bones
    • Full body tracking proportion adjustments
    Feedback
    Do you love this plugin or have you found a bug? Post a response in this thread or send your feedback to the official discord server of the plugin for real-time communication: https://discord.gg/f8yZGnv and look for people with the developer role ;)

    Support us
    If you enjoy how this plugin saves you countless hours of work consider supporting us through Patreon:

    [​IMG]
     
    #1 GiveMeAllYourCats, Nov 15, 2017
    Last edited: Aug 4, 2019
  2. Tupper

    Tupper The Strongest
    Forum Staff

    Joined:
    Nov 14, 2017
    Messages:
    111
    Likes Received:
    106
    VRChat:
    Tupper
    This is awesome. I'm gonna try it as soon as I get home today. Thanks for posting!
     
  3. Tupper

    Tupper The Strongest
    Forum Staff

    Joined:
    Nov 14, 2017
    Messages:
    111
    Likes Received:
    106
    VRChat:
    Tupper
    Not bad! I do have one issue to report with the Texture Atlasing portion of the script. No matter what resolution I choose, it seems to shove the entire UV for the atlas into the bottom half of the texture.

    https://i.imgur.com/09JzXE9.jpg

    Additionally, (probably due to the above problem), you lose a lot of detail in fine parts of the texture.

    https://i.imgur.com/cA3b6pF.png
     
  4. GiveMeAllYourCats

    Joined:
    Nov 15, 2017
    Messages:
    46
    Likes Received:
    56
    Interesting... I never seen this before in my testing.

    If it's not a problem I would love to have that blend and the texture files to figure out what is going on exactly.
     
  5. Tupper

    Tupper The Strongest
    Forum Staff

    Joined:
    Nov 14, 2017
    Messages:
    111
    Likes Received:
    106
    VRChat:
    Tupper
    Can do. Once I get home today I'll send it your way on Discord.
     
  6. Jazneo

    Jazneo Member

    Joined:
    Nov 18, 2017
    Messages:
    74
    Likes Received:
    70
    VRChat:
    Jazneo
    Awsome tool the visime work very well
     
  7. Murakumo

    Murakumo New Member

    Joined:
    Nov 18, 2017
    Messages:
    8
    Likes Received:
    8
    VRChat:
    Murakumo
    Very much like this tool thanks for sharing!
     
    GiveMeAllYourCats likes this.
  8. Jazneo

    Jazneo Member

    Joined:
    Nov 18, 2017
    Messages:
    74
    Likes Received:
    70
    VRChat:
    Jazneo
    I try the eye tracking tool in tool does good job with it

    [​IMG]
     
    GREENCAT, GiveMeAllYourCats and Psych like this.
  9. Xeverian

    Xeverian New Member

    Joined:
    Nov 18, 2017
    Messages:
    7
    Likes Received:
    4
    VRChat:
    Xeverian
    Thank you for this tool. Everything works pretty well. It was fairly easy to setup visemes with this (we really need it as a legit addon, yeah :)). Eye tracking worked as well, but for some reason my model's head bone had 90 degrees roll and it ruined everything. Took me quite a lot of time to figure that out. Is it possible to add some check for the head bone rotation automatically? Would be great
     
    GiveMeAllYourCats likes this.
  10. GiveMeAllYourCats

    Joined:
    Nov 15, 2017
    Messages:
    46
    Likes Received:
    56
    Should not be doing that, it doesn't mess with the head bone; only uses it for reference. Are you sure this happened after you used the script?

    Just like with Tupper, if you are comfortable with it you can send me the blend file (only the blend file should be good, just need to see the bones) and I can try to figure out how to fix this.
     
  11. Ziddan

    Ziddan New Member

    Joined:
    Nov 19, 2017
    Messages:
    1
    Likes Received:
    1
    Hello! Ive just set up the three shapes for visemes, hit create and now blender isnt responding.

    Im guessing the script has to do some calculations about deformation or something but should it be taking long enough for me to be able to wonder about it, get in this forum i had open in a tab and register an account to ask this question?

    EDIT: Is this strictly for imported MMD models ?

    I realized that what im working on is an OBJ+mtl+pgn textures that i downloaded, edited, put through mixamo to get an easy skeleton, made three key shapes for the visemes and then hit create.

    Im very new to this stuff and there are a lot of oddities that i dont get so i though there might be some underlying structures in MMD models that would make this not work on a model such as the one im working on
     
    #11 Ziddan, Nov 19, 2017
    Last edited: Nov 19, 2017
    GiveMeAllYourCats likes this.
  12. GiveMeAllYourCats

    Joined:
    Nov 15, 2017
    Messages:
    46
    Likes Received:
    56
    Can you try to restart blender and try again? if it keeps happening then it's probably a scripting error specific to this model you are working on. As always I can try and figure out why this happens if you would be willing to share the blend file (sending via discord is most private/easy)
     
  13. Hotox

    Hotox Member

    Joined:
    Nov 19, 2017
    Messages:
    105
    Likes Received:
    45
    VRChat:
    Hotox
    Hey this plugin is totally awesome, thank you!

    But there are issues with the auto atlas:
    - On some models I have the same problem as Tupper with the UV at the bottom of the texture
    - Transparent textures become grey
    - I experience texture quality loss at every resolution with every model, not just when the UV is in the lower half of the texture (this quality loss is most noticable in the eyes)

    Also why do both visemes "vrc.v_e" and "vrc.v_ee" get created?

    And lastly I have a model where the eye bones are sticking out of the head but the experimental eye fix didn't work. It throws an error.

    I can send you these 2 models if you need them.
     
    GiveMeAllYourCats likes this.
  14. GiveMeAllYourCats

    Joined:
    Nov 15, 2017
    Messages:
    46
    Likes Received:
    56
    Still ongoing investigation would appreciate the model files ^^

    Yes, I have tried to enable a alpha layer in the baking but this gives me a error. Still trying to figure out why. All the models I tested with this problem looked good in unity though

    Probably because the textures get 'squashed' too much in too each other, try messing with the angle setting. My blender skills still need to know how to better fix this :)

    Oops.

    Please do! would love it, thanks for the awesome feedback. It will make the tool better for sure.
     
  15. Zer0w

    Zer0w Member

    Joined:
    Nov 18, 2017
    Messages:
    13
    Likes Received:
    9
    VRChat:
    Zer0w
    How exactly does the script work for the eye tracking, do I need to make the new eye bones my self first?
     
  16. GiveMeAllYourCats

    Joined:
    Nov 15, 2017
    Messages:
    46
    Likes Received:
    56
    If there are no existing eye bones (which is unusual for a MMD model) then you indeed have to create them yourself. I guess you could use a other mmd model with existing eye bones as a reference on how to do this.
     
  17. Hotox

    Hotox Member

    Joined:
    Nov 19, 2017
    Messages:
    105
    Likes Received:
    45
    VRChat:
    Hotox
    Here are some suggestions:
    • Add a warning when the eye hierarchy is not correct after creating the eye bones. Or repair it automatically (not the bones, there is another plugin for that, but rename the mesh to "Body" and the armature to "Armature").
    [​IMG]
    • Add a "Create Root" function. Like you do a root for the skirt, you would have to select all the top skirt bones, put the name in a textfield and then after pressing "Create Root" they get reparented to a duplicate of their parent bone.
     
    GiveMeAllYourCats likes this.
  18. GiveMeAllYourCats

    Joined:
    Nov 15, 2017
    Messages:
    46
    Likes Received:
    56
    Added to the roadmap, thank you!
     
  19. Jazneo

    Jazneo Member

    Joined:
    Nov 18, 2017
    Messages:
    74
    Likes Received:
    70
    VRChat:
    Jazneo
    Cat your blender plugin tools very useful dont need to be mmd model to use this tool it work most any models
     
  20. Hammey

    Hammey New Member

    Joined:
    Nov 19, 2017
    Messages:
    2
    Likes Received:
    1
    VRChat:
    Hammey
    Great plugin, I had trouble with the Atlas part before this plugin so this really helped me.
     
    GiveMeAllYourCats likes this.