-
Notifications
You must be signed in to change notification settings - Fork 140
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better Directory Input, Game Object Lip Syncing, & Sparse Baked Data #76
base: main
Are you sure you want to change the base?
Conversation
The current wizard takes a directory input and reads all the children of the directory. Then it dumps everything into one folder, which makes the directory input kind of misleading. This wizard recreates the folder hierarchy 1:1, perfect for any functionality that uses the resources folder.
An editor for ULipSyncGameObject
It's sort of like ULipSyncTexture but for game objects. I use this for 2D sprite puppets, like those imported via the PSB importer will have different origins for their phoneme sprites due to the automatic sprite slicing. Not only that, but you'll already have a sprite hierarchy you want to keep, so this requires no edits to the layer structure in your PSB or PSD imports. Very convenient.
There was some sort of bug where if you changed the profile after baking data it would spew out a message saying "The main object name should match the asset filename. Please fix to avoid errors.”. You would have to, one by one, click a button to fix it. This script does that but for literally everything.
Thank you for the fantastic PR! I aim to review and integrate it as soon as possible. However, I might not have time in the immediate future, so it could take up to a month. I appreciate your patience. Additionally, since there are two updates included, it would be smoother to review if you could separate them into individual PRs. |
Backwards compatible implementation of sparse beta functionality to reduce the file size of baked data files.
Adjusted editor code to visually represent sparse baked data files.
Updating my Pull Request. Here is an example of the size reduction after and before converting to sparse, dropping from 76 KB on disk to 32 KB on disc. |
1. Enhanced Directory Wizard
The existing wizard has a significant limitation: It only reads the children of a specified directory without replicating that directory's structure in the output.
This oversight forces users to manually sort their baked data to match the hierarchy of the original audio clips, which is inefficient, prone to errors, and if your line count is high enough may lead to death from dehydration because of how long sorting them would take. My alternative wizard addresses this issue by cloning the directory hierarchy from input to output, ensuring that the structure of subfolders and their contents is preserved.
2. Game Object-based Lip Syncing for 2D Rigs
I noticed a very noticeable gap in the current toolset for 2D lipsyncing, particularly for rigs that aren't sprite sheet-based (Believe it or not that's every single rig I use). uLipSyncTexture falls short in this case. One of Unity's only features that actually "just works" is the PSB import pipeline, which automatically slices sprites based on their boundaries, resulting in varying origins and sizes that aren't easily swappable. It also mirrors the layer structure when dragging the imported PSB into the editor. Therefore, all of your phonemes will already exist as individual game objects. So I created uLipSyncGameObject which is functionally similar to uLipSyncTexture, but works by just enabling and disabling the objects instead.
I love this tool, so I hope these are useful additions.