i have create a key frame material animation,when i was editing the curve the material create a instance,just like “grass(Instance)(Material)”. the animation dose nothing but fade the color of the material. the scene have only one object,that’s the color animated grass,after 1 hour,the application rising to 1GB…
what’s the hell…
… nobody else got this?
up
So the animation is playing in loop I guess? If it’s the case maybe it is because you are creating a new instance each time and you don’t delete it. If the animation don’t stop playing, I guess the garbage collector won’t pass on your previous object until the animation finish. I might be wrong, but hope it could gave you some ideas where to look at.
thanks for reply. you are right the new instance of material will cost the memory,but i also find that the key frame animation materia is always
created with an instance (you can see “(Instance)” after the material name), so, what’s the deal, how to control this,i mean how to avoid a material instance when animating the material…
i know the trick between material and shareMaterial,but i have no ideal how to control this when making key frame animation, i can change the sharematerial instead of material in script,but no in material animation…any ideal?
According to what you said, the (Instance) “keyword” often appear when you duplicate your material. It looks like if somewhere you are creating a new one instead of editing the one you have in your animation.
I know this reply is very similar to my previous one, but try to look if you’re really using the reference of the material you need. Maybe somewhere your assignation creates a copy of it without you knowing about it.
P.S. Sorry for the delay of my reply, I was out of town for since last Thursday.