Isotropix Forums

Error with USD Alembic plugin

Clarisse Scripting related topics

Error with USD Alembic plugin

Unread postby jboissinot » Wed Mar 08, 2023 9:02 pm

Hi,

I'm getting an error when I open a USD stage that contains Alembic references as it fails to load the usdAbc plugin.

While investigating the issue, I noticed that in the Clarisse installation directory ../clarisse-5.0_SP10/usd/plugin/usd, there is a usdAbc folder, but I don't see the usdAbc.so though. The LibraryPath of the pluginInfo.json in the usdAbc folder is also not set. So that's why I wanted to check if this is normal or confirm if the usdAbc plugin might be missing in the Clarisse build?

I also wanted to mention that this error only occurs when I open the USD stage for the first time in Clarisse. Then, it works fine as the error is no longer raised every time I open a USD stage with Alembic references again.

I'm not quite sure what's wrong here and what causes this issue, you must also know that I launch Clarisse with the USD api to be able to use it in Clarisse, so I wonder if that could create some kind of conflict, even though I would not think so, or if something is not properly set up with Clarisse regarding this plugin because it actually works fine when I try to do it in a shell.

Thanks,
Jeremy
jboissinot
 
Posts: 107
Joined: Tue Jan 29, 2019 10:36 pm

Re: Error with USD Alembic plugin

Unread postby dcourtois » Tue Mar 14, 2023 11:38 am

Hi,

We're building USD in monolithic mode. In this mode, the plugins are embedded in the `libusd_ms.so` file so you won't find any `usdAbc.so` file. And this is also why the path is not set in the `pluginfo.json` file. As for the problem with Alembic refs, it might come from the fact that the Alembic plugin is compiled *without* HDF5 support. So if the Alembic ref is using that format, it might explain the problem. If this is the case, you can convert it using the `abcconvert` tool which we provide alongside Clarisse.

As for the last paragraph, I'm not sure what you mean, but you can check by just running Clarisse "normally" and trying to reference the USD stage, to check if the problem comes from the way you're launch Clarisse, or from the stage itself.

Regards,
Damien.
User avatar
dcourtois
 
Posts: 128
Joined: Tue Jul 25, 2017 3:15 pm

Re: Error with USD Alembic plugin

Unread postby jboissinot » Mon Mar 20, 2023 5:15 pm

Hi Damien,

Thank you for getting back on this and explaining how the USD plugins are set up in Clarisse. I just wanted to let you know that the bug must not be related to the data type as our Alembic references are exported in Ogawa. Also, I wanted to clarify that I'm not getting any error when loading the USD file in Clarisse, so when I reference it, the USD file does load properly and everything is fine.

I'm actually getting an error when I open the stage with the USD api:
Code: Select all
stage = Usd.Stage.Open(path)


I'm only getting an error when I open a USD stage that contains Alembic references, and I'm also only getting the error when I open a USD stage with Alembic references for the first time in Clarisse, then if I do it again, it works fine, and even when opening other stages with Alembic references.

I'm not getting such error with the USD Alembic plugin when I do the same thing in a shell, so I don't really know what's going on and what causes this bug.

I was wondering if there is a way in Clarisse to know if a plugin is loaded or not and its path?

Not sure if this would help but let me know if you have an idea.

Thanks,
Jeremy
jboissinot
 
Posts: 107
Joined: Tue Jan 29, 2019 10:36 pm

Re: Error with USD Alembic plugin

Unread postby dcourtois » Mon Mar 20, 2023 5:45 pm

Hi,

There is no way to query USD plugins from Clarisse. If it's possible, it's via the USD API, but I don't know how to do it (or if it's possible).
This issue is very weird though. I need a bit more information: In your first question you mentioned that you`launch Clarisse with the USD api`. What exactly do you mean by that? I'm guessing that you have a Python setup so that it can use the USD's Pythoh binding API, and you are launching Clarisse via this Python environment. Am I correct?

Also, would it be possible to try to launch Clarisse normally (e.g. like you would from a fresh install, without any USD Python binding or whatever) and check if you can correctly reference those assets? (via `File > Reference > File...`)

My guess is that there is some conflicts between our USD lib and the ones you're using. In our module, we're initializing plugins using `PXR_NS::PlugRegistry::GetInstance().RegisterPlugins(bin_folder + "/usd");` where `bin_folder` is the path of the folder in which the Clarisse executable is located. I'm not sure if this would solve your issue, but you might want to explicitely try to register you own plugins before launch Clarisse. I don't know the equivalent Python code for that line though, but it shouldn't be too difficult to convert :)
User avatar
dcourtois
 
Posts: 128
Joined: Tue Jul 25, 2017 3:15 pm


Return to Scripting