Animate visibility of group node in Maya

What is the best way to export visibility of a group node?
It doesnt seem to export when played back in sandbox.

Thanks for any help

Hey!

so far visibility should only be exported in babylonjs format. Are you using gltf format to export?

Here is the list for Maya using bjs format:
https://doc.babylonjs.com/resources/maya#exported-features

the same list for Maya using gltf:
https://doc.babylonjs.com/resources/maya_to_gltf#exported-features

Hi Deltakosh.
I am exporting as Babylonjs I think its because I was trying to animate the visibility of the group node and not the poly mesh, will try that now…

1 Like

The only way I could export the visibility of some poly objects was to place a key to ON at frame -1, then off at frame1 and then left to come on later in the animation.

If I have a key just on frame 1 to OFF and keyed later on to ON in the animation it doesnt export. I also have visibility keyed on multiple items.

Is it a bug or just me…yeah I’m sure it’s me.

Pinging @PatrickRyan to get more insights about Maya

@stezza, when you are animating visibility in Maya, it counts as hiding and unhiding the mesh for the purposes of export. If you start with your mesh hidden on the first frame, Maya sees that as a hidden object, and will only export it if you select “Export Hidden Objects”

exportHidden

I set up a scene with a single cube, starting the first frame with visibility off. You can see that checking export hidden object results in the mesh being exported and the animation plays in the sandbox. If I didn’t check export hidden objects, the cube would not be eligible for export.

However, if you are using hide object as a sort for which meshes from your scene get exported and still want to start an exported mesh with visibility off, you can then use export hidden objects in conjunction with “Export only selected” and make sure that your meshes that start with visibility off are selected with the rest of the meshes for export and this should work. Let me know if you have other questions.

Regardless of export, is visibility really good for animation? I thought once it drops to a certain point the mesh just becomes un-drawn.

@JCPalmer, it really depends on the scene you are building. The mesh will be culled from the render queue when it is fully transparent or when it is keyed as hidden in Maya. The difference is that if you have an opaque mesh that you want to remain in the opaque queue so as to prevent sorting issues and then remove the mesh from the render queue for some reason, toggling visibility in Maya can accomplish that. Otherwise, the mesh needs to be in the transparent queue so that when you want it to disappear, you can change the transparency.

I worked on a project once where we had all of our meshes fading in and out of visibility when they were called, but having them always in the transparent queue caused sorting issues. We needed to build a system that would push the mesh to the transparent queue when we would fade in or out and then into the opaque queue when it was visible. I can see a reason to just hide a mesh if you don’t need it to fade out because you then don’t have to do the queue hopping or worry about depth buffers in the transparent queue.

1 Like

Excellent many thanks for the explanation, just the fix.
Interesting to read about fading an object, is this achieved just by animating the texture transparency?

1 Like