Closed jerryzmtz closed 1 month ago
I have tested it more thoroughly, it seems that the material supposed to be animated is combined with other materials, but the animation clips are not correctly remapped. So it might be a issue on optimizer.
Yeah idk why its not doing that for you. My own avatar has a material property animation getting correctly remapped when merged into my main mesh and a different material.
You could try to provide me with some more info and maybe something sticks out:
Thanks. From this I can tell that the shader portion indeed does generate code to handle the animated material property and the only thing that seems to be missing is that the path change doesn't get applied to the animation.
Ok I figured out the issue. You looked at the wrong generated animation. The one referenced in the optimized fx layer indeed does have the repath. However the animation relies on WD ON behavior and it seems like the optimizer didn't generate the needed properties with the correct default values for the first material.
For the record, material property animations with WD ON are super cursed since the default value is whatever the first material has and if the material doesn't even have the property the default value is 0.
Ok I figured out the issue. You looked at the wrong generated animation. The one referenced in the optimized fx layer indeed does have the repath. However the animation relies on WD ON behavior and it seems like the optimizer didn't generate the needed properties with the correct default values for the first material.
For the record, material property animations with WD ON are super cursed since the default value is whatever the first material has and if the material doesn't even have the property the default value is 0.
Thank you. So is there anything I could do to fix it or it could be avoided by your side in the future.
If you can change your animator workflow to WD OFF then it will probably work. Idk if that's viable to do for you.
Yes I will be trying to fix this on my side but no idea how long that will take me.
If you can change your animator workflow to WD OFF then it will probably work. Idk if that's viable to do for you.
Yes I will be trying to fix this on my side but no idea how long that will take me.
I need MMD compability so that might not be possible... Hope you could make it.
Ok, I looked more into this and now I am even more confused. It seems like my optimizer already handles WD ON material property animations fine? All my attempts to break it similar to your setup failed (as in they all worked the same after optimization as before). And looking at your files again they also seem to all be generated correctly, I must have missed the relevant property the last time.
So now I don't have a clue why it isn't working for you. Maybe I am missing something crucial or the issue comes from some highly complex interactions that are very specific to your avatar in particular.
Ok, I looked more into this and now I am even more confused. It seems like my optimizer already handles WD ON material property animations fine? All my attempts to break it similar to your setup failed (as in they all worked the same after optimization as before). And looking at your files again they also seem to all be generated correctly, I must have missed the relevant property the last time.
So now I don't have a clue why it isn't working for you. Maybe I am missing something crucial or the issue comes from some highly complex interactions that are very specific to your avatar in particular.
I thought it has something to do with a object with more than one material. When one object has two materials and both use poiyomi, the animated parts of shaders must both be enabled. Try the following steps to see whether you could reproduce it.
Enable RGB color mask
: click the RGBA Color Masking
session like this screenshot.
Animations to change the vector
: Change the R color
''s color like this screenshot
I also want to chime in; you can do your animations like WD off workflow with WD On since you are just explicit about the reset animation/ default animation. I do that with all my avatars to allow people to choose WD Off or On, and it won't break.
I changed how material property animations are handled with WD ON. As such I will close this as its no longer relevant to what the optimize is doing now. Please make new bug reports if issues arise.
I have made animations to change the value of RGBA Color masking of poiyomi, as shown in the screenshot. It could be changed into blue, white or black. However, after optimization, the animation stops to work. This happens when I click on
Merge Skinned Meshes
. Is it a bug or RGBA color masking just not work with optimizer?Unity 2022 SDK 3.5.0 Optimizer 3.3.4
edit: I noticed that it is not caused by optimizer