Export data type in alembic

   3593   7   0
User Avatar
Member
209 posts
Joined: Nov. 2010
Offline
Hi everyone,

Maybe somebody know what it going on when I write vector custom attributes in alembic file ? Because when I read this .abc file in AbcEcho (example program) I see “datatype=float32_t”.
Why not float32_t ?

Anyone could give any advice ?

thanks
User Avatar
Member
209 posts
Joined: Nov. 2010
Offline
And one more thinks,
Houdini works fine with this .abc, but in other program datatype still float32_t.
In houdini 12.5.316 all works fine but now in 13 …
User Avatar
Staff
2592 posts
Joined: July 2005
Offline
Ostap
Hi everyone,

Maybe somebody know what it going on when I write vector custom attributes in alembic file ? Because when I read this .abc file in AbcEcho (example program) I see “datatype=float32_t”.
Why not float32_t ?

Anyone could give any advice ?

thanks

Do you have a simple example? Do you have the “vector” type qualifier on the attribute? Or is it created as 3 floats?

Attachments:
vector.hip (58.7 KB)

User Avatar
Member
209 posts
Joined: Nov. 2010
Offline
A little bit modify your file.

And we have from AbcEcho:
Object name=/torus_object1
CompoundProperty name=.xform;schema=AbcGeom_Xform_v3
ScalarProperty name=.inherits;interpretation=;datatype=bool_t;arraysize=1;numsamps=1
ScalarProperty name=.ops;interpretation=;datatype=uint8_t;arraysize=1;numsamps=1
ScalarProperty name=.vals;interpretation=;datatype=float64_t;arraysize=16;numsamps=1
Object name=/torus_object1/vopsop1
CompoundProperty name=.geom;schema=AbcGeom_PolyMesh_v1
ScalarProperty name=.selfBnds;interpretation=box;datatype=float64_t;arraysize=6;numsamps=1
ArrayProperty name=P;interpretation=point;datatype=float32_t;arraysize=100;numsamps=1
ArrayProperty name=.faceIndices;interpretation=;datatype=int32_t;arraysize=400;numsamps=1
ArrayProperty name=.faceCounts;interpretation=;datatype=int32_t;arraysize=100;numsamps=1
CompoundProperty name=.arbGeomParams;schema=
ArrayProperty name=vector;interpretation=vector;datatype=float32_t;arraysize=100;numsamps=1
ArrayProperty name=floats;interpretation=;datatype=float32_t;arraysize=300;numsamps=1
ArrayProperty name=testVec;interpretation=;datatype=float32_t;arraysize=300;numsamps=1
ArrayProperty name=varmap;interpretation=;datatype=string;arraysize=2;numsamps=1


Where testVec is set as vector type.

Attachments:
vectorMy.hip (66.5 KB)

User Avatar
Staff
2592 posts
Joined: July 2005
Offline
Ostap
A little bit modify your file.

And we have from AbcEcho:
Object name=/torus_object1
CompoundProperty name=.xform;schema=AbcGeom_Xform_v3
ScalarProperty name=.inherits;interpretation=;datatype=bool_t;arraysize=1;numsamps=1
ScalarProperty name=.ops;interpretation=;datatype=uint8_t;arraysize=1;numsamps=1
ScalarProperty name=.vals;interpretation=;datatype=float64_t;arraysize=16;numsamps=1
Object name=/torus_object1/vopsop1
CompoundProperty name=.geom;schema=AbcGeom_PolyMesh_v1
ScalarProperty name=.selfBnds;interpretation=box;datatype=float64_t;arraysize=6;numsamps=1
ArrayProperty name=P;interpretation=point;datatype=float32_t;arraysize=100;numsamps=1
ArrayProperty name=.faceIndices;interpretation=;datatype=int32_t;arraysize=400;numsamps=1
ArrayProperty name=.faceCounts;interpretation=;datatype=int32_t;arraysize=100;numsamps=1
CompoundProperty name=.arbGeomParams;schema=
ArrayProperty name=vector;interpretation=vector;datatype=float32_t;arraysize=100;numsamps=1
ArrayProperty name=floats;interpretation=;datatype=float32_t;arraysize=300;numsamps=1
ArrayProperty name=testVec;interpretation=;datatype=float32_t;arraysize=300;numsamps=1
ArrayProperty name=varmap;interpretation=;datatype=string;arraysize=2;numsamps=1


Where testVec is set as vector type.

The parameter VOP doesn't magically set the type qualifier on an exported attribute. This is because VEX isn't a strongly typed language (i.e. a VEX “vector” can be used to represent a color, position, vector, normal, etc.).

If you add the attribute using the “Add Attribute” VOP, you can set the type qualifier. Or you can also set the type after the fact using the Attribute Create SOP to modify the properties of the attribute.
User Avatar
Member
209 posts
Joined: Nov. 2010
Offline
Thanks in advance for your help.

In this case I will be use Attribute Create SOP.

And one more think, when I use “Add Attribute” in VOP - datatype still float32_t
And why in previous build 12.5.316 this works fine ?

Attachments:
vectorMy.hip (67.4 KB)

User Avatar
Staff
2592 posts
Joined: July 2005
Offline
Ostap
Thanks in advance for your help.

In this case I will be use Attribute Create SOP.

And one more think, when I use “Add Attribute” in VOP - datatype still float32_t
And why in previous build 12.5.316 this works fine ?

In the “Add Attribute” VOP, you need to set the “Type Qualifier” (bottom menu).

Houdini13 now handles export of arbitrary float arrays (i.e. 5 floats or 7 floats). So, much of the export code was re-written. Since Houdini keeps “type” information on attributes (i.e. position, normal, vector, color etc.), we use this to determine how to set the interpretation of a 3-float tuple in Alembic. It just needs to be set correctly in Houdini.
User Avatar
Member
209 posts
Joined: Nov. 2010
Offline
Thanks again
  • Quick Links