Page MenuHome

Export particle rotations to Alembic
Needs RevisionPublic

Authored by Michael Root (mike1158) on Oct 14 2019, 9:04 PM.



This small patch adds particle rotations as Euler angles in radians into Alembic exports. This is helpful for recreating object instancing done in Blender in other 3D applications.

Diff Detail

rB Blender

Event Timeline

Looks good to me, appart from some minor style issue (no need for the protected keyword as it is a final class in the hierarchy). @Sybren A. Stüvel (sybren) do you have any objections?

getArbGeomParams() is generally used when adding a custom property (i.e. a property that's not part of the Alembic API), and in this case the "rotation" property looks like a custom one to me. This really needs better motivation, for example an overview of which applications actually support this property, with a link to documentation that states this (or other ways of verifying).

What I would also like to see are some numbers on the impact on file size when adding this data to the export of all particle systems. Since no option was added to turn this off, it's always going to be part of the export, so there should be some indication of the cost.

Sybren A. Stüvel (sybren) requested changes to this revision.Nov 6 2019, 12:31 PM
This revision now requires changes to proceed.Nov 6 2019, 12:31 PM

Good points. I added rotation specifically to support exporting animated trees with particle-instanced "twigs" from such that they could be imported into Clarisse and remain instanced, letting us handle many tens of thousands of animated trees. Perhaps Wybren (the author of The Grove) can chime in--I sent him a link to this patch when I submitted it.

Given that alembic compresses and dedupes data on per-property level, the impact on file size for particle systems that have all-zero rotations should be extremely small. Agreed that writing arbitrary data you don't need isn't the best--it really should have a UI switch.

Anyway, being in the middle of production, and not a normal Blender dev (this is my first submission), I did the absolute minimum needed. I think what's really needed is the ability to export and import any arbitrary particle properties, but that's not something I had time to take on right now. Was just hoping this patch might encourage someone with more time to add to it, or perhaps start a discussion on what was needed next.