Bbox of an archive created from several alembic files.

28 views
Skip to first unread message

Jean-Colas Prunier

unread,
Apr 17, 2023, 11:17:17 AM4/17/23
to alembic-discussion
Hi everyone, Lucas)

I am using the getArchive() method that accepts a vector of std::string for the files so I can load several files simultaneously, and the API nicely returns a single archive, etc.

The issue I have is that I was hoping to use the BBox return  Alembic::AbcGeom::GetIArchiveBounds(archive_).getValue(); but it seems that it only returns the bbox of the first Alembic file from the vector (and not a union of the BBoxes of all the archives).

Is it intended to work that way? I guess I will workaround this limitation by calculating the bbox ourselves, but I was wondering if you could confirm that I am either 1) potentially using it or understanding it wrong 2) or that it's potentially a bug? (known or not).

Thank you for your input.

Jean-Colas Prunier

unread,
Apr 17, 2023, 11:20:04 AM4/17/23
to alembic-discussion
It uses the bbox of the last file (in the vector). Not from the first .abc file. Sorry for the mistake.

Lucas Miller

unread,
Apr 17, 2023, 12:13:49 PM4/17/23
to alembic-d...@googlegroups.com
Yes, this is intended because what you are doing is layering the files together.

For cases where you are just sparsely updating a few xforms and adding a few shapes you would also hopefully update your bounds. (although not all tools may do that)

Lucas

--
You received this message because you are subscribed to the Google Groups "alembic-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alembic-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/alembic-discussion/4666cb81-7fe7-4935-bee5-c862bdbdc8c2n%40googlegroups.com.

j...@jean-colas.com

unread,
Apr 17, 2023, 3:26:41 PM4/17/23
to alembic-d...@googlegroups.com
Thanks Lucas,

On 17 Apr 2023, at 18:13, Lucas Miller <miller...@gmail.com> wrote:

Yes, this is intended because what you are doing is layering the files together.


I would argue that it is not the most logical behaviour)). If I am loading several files at once, at least I’d personally expect the archive that includes all the files to return a global bbox. That’s how I would have done it. But I understand everyone’s logic might be different and this is not a problem as long as I know that this is how it works now. And there’s workaround as you suggested.

For cases where you are just sparsely updating a few xforms and adding a few shapes you would also hopefully update your bounds. (although not all tools may do that)


Is it right to say that this bbox is calculated by Alembic based on the first sample, or is it using the one stored in the file metadata? I assume that one stored in the metadata is set by the tool itself when the file is exported. I think to remember the Maya plugin to do so. Sorry didn’t look at the code and I know you probably know the answer to this out of that bat.

Otherwise yes of course, I get your point. You are essentially saying, you’d need to update that bbox as your scroll though the animation.

But again, thank you so much for your swift answer. -jc

Lucas

On Mon, Apr 17, 2023 at 8:20 AM Jean-Colas Prunier <j...@jean-colas.com> wrote:
It uses the bbox of the last file (in the vector). Not from the first .abc file. Sorry for the mistake.

On Monday, April 17, 2023 at 5:17:17 PM UTC+2 Jean-Colas Prunier wrote:
Hi everyone, Lucas)

I am using the getArchive() method that accepts a vector of std::string for the files so I can load several files simultaneously, and the API nicely returns a single archive, etc.

The issue I have is that I was hoping to use the BBox return  Alembic::AbcGeom::GetIArchiveBounds(archive_).getValue(); but it seems that it only returns the bbox of the first Alembic file from the vector (and not a union of the BBoxes of all the archives).

Is it intended to work that way? I guess I will workaround this limitation by calculating the bbox ourselves, but I was wondering if you could confirm that I am either 1) potentially using it or understanding it wrong 2) or that it's potentially a bug? (known or not).

Thank you for your input.

--
You received this message because you are subscribed to the Google Groups "alembic-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alembic-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/alembic-discussion/4666cb81-7fe7-4935-bee5-c862bdbdc8c2n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "alembic-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to alembic-discuss...@googlegroups.com.

Lucas Miller

unread,
Apr 17, 2023, 3:45:39 PM4/17/23
to alembic-d...@googlegroups.com

Is it right to say that this bbox is calculated by Alembic based on the first sample, or is it using the one stored in the file metadata? I assume that one stored in the metadata is set by the tool itself when the file is exported. I think to remember the Maya plugin to do so. Sorry didn’t look at the code and I know you probably know the answer to this out of that bat.


It is not metadata, the archive bounds are a Box3DProperty so like other properties it can be sampled.   
Calculating this isn't automatic and so it is up to the DCC to decide when and how to calculate it.

Lucas

 
Reply all
Reply to author
Forward
0 new messages