03-11-2021, 08:26 AM
(This post was last modified: 03-11-2021, 08:52 AM by josemendez.)
(02-11-2021, 09:24 PM)timconkling Wrote: Edit: this seems to be a partial fix for the issue, but I'm not actually getting bloody-gown action yet. The instanced material property is getting updated as we'd expect, but it looks like the property changes are not actually being written to the GPU. At runtime, the gown remains un-bloodied. I can "fix" this by opening the gown's material inspector at runtime and changing any property inside it, which triggers (presumably) an upload of all properties to the GPU.
Hi!
Animating properties using an animation clip does not modify the material. That's why even though the renderer is using an instance instead of the shared material, changes are not being made.
Animations use MaterialPropertyBlocks. (https://docs.unity3d.com/ScriptReference...Block.html)
Only if you modify the material itself -for instance, animating its values trough a script- will the changes have any effect. Obi's skinned renderer does not expose material property blocks as of now (no reason other than I didn't get to it yet). Adding support for them should be simple, will get back to you asap.