Skip to content
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

VRCFury makes a duplicate material for every single mesh, causing issues with d4rks. #265

Open
Goobwabber opened this issue Mar 18, 2024 · 5 comments

Comments

@Goobwabber
Copy link

Duplication of materials was added in a recent update to VRCFury, but a new material is created for every single mesh rather than reusing the same material. I'm under the assumption this is so that you can set certain fields as animated in Poiyomi. It would be better if it were to only make a new material for individual meshes if the animated fields need to be different. Due to this feature, d4rks avatar optimizer fails to detect that multiple materials are merge-able and so it never optimizes the material slot counts. Thanks

@SenkyDragon
Copy link
Contributor

This has actually been a feature for a long time. A copy is only created if you are using a feature which requires changing the resting state of the material, such as an Apply During Upload which impacts the property of the material on a particular renderer, or a Toggle in Slider mode or Default On mode, which has similar impact. It's non-trivial for us to determine whether or not you're going to ultimately adjust the property to be the same on all renderers using the material, which is why we have to make separate copies.

@Goobwabber
Copy link
Author

In reality what I would prefer anyways is a way to set an off state for a toggle, rather than using Apply During Upload. Apply During Upload sets the avatars default no-animator state and I'm really just using it as a replacement for not having the ability to set an off state for my material-related toggles. Ideally I should be able to do this without affecting the no-animator state of the avatar.

@KaelanDuck
Copy link
Contributor

Is merging identical material assets after most processing steps are done a possible option?

@KaelanDuck
Copy link
Contributor

Yeah it can be done: KaelanDuck/VRCFury@main...feature-merge-same-material-assets

But on second thought this kind of post-optimisation probably doesn't belong in VRCFury, probably better to wire it into darks optimiser. Don't know if it has side effects either

@bizzclaw
Copy link

in my experience, this seems to be applied for no reason when not needed. I'm trying to merge a bunch of meshes with AAO, and they only have 1 thing animated in a property, a Poiyomi UV Tile animation. It shouldn't need to make a seperate material for this and if it hadn't of made a seperate material, it would of acted the same, except now my avatar has extra material slots, and now it's harder for me to optimize my avatars. There has to be a way to disable this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants