[Bf-committers] FM 2.8 Proposal : Fracturing, Cache, Rigidbody
dr. Sybren A. Stüvel
sybren at stuvel.eu
Tue Jun 12 18:00:13 CEST 2018
This is a response to
(I removed it from my mail server, so I can't hit 'reply' directly)
On 26-02-2018 22:54, Brecht van Lommel wrote:
> Thanks for the explanation. Overall I agree with the approach.
> It would be very helpful if this kind of functionality was submitted for
> review and integration in smaller parts. For example:
> * Add Alembic support to point caches for physics systems. (could even
> replace custom point cache format)
Alembic is stricly a write-once file format . This means that we
cannot update a part of a file; say the file contains frame range 1-250,
we won't be able to re-simulate frames 150-250 and update the file for
that. It can only be "updated" by reading the old file, updating its
contents where necessary, and writing to another file. Furthermore, an
Alembic file cannot be read until it is properly written *and closed*.
With this info about Alembic, what do you think about using Alembic
files for such caches? I'm not yet all that familiar with the current
physics caching system, but I do know it creates a file for every frame,
making it trivial to update frames. Is this actually used, though? Or
are we always sequentially writing to the cache?
We could work around these limitations of Alembic by writing continuous
frame sequences to a single file (so if you simulate 1-100 and then
press ESC, it would write to sim-001-100.abc), which can then be read
when replaying those frames. Simulating other ranges would then save to
other Alembic files (e.g. sim-101-140.abc). This could potentially
produce many small files, though, or cause problems where objects exists
in one file but not the other. Then again, we could have code to merge
sequences of Alembic files.
If not Alembic, what would be a good cache file format? Ideally I'd like
to use something that's already proven technology, rather than thinking
up something ourselves.
Sybren A. Stüvel
More information about the Bf-committers