alembic attributes doesn't respect alembic standard #88275

Closed
opened 2021-05-14 07:03:27 +02:00 by william eguienta · 15 comments

System Information
Operating system: All
Graphics card: Nvidia RTX 2080Ti (x8)

Blender Version
Broken: 2.92.0 Master

Short description of error
blender export of custom properties is not right

  • other DDCs reports a trigger by non-scalar properties in the .userProperties of an object, so for instance in the example /Cube.userProperties.static_int which is an ArrayProperty.
    this makes data unreadable or can crash some others DCCs
    ex : what maya can see
    image.png
  • the userProperties can only be written on transform level, but the alembic standard is to do it on shape level. (don't look at maya for this, maya does it wrong too by default )
    we should be able to choose if properties are at xform or shape level and default must be on shape normally

Exact steps for others to reproduce the error
add custom attributes on objects
export alembic with custom attributes on
inspect the alembic with abcls
custom-properties.blend custom-properties.abc

**System Information** Operating system: All Graphics card: Nvidia RTX 2080Ti (x8) **Blender Version** Broken: 2.92.0 Master **Short description of error** blender export of custom properties is not right - other DDCs reports a trigger by non-scalar properties in the `.userProperties` of an object, so for instance in the example `/Cube.userProperties.static_int` which is an ArrayProperty. this makes data unreadable or can crash some others DCCs ex : what maya can see ![image.png](https://archive.blender.org/developer/F10101478/image.png) - the userProperties can only be written on transform level, but the alembic standard is to do it on shape level. (don't look at maya for this, maya does it wrong too by default ) we should be able to choose if properties are at xform or shape level and default must be on shape normally **Exact steps for others to reproduce the error** add custom attributes on objects export alembic with custom attributes on inspect the alembic with abcls [custom-properties.blend](https://archive.blender.org/developer/F10099261/custom-properties.blend) [custom-properties.abc](https://archive.blender.org/developer/F10099242/custom-properties.abc)

Added subscriber: @kaiz3r

Added subscriber: @kaiz3r
william eguienta changed title from alembic attributes to alembic attributes doesn't repect alembic standard 2021-05-14 07:04:24 +02:00
william eguienta changed title from alembic attributes doesn't repect alembic standard to alembic attributes doesn't respect alembic standard 2021-05-14 14:05:27 +02:00
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

Seems alembic export supports Custom Properties on the Mesh datablock (shape level) as well?
#88275.abc

#88275.blend

image.png

Doesnt this work for you?

the userProperties can only be written on transform level, but the alembic standard is to do it on shape level.

You have the choice to put it on the object (transform level), the object data / Mesh (shape level) or both. Dont think we need a "standard" here if we can put it on both?

Seems alembic export supports Custom Properties on the `Mesh` datablock (shape level) as well? [#88275.abc](https://archive.blender.org/developer/F10102073/T88275.abc) [#88275.blend](https://archive.blender.org/developer/F10102074/T88275.blend) ![image.png](https://archive.blender.org/developer/F10102088/image.png) Doesnt this work for you? > the userProperties can only be written on transform level, but the alembic standard is to do it on shape level. You have the choice to put it on the object (transform level), the object data / Mesh (shape level) or both. Dont think we need a "standard" here if we can put it on both?
Member

If there is a standard for this, is this defined anywhere?

If there is a standard for this, is this defined anywhere?

my mistake, it's the .arbGeomParam that needs to be on shape level...
thank you for the example files
I can confirm that, with your export too, the alembic can cause crash because of array being non scalar
is there a way to export as arbGeomParam in blender to compare it with maya ?
here is an abc from maya, that export by default attribute to arbGeomParam and that work in all our DCCs
custom-propertiesMAYA.abc

my mistake, it's the .arbGeomParam that needs to be on shape level... thank you for the example files I can confirm that, with your export too, the alembic can cause crash because of array being non scalar is there a way to export as arbGeomParam in blender to compare it with maya ? here is an abc from maya, that export by default attribute to arbGeomParam and that work in all our DCCs [custom-propertiesMAYA.abc](https://archive.blender.org/developer/F10102304/custom-propertiesMAYA.abc)
Member

Changed status from 'Needs User Info' to: 'Needs Triage'

Changed status from 'Needs User Info' to: 'Needs Triage'
Member

Sorry it took a bit to answer.

Trying to understand better:

the alembic can cause crash because of array being non scalar

Not sure why that is? Both your provided abc and the one I exported write scalars in to single-element arrays, found this comment:

   * Here Blender does the same as other software (Maya, Houdini), and writes
   * scalar properties as single-element arrays. */

So it seems to come down to .userProperties vs .arbGeomParams.
Or does this mean we are not allowed to write single-element arrays into .userProperties?

Found this other related comment:

  /* Return the Alembic schema's compound property, which will be used for writing custom
   * properties.
   *
   * This can return either abc_schema.getUserProperties() or abc_schema.getArbGeomParams(). The
   * former only holds values similar to Blender's custom properties, whereas the latter can also
   * specify that certain custom properties vary per mesh component (so per face, vertex, etc.). As
   * such, .userProperties is more suitable for custom properties. However, Maya, Houdini use
   * .arbGeomParams for custom data.

Having said that, what I find strange is that a CompoundProperty .arbGeomParams is always defined by blender, but then empty?

Do you have any reference or document where this standard is described?

Sorry it took a bit to answer. Trying to understand better: > the alembic can cause crash because of array being non scalar Not sure why that is? Both your provided abc and the one I exported write scalars in to single-element arrays, found this comment: ``` * Here Blender does the same as other software (Maya, Houdini), and writes * scalar properties as single-element arrays. */ ``` So it seems to come down to `.userProperties` vs `.arbGeomParams`. Or does this mean we are not allowed to write single-element arrays into `.userProperties`? Found this other related comment: ``` /* Return the Alembic schema's compound property, which will be used for writing custom * properties. * * This can return either abc_schema.getUserProperties() or abc_schema.getArbGeomParams(). The * former only holds values similar to Blender's custom properties, whereas the latter can also * specify that certain custom properties vary per mesh component (so per face, vertex, etc.). As * such, .userProperties is more suitable for custom properties. However, Maya, Houdini use * .arbGeomParams for custom data. ``` Having said that, what I find strange is that a `CompoundProperty` `.arbGeomParams` is always defined by blender, but then empty? Do you have any reference or document where this standard is described?
Member

Changed status from 'Needs Triage' to: 'Needs User Info'

Changed status from 'Needs Triage' to: 'Needs User Info'
Member

Here is an abc with Custom Properties written to arbGeomParams
T88275_arbGeomParams.abc

Does this also crash?

(this was done changing https://developer.blender.org/diffusion/B/browse/master/source/blender/io/alembic/exporter/abc_writer_abstract.h$113)
P2131: T88275_snippet



diff --git a/source/blender/io/alembic/exporter/abc_writer_abstract.h b/source/blender/io/alembic/exporter/abc_writer_abstract.h
index d3500394555..04b4f72990e 100644
--- a/source/blender/io/alembic/exporter/abc_writer_abstract.h
+++ b/source/blender/io/alembic/exporter/abc_writer_abstract.h
@@ -110,7 +110,7 @@ class ABCAbstractWriter : public AbstractHierarchyWriter {
   template<typename T>
   Alembic::Abc::OCompoundProperty abc_schema_prop_for_custom_props(T abc_schema)
   {
-    return abc_schema.getUserProperties();
+    return abc_schema.getArbGeomParams();
   }
 };
 

Having said that, what I find strange is that a CompoundProperty .arbGeomParams is always defined by blender, but then empty?

(this seems to be related to exporting UVs btw. not exporting UVs will also not define .arbGeomParams -- still find it strange...)

Here is an abc with Custom Properties written to `arbGeomParams` [T88275_arbGeomParams.abc](https://archive.blender.org/developer/F10133613/T88275_arbGeomParams.abc) Does this also crash? (this was done changing https://developer.blender.org/diffusion/B/browse/master/source/blender/io/alembic/exporter/abc_writer_abstract.h$113) [P2131: T88275_snippet](https://archive.blender.org/developer/P2131.txt) ``` diff --git a/source/blender/io/alembic/exporter/abc_writer_abstract.h b/source/blender/io/alembic/exporter/abc_writer_abstract.h index d3500394555..04b4f72990e 100644 --- a/source/blender/io/alembic/exporter/abc_writer_abstract.h +++ b/source/blender/io/alembic/exporter/abc_writer_abstract.h @@ -110,7 +110,7 @@ class ABCAbstractWriter : public AbstractHierarchyWriter { template<typename T> Alembic::Abc::OCompoundProperty abc_schema_prop_for_custom_props(T abc_schema) { - return abc_schema.getUserProperties(); + return abc_schema.getArbGeomParams(); } }; ``` > Having said that, what I find strange is that a CompoundProperty .arbGeomParams is always defined by blender, but then empty? (this seems to be related to exporting UVs btw. not exporting UVs will also not define .arbGeomParams -- still find it strange...)
Member

@kaiz3r : could you check the above please? (otherwise will be closed in a week)

@kaiz3r : could you check the above please? (otherwise will be closed in a week)
Member

Added subscriber: @PratikPB2123

Added subscriber: @PratikPB2123
Member

(otherwise will be closed in a week)

@lichtwerk can you close the report?

>(otherwise will be closed in a week) @lichtwerk can you close the report?
Member

Changed status from 'Needs User Info' to: 'Archived'

Changed status from 'Needs User Info' to: 'Archived'
Member

@kaiz3r : feel free to comment again if you could check/answer the above, wil archive for now though.

@kaiz3r : feel free to comment again if you could check/answer the above, wil archive for now though.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#88275
No description provided.