Any idea for importing ABC cache

Hi Team,

Is there any approach to import ABC cache to Babylon Engine?

Hi @RavenLee, I don’t think you can load an Alembic file, but I’ll let @bghgary confirm. Maybe you can use Morph Targets | Babylon.js Documentation (babylonjs.com) for vertex animations? Pinging also @ozRocker who seemed to be looking for the same thing some time ago. Maybe he has an idea to share?

1 Like

I was trying to use baked animation from CLO which exports in Alembic and OBJ file sequence. I just used the OBJ file sequence instead.

2 Likes

We don’t have support for Alembic files. Maybe there is an Alembic to glTF converter? I wonder what happens if you import Alembic into Blender and then export to glTF.

1 Like

Hi,
Thank you for your reply.
I did some tests for converting Alembic by Blender, some assets can be correctly imported such as meshes, curves etc. But the animation behavior looks not the exact the same as Maya. (Some constraints are lost and the motion looks weird) Exported gltf file does not maintain the correct animation as well.
image
For import options, I just kept it as default. when I checked the Is Sequence Option, the animations are gone.
image
For export options, I checked the animation boxes but find no animation node in the export file.

Have you tried exporting a glTF directly from Maya? I see there are a couple glTF exporter plugins online, but I can’t vouch for the completeness.

1 Like

I don’t know what the Alembic support is in Blender or Maya, etc. But if it can load them into something that glTF can support, then it might be able to export. We have an exporter for Maya that you can try:

Export Maya scene as glTF | Babylon.js Documentation (babylonjs.com)

2 Likes

Thank you for the replies. I am trying to work on the BabylonJS Maya Exporter.So far I got two questions about the exporter.

  • Why we have to tear down all bones of a skeleton and group by the influence of skins?

In the code, we have GetRevelantNodes(MFnSkinCluster skin) function to see whether nodes relate to a certain skin. Then all related bones will group as a new skeleton when exported, which finally leads to several skeletons in the file. I am not sure why we have to do this.

  • What is the proper way to export morph target animations?

I notice that we have Morph Target ops in the menu. But when I am trying to export them, it cannot be identified and exported. I used some controllers in maya and baked the final animation. Any idea for a proper procedure?

Perhaps @Guillaume_Pelletier can help with these questions.

I guess this is an historic reason due that the fact the exporter was first designed for Babylon Format and these features was not supported at this time. It is on our plan to revisit this part of the exporter.

The morph target options is only about exporting normal & tangent. Proper way is to define a morph target as usually in Maya (that you may delete to keep the scene lighter, we introduced a dynamic rebuild few month ago) and the exporter is suppose to taking care of it. If not work, please share the scene in order to investigate.

Appreciate for your reply.
Recently I am also working the maya exporter. But when I try to debug my compiled dll. I cannot find a to overwrite the previous verson because Maya is using the dll even if I have uninstalled the plugin, so I have to shut down maya and recompile the dll. Do you have any suggestion on facilitating the dubugging process? Maybe I can help with the skeleton export part.

You can not overwrite a managed dll while in use, the only way to do it is to unload the AppDomain, and for Maya architecture, we might have a kind of boot loader as base of the exporter. This will be very interesting feature but out of the scope actually while i’m nearly the only dev on it :slight_smile:
I assume you’re using vs studio 2019.
You must first start VS as Administrator
image
This will allow the Post Build event command kline (into Project properties) to close Maya, then copy the compiled file, and then restart Maya automatically.


Once done, if you want to debug, you need top attach the debugger to the Maya external process. To do so use the debug menu-> attach to process
image
Then select maya.exe into the opened form.
You now beeing able to debug the code into VS while using Maya.

1 Like