- Home /
How to animate mesh visibility within Maya?
Hello everyone,
I am looking for a way to animate the Mesh Renderer enabled/disabled checkbox within Maya.
This is causing me a lot of tedious work. I have some complex animations which I have to use a powerful animation editor such as Maya's to create.
These animations have many instances of mesh visibility turning on and off. When I import them into unity, it ignores the visibility channel, making all of my meshes visible the entire animation.
Right now, to solve this, I extract the .anim files from the FBX and add every keyframe into the animation manually. If anything changes in the asset and it has to be reimported, I have to do this all over again in most cases.
This is hours of tedious work, and I find it very hard to believe there's no way around this, so here I am...
Answer by Volcanic-Penguin · May 30, 2013 at 09:28 PM
After having just found out I can toggle visibility in Maya yesterday, I am now disappointed to see Unity doesn't support it. I've been scaling stuff down so it's really tiny and hidden them under the ground, but that's a messy solution and only works for grounded objects, or you could hide the objects inside of a mesh in the animation that's always visible, but again a messy solution. Another alternative is setting visibility with code depending on what animation that's playing, but that's not great if you want to toggle visibility within an animation, as you'd have to use a timer, or break up your animation clip into separate animation clips based on when you want something to be visible.
Unity should just support the visibility toggle from Maya.
Answer by maxwelldoggums · Jul 01, 2013 at 08:42 PM
You could write a simple script which enables or disables the meshRenderer, and then use AnimationEvents to trigger it. http://docs.unity3d.com/Documentation/Components/animeditor-AnimationEvents.html
I think that's the closest you'll get to direct visibility keyframing unfortunately :(