Blender writes .abc color information wrong #53745

Closed
opened 2018-01-09 14:45:49 +01:00 by Atomic · 30 comments

System Information
All
nVidia

Blender Version
2.78c and forward.

Short description of error
Blender writes .abc color information wrong.

Exact steps for others to reproduce the error
Create some vertex colors on a cube and export it to Houdini. You will notice Houdini can't read the .abc Color information because the indices are written incorrectly.

Here is the log from the SideFX bug team...

Side Effects Support Ticket: #56695

Hello,

Houdini does not show the "Col" attribute because it is corrupt. "Col" is stored in the Alembic archive as an indexed attribute, however, the indices are corrupt.

Cheers,

Silvina


In response to:

Even if I rename Col to Cd inside of Blender when I export the .abc Houdini
never reveals the attribute.

Inside Houdini I have an Alembic node followed by an Unpack turned all the
way up to 10 levels of unpack recursion. When I inspect the attributes
there is no Col or Cd. I only see P and N attributes.

How were you able to inspect the Col attribute?
It would actually be nice to see any named attribute transferred.

ap

On Fri, Jan 5, 2018 at 3:54 PM, SideFX Support wrote:

Side Effects Support Ticket: #56695

Hello,

How are you exporting it? It is being saved as Col. Please try exporting
it as Cd.

Cheers,

Silvina


In response to:

Hello SESI,

I am trying to transfer vertex color information from Blender to Houdini,
via Alembic file format. I have attached the painted_cube.abc file that I
created and exported in Blender.

When I reference the .abc file in Houdini, I can not locate a @Cd
attribute, even after unpacking.
When I load the .abc file in Blender I can clearly see the painted vertex
information.

This implies, to me, that the color information is stored in the .abc file
but Houdini is not reading it correctly.

Can you look into this bug?

Thanks,
ap

**System Information** All nVidia **Blender Version** 2.78c and forward. **Short description of error** Blender writes .abc color information wrong. **Exact steps for others to reproduce the error** Create some vertex colors on a cube and export it to Houdini. You will notice Houdini can't read the .abc Color information because the indices are written incorrectly. Here is the log from the SideFX bug team... Side Effects Support Ticket: #56695 Hello, Houdini does not show the "Col" attribute because it is corrupt. "Col" is stored in the Alembic archive as an indexed attribute, however, the indices are corrupt. Cheers, Silvina ---------------- In response to: ---------------- Even if I rename Col to Cd inside of Blender when I export the .abc Houdini never reveals the attribute. Inside Houdini I have an Alembic node followed by an Unpack turned all the way up to 10 levels of unpack recursion. When I inspect the attributes there is no Col or Cd. I only see P and N attributes. How were you able to inspect the Col attribute? It would actually be nice to see any named attribute transferred. ap On Fri, Jan 5, 2018 at 3:54 PM, SideFX Support wrote: > Side Effects Support Ticket: #56695 > > Hello, > > How are you exporting it? It is being saved as Col. Please try exporting > it as Cd. > > Cheers, > > Silvina > > ---------------- > In response to: > ---------------- > Hello SESI, > > I am trying to transfer vertex color information from Blender to Houdini, > via Alembic file format. I have attached the painted_cube.abc file that I > created and exported in Blender. > > When I reference the .abc file in Houdini, I can not locate a @Cd > attribute, even after unpacking. > When I load the .abc file in Blender I can clearly see the painted vertex > information. > > This implies, to me, that the color information is stored in the .abc file > but Houdini is not reading it correctly. > > Can you look into this bug? > > Thanks, > ap
Author

Added subscriber: @AtomP

Added subscriber: @AtomP
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Is the Side Effects bugtracker public? If so, could you share a link?

Is the Side Effects bugtracker public? If so, could you share a link?
Sybren A. Stüvel was assigned by Philipp Oeser 2018-01-09 17:26:37 +01:00
Member

Added subscriber: @dr.sybren

Added subscriber: @dr.sybren
Member

Dont have access to Houdini atm, but looking at this further I made a very simple Cube with vertexcolors
VCol.abc

This reads back into blender just fine (including vertex colors).

As Houdini support was talking about a corrupt indexed attribute I had a look at the abc in abcecho

/opt/lib/alembic/bin/abcecho /tmp/VCol.abc 
AbcEcho for Alembic 1.7.1 (built Jan  8 2018 19:09:47)
  file written by: Blender
  using Alembic : Alembic 1.7.1 (built Jan  8 2018 19:09:47)
  written on : Tue Jan  9 17:07:26 2018
  user description : untitled

  ScalarProperty name=.childBnds;interpretation=box;datatype=float64_t[6];arraysize=6;numsamps=250
Object name=/Cube
  CompoundProperty name=.xform;schema=AbcGeom_Xform_v3
    ScalarProperty name=.inherits;interpretation=;datatype=bool_t;arraysize=1;numsamps=250
    ScalarProperty name=.ops;interpretation=;datatype=uint8_t;arraysize=1;numsamps=250
    ScalarProperty name=.vals;interpretation=;datatype=float64_t[16];arraysize=16;numsamps=250
  ScalarProperty name=visible;interpretation=;datatype=int8_t;arraysize=1;numsamps=250
Object name=/Cube/CubeShape
  CompoundProperty name=.geom;schema=AbcGeom_PolyMesh_v1
    ScalarProperty name=.selfBnds;interpretation=box;datatype=float64_t[6];arraysize=6;numsamps=1
    ArrayProperty name=P;interpretation=point;datatype=float32_t[3];arraysize=98;numsamps=1
    ArrayProperty name=.faceIndices;interpretation=;datatype=int32_t;arraysize=384;numsamps=1
    ArrayProperty name=.faceCounts;interpretation=;datatype=int32_t;arraysize=96;numsamps=1
    CompoundProperty name=.userProperties;schema=
      ScalarProperty name=meshtype;interpretation=;datatype=bool_t;arraysize=1;numsamps=1
    CompoundProperty name=.arbGeomParams;schema=
      CompoundProperty name=Col;schema=
        ArrayProperty name=.vals;interpretation=rgba;datatype=float32_t[4];arraysize=98;numsamps=1
        ArrayProperty name=.indices;interpretation=;datatype=uint32_t;arraysize=0;numsamps=1
    ArrayProperty name=N;interpretation=normal;datatype=float32_t[3];arraysize=98;numsamps=1

now the line reading ArrayProperty name=.indices;interpretation=;datatype=uint32_t;arraysize=0;numsamps=1 makes me wonder if we actually miss writing the indices? why is this arraysize zero?

On the other hand this could be totally fine [havent looked at the alembic specification further...]

@dr.sybren : could you have a look?

Dont have access to Houdini atm, but looking at this further I made a very simple Cube with vertexcolors [VCol.abc](https://archive.blender.org/developer/F1764899/VCol.abc) This reads back into blender just fine (including vertex colors). As Houdini support was talking about a corrupt **indexed** attribute I had a look at the abc in `abcecho` ``` /opt/lib/alembic/bin/abcecho /tmp/VCol.abc AbcEcho for Alembic 1.7.1 (built Jan 8 2018 19:09:47) file written by: Blender using Alembic : Alembic 1.7.1 (built Jan 8 2018 19:09:47) written on : Tue Jan 9 17:07:26 2018 user description : untitled ScalarProperty name=.childBnds;interpretation=box;datatype=float64_t[6];arraysize=6;numsamps=250 Object name=/Cube CompoundProperty name=.xform;schema=AbcGeom_Xform_v3 ScalarProperty name=.inherits;interpretation=;datatype=bool_t;arraysize=1;numsamps=250 ScalarProperty name=.ops;interpretation=;datatype=uint8_t;arraysize=1;numsamps=250 ScalarProperty name=.vals;interpretation=;datatype=float64_t[16];arraysize=16;numsamps=250 ScalarProperty name=visible;interpretation=;datatype=int8_t;arraysize=1;numsamps=250 Object name=/Cube/CubeShape CompoundProperty name=.geom;schema=AbcGeom_PolyMesh_v1 ScalarProperty name=.selfBnds;interpretation=box;datatype=float64_t[6];arraysize=6;numsamps=1 ArrayProperty name=P;interpretation=point;datatype=float32_t[3];arraysize=98;numsamps=1 ArrayProperty name=.faceIndices;interpretation=;datatype=int32_t;arraysize=384;numsamps=1 ArrayProperty name=.faceCounts;interpretation=;datatype=int32_t;arraysize=96;numsamps=1 CompoundProperty name=.userProperties;schema= ScalarProperty name=meshtype;interpretation=;datatype=bool_t;arraysize=1;numsamps=1 CompoundProperty name=.arbGeomParams;schema= CompoundProperty name=Col;schema= ArrayProperty name=.vals;interpretation=rgba;datatype=float32_t[4];arraysize=98;numsamps=1 ArrayProperty name=.indices;interpretation=;datatype=uint32_t;arraysize=0;numsamps=1 ArrayProperty name=N;interpretation=normal;datatype=float32_t[3];arraysize=98;numsamps=1 ``` now the line reading `ArrayProperty name=.indices;interpretation=;datatype=uint32_t;arraysize=0;numsamps=1` makes me wonder if we actually miss writing the indices? why is this arraysize zero? On the other hand this could be totally fine [havent looked at the alembic specification further...] @dr.sybren : could you have a look?
Author

I can verify that Philipp's cube export does not transfer color to Houdini.

untitled-1.png

I can verify that Philipp's cube export does not transfer color to Houdini. ![untitled-1.png](https://archive.blender.org/developer/F1788877/untitled-1.png)

I've tried a change in how Blender exports the vertex colour, writing it non-indexed but directly as an ArrayProperty.
@AtomP & @lichtwerk How does this file import for you? vertex-colours.abc
If this works well, I'll commit it to master.

Note how the Col property is written now:

Object name=/Suzanne/SuzanneShape
  CompoundProperty name=.geom;schema=AbcGeom_PolyMesh_v1
    ScalarProperty name=.selfBnds;interpretation=box;datatype=float64_t[6];arraysize=6;numsamps=1
    ArrayProperty name=P;interpretation=point;datatype=float32_t[3];arraysize=507;numsamps=1
    ArrayProperty name=.faceIndices;interpretation=;datatype=int32_t;arraysize=1968;numsamps=1
    ArrayProperty name=.faceCounts;interpretation=;datatype=int32_t;arraysize=500;numsamps=1
    CompoundProperty name=.userProperties;schema=
      ScalarProperty name=meshtype;interpretation=;datatype=bool_t;arraysize=1;numsamps=1
    CompoundProperty name=.arbGeomParams;schema=
      ArrayProperty name=Col;interpretation=rgba;datatype=float32_t[4];arraysize=507;numsamps=1
    ArrayProperty name=N;interpretation=normal;datatype=float32_t[3];arraysize=507;numsamps=1

It should show like this:

#53745-alembic-vcolours-non-indexed.png

The blend file i used to create this: vertex-colours.blend

I've tried a change in how Blender exports the vertex colour, writing it non-indexed but directly as an ArrayProperty. @AtomP & @lichtwerk How does this file import for you? [vertex-colours.abc](https://archive.blender.org/developer/F1856562/vertex-colours.abc) If this works well, I'll commit it to master. Note how the `Col` property is written now: ``` Object name=/Suzanne/SuzanneShape CompoundProperty name=.geom;schema=AbcGeom_PolyMesh_v1 ScalarProperty name=.selfBnds;interpretation=box;datatype=float64_t[6];arraysize=6;numsamps=1 ArrayProperty name=P;interpretation=point;datatype=float32_t[3];arraysize=507;numsamps=1 ArrayProperty name=.faceIndices;interpretation=;datatype=int32_t;arraysize=1968;numsamps=1 ArrayProperty name=.faceCounts;interpretation=;datatype=int32_t;arraysize=500;numsamps=1 CompoundProperty name=.userProperties;schema= ScalarProperty name=meshtype;interpretation=;datatype=bool_t;arraysize=1;numsamps=1 CompoundProperty name=.arbGeomParams;schema= ArrayProperty name=Col;interpretation=rgba;datatype=float32_t[4];arraysize=507;numsamps=1 ArrayProperty name=N;interpretation=normal;datatype=float32_t[3];arraysize=507;numsamps=1 ``` It should show like this: ![#53745-alembic-vcolours-non-indexed.png](https://archive.blender.org/developer/F1856571/T53745-alembic-vcolours-non-indexed.png) The blend file i used to create this: [vertex-colours.blend](https://archive.blender.org/developer/F1856578/vertex-colours.blend)
Author

This file's geometry does import into Houdini, but the color information is still missing. Even with an Unpack following up the Alembic import node.

This file's geometry does import into Houdini, but the color information is still missing. Even with an Unpack following up the Alembic import node.

This file's geometry does import into Houdini, but the color information is still missing.

@AtomP does Houdini tell you anything as to why?

Even with an Unpack following up the Alembic import node.

I have no idea what that means.

> This file's geometry does import into Houdini, but the color information is still missing. @AtomP does Houdini tell you anything as to *why*? > Even with an Unpack following up the Alembic import node. I have no idea what that means.
Member

Looks like vertexcolors are missing in maya as well...
(and interestingly enough maya doesnt give you a single line of output - even in debug AbcImport -mode import -debug "vertex-colours.abc")

Looks like vertexcolors are missing in maya as well... (and interestingly enough maya doesnt give you a single line of output - even in debug `AbcImport -mode import -debug "vertex-colours.abc"`)

Added subscriber: @brecht

Added subscriber: @brecht

Perhaps it would be useful to import the file into Maya/Houdini, add vertex colors, export, and see how it's different.

Perhaps it would be useful to import the file into Maya/Houdini, add vertex colors, export, and see how it's different.
Member

OK, this is from maya (also writes them indexed)

Object name=/Suzanne/SuzanneShape
  CompoundProperty name=.geom;schema=AbcGeom_PolyMesh_v1
    ScalarProperty name=.selfBnds;interpretation=box;datatype=float64_t[6];arraysize=6;numsamps=1
    ArrayProperty name=P;interpretation=point;datatype=float32_t[3];arraysize=507;numsamps=1
    ArrayProperty name=.faceIndices;interpretation=;datatype=int32_t;arraysize=1968;numsamps=1
    ArrayProperty name=.faceCounts;interpretation=;datatype=int32_t;arraysize=500;numsamps=1
    ArrayProperty name=N;interpretation=normal;datatype=float32_t[3];arraysize=1968;numsamps=1
    CompoundProperty name=.arbGeomParams;schema=
      CompoundProperty name=colorSet1;schema=
        ArrayProperty name=.vals;interpretation=rgba;datatype=float32_t[4];arraysize=397;numsamps=1
        ArrayProperty name=.indices;interpretation=;datatype=uint32_t;arraysize=1968;numsamps=1

looks like indexed is the way to go (and not directly as an ArrayProperty)?

quoting myself from before:

now the line reading ArrayProperty name=.indices;interpretation=;datatype=uint32_t;arraysize=0;numsamps=1 makes me wonder if we actually miss writing the indices? why is this arraysize zero?

So are just the indices missing?
But judging @dr.sybren 's comments in 6db0fd65ab and #53711 (Alembic don´t import vertex colors correctly ) he is already aware of this?

OK, this is from maya (also writes them indexed) ``` Object name=/Suzanne/SuzanneShape CompoundProperty name=.geom;schema=AbcGeom_PolyMesh_v1 ScalarProperty name=.selfBnds;interpretation=box;datatype=float64_t[6];arraysize=6;numsamps=1 ArrayProperty name=P;interpretation=point;datatype=float32_t[3];arraysize=507;numsamps=1 ArrayProperty name=.faceIndices;interpretation=;datatype=int32_t;arraysize=1968;numsamps=1 ArrayProperty name=.faceCounts;interpretation=;datatype=int32_t;arraysize=500;numsamps=1 ArrayProperty name=N;interpretation=normal;datatype=float32_t[3];arraysize=1968;numsamps=1 CompoundProperty name=.arbGeomParams;schema= CompoundProperty name=colorSet1;schema= ArrayProperty name=.vals;interpretation=rgba;datatype=float32_t[4];arraysize=397;numsamps=1 ArrayProperty name=.indices;interpretation=;datatype=uint32_t;arraysize=1968;numsamps=1 ``` looks like indexed is the way to go (and not directly as an ArrayProperty)? quoting myself from before: > now the line reading ArrayProperty name=.indices;interpretation=;datatype=uint32_t;arraysize=0;numsamps=1 makes me wonder if we actually miss writing the indices? why is this arraysize zero? So are just the indices missing? But judging @dr.sybren 's comments in 6db0fd65ab and #53711 (Alembic don´t import vertex colors correctly ) he is already aware of this?

looks like indexed is the way to go (and not directly as an ArrayProperty)?

Shame, would have been so much easier to dump the data in there and have it over with. Thanks for testing it.

So are just the indices missing?

As Blender does it now (compared to my personal branch) it tells the Alembic library that it'll be writing indexed, but then it doesn't provide the indices. Of course this is a bug, which can be fixed in two ways: 1) don't tell Alembic we're doing indexed, or 2) actually write the indices. Since 1) is the simplest one (just change true to false in the right API call) I wanted to test that. I guess it doesn't work, so next try will be solution 2); that includes me having to discover how to write indexed stuff to begin with. I'm guessing it writes a value for each face (or maybe even each unique colour), and then for each vertex indices the colour number.

> looks like indexed is the way to go (and not directly as an ArrayProperty)? Shame, would have been so much easier to dump the data in there and have it over with. Thanks for testing it. > So are just the indices missing? As Blender does it now (compared to my personal branch) it tells the Alembic library that it'll be writing indexed, but then it doesn't provide the indices. Of course this is a bug, which can be fixed in two ways: 1) don't tell Alembic we're doing indexed, or 2) actually write the indices. Since 1) is the simplest one (just change `true` to `false` in the right API call) I wanted to test that. I guess it doesn't work, so next try will be solution 2); that includes me having to discover how to write indexed stuff to begin with. I'm guessing it writes a value for each face (or maybe even each unique colour), and then for each vertex indices the colour number.
Member

Here is some more info just reported via IRC (pasting here cause user doesnt have an account). It's from a private bug report in UE4

Alembic file with vertex colors make UE4 to crash
Trying to import an alembic file with vertex colors will result in UE4 crashing.

To reproduce the problem make in your 3d program (I'm using blender 2.79b) a simple plane with a transform animation (2 keyframes is enough) and add a vertex color channel (or use the one attached). Export that as alembic. Import it then from Unreal and set the alembic options as "skeletal" and UE4 will crash.

Unreal staff answer:
It seems that Blender outputs the colours slightly incorrect, when reading your file the color property is set to be indexed. However there are no colour indices available (I'm not sure if this adheres to the Alembic spec?) though with shelved CL 3983495 you should be able to import them. In this case it will reuse the vertex position indices to sample the colours.

Here is some more info just reported via IRC (pasting here cause user doesnt have an account). It's from a private bug report in UE4 > **Alembic file with vertex colors make UE4 to crash** > Trying to import an alembic file with vertex colors will result in UE4 crashing. > >To reproduce the problem make in your 3d program (I'm using blender 2.79b) a simple plane with a transform animation (2 keyframes is enough) and add a vertex color channel (or use the one attached). Export that as alembic. Import it then from Unreal and set the alembic options as "skeletal" and UE4 will crash. > > Unreal staff answer: > It seems that Blender outputs the colours slightly incorrect, when reading your file the color property is set to be indexed. However there are no colour indices available (I'm not sure if this adheres to the Alembic spec?) though with shelved CL 3983495 you should be able to import them. In this case it will reuse the vertex position indices to sample the colours.

Added subscriber: @n1ckfg

Added subscriber: @n1ckfg

I've confirmed these observations with Maya, Houdini, UE4. One clue that might be useful--Unity's open-source Alembic importer does accept Blender Alembic files with vertex colors (as long as you use their hard-coded attribute name "rgba").
https://github.com/unity3d-jp/AlembicForUnity

You have to write your own vertex color shader to test this, so I've made an example here:
https://github.com/n1ckfg/AlembicAudioTest

Nick

I've confirmed these observations with Maya, Houdini, UE4. One clue that might be useful--Unity's open-source Alembic importer _does_ accept Blender Alembic files with vertex colors (as long as you use their hard-coded attribute name "rgba"). https://github.com/unity3d-jp/AlembicForUnity You have to write your own vertex color shader to test this, so I've made an example here: https://github.com/n1ckfg/AlembicAudioTest Nick

In #53745#492052, @lichtwerk wrote:

Unreal staff answer:
It seems that Blender outputs the colours slightly incorrect, when reading your file the color property is set to be indexed. However there are no colour indices available (I'm not sure if this adheres to the Alembic spec?)

This is already known & described in the comments in this task. I hoped we could go without indexing altogether, but it seems we'll have to index the colours. To be continued.

> In #53745#492052, @lichtwerk wrote: >> Unreal staff answer: >> It seems that Blender outputs the colours slightly incorrect, when reading your file the color property is set to be indexed. However there are no colour indices available (I'm not sure if this adheres to the Alembic spec?) This is already known & described in the comments in this task. I hoped we could go without indexing altogether, but it seems we'll have to index the colours. To be continued.

Added subscriber: @WybrenvanKeulen

Added subscriber: @WybrenvanKeulen

Hi Sybren! I've been following this thread with great interest. I've had reports that in addition to the software already mentioned above, Clarisse and Cinema 4D also don't import the vertex colors written by Blender. I have confirmed that with my own tests.

I've been digging around the web and, although it is awfully hard to find info on Alembic, I suddenly stumbled upon this little gem:

https://help.autodesk.com/view/MAYAUL/2017/ENU/?guid=__cpp_ref__abc_export_2_maya_mesh_writer_8cpp_example_html

Look for the writeColor() function, which looks a lot like Blender's write_mcol() function, but there's clearly indexing going on in there. I'm hoping this will shed some light on "how to write indexed stuff to begin with" :)

Hi Sybren! I've been following this thread with great interest. I've had reports that in addition to the software already mentioned above, Clarisse and Cinema 4D also don't import the vertex colors written by Blender. I have confirmed that with my own tests. I've been digging around the web and, although it is awfully hard to find info on Alembic, I suddenly stumbled upon this little gem: https://help.autodesk.com/view/MAYAUL/2017/ENU/?guid=__cpp_ref__abc_export_2_maya_mesh_writer_8cpp_example_html Look for the writeColor() function, which looks a lot like Blender's write_mcol() function, but there's clearly indexing going on in there. I'm hoping this will shed some light on "how to write indexed stuff to begin with" :)

I went ahead and took the plunge into the Blender source and sure enough I fixed it! I submitted a patch at https://developer.blender.org/D3704 along with some more info on indexed writing.
I attached an Alembic file that contains a tree model with several vertex color layers. I tested it extensively in Houdini. Please test it and post back your success or failure. I hope it fixes this bug for at least Houdini and Maya.

Tree.abc

I went ahead and took the plunge into the Blender source and sure enough I fixed it! I submitted a patch at https://developer.blender.org/D3704 along with some more info on indexed writing. I attached an Alembic file that contains a tree model with several vertex color layers. I tested it extensively in Houdini. Please test it and post back your success or failure. I hope it fixes this bug for at least Houdini and Maya. [Tree.abc](https://archive.blender.org/developer/F4743810/Tree.abc)

This issue was referenced by 104fb1fb76

This issue was referenced by 104fb1fb76b187e24c6c277f43ed61190db5be26

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Added subscriber: @irfancelik

Added subscriber: @irfancelik

Could someone test this again in Maya?
I dont seem to get any vertex color info into Maya here even though re importing the abc back into blender does work.
Tested it myself here using the daily builds of blender 2.8, official 2.79 and daily 2.79.

Could someone test this again in Maya? I dont seem to get any vertex color info into Maya here even though re importing the abc back into blender does work. Tested it myself here using the daily builds of blender 2.8, official 2.79 and daily 2.79.

It's best to create a new bug report, with all the required information and .blend / .abc file to reproduce the issue.

It's best to create a new bug report, with all the required information and .blend / .abc file to reproduce the issue.

I created one here https://developer.blender.org/T60977

Thanks!

I created one here https://developer.blender.org/T60977 Thanks!
Author

I tried the Tree.abc file in Houdini 17.0 and it does not work. When I unpack the data, I can see that a 4 float vector is written, but that is wrong, it should be only a 3 float vector. Even when I promote (or wrangle) the data into an attribute @Cd, that the viewport expects, all the data is zero (i.e. black).

My guess is you should drop the alpha component of the color when exporting.

I tried the Tree.abc file in Houdini 17.0 and it does not work. When I unpack the data, I can see that a 4 float vector is written, but that is wrong, it should be only a 3 float vector. Even when I promote (or wrangle) the data into an attribute @Cd, that the viewport expects, all the data is zero (i.e. black). My guess is you should drop the alpha component of the color when exporting.

In #53745#661155, @AtomP wrote:
I tried the Tree.abc file in Houdini 17.0 and it does not work. When I unpack the data, I can see that a 4 float vector is written, but that is wrong, it should be only a 3 float vector.

It would be nice to have a distinction between "that is wrong" (which is an absolute statement about how the file is written), and "that is not what Houdini expects". How do you know it's the former, and not the latter?

> In #53745#661155, @AtomP wrote: > I tried the Tree.abc file in Houdini 17.0 and it does not work. When I unpack the data, I can see that a 4 float vector is written, but that is wrong, it should be only a 3 float vector. It would be nice to have a distinction between "that is wrong" (which is an absolute statement about how the file is written), and "that is not what Houdini expects". How do you know it's the former, and not the latter?

Hi Atomic and Sybren,

I think Sybren is right, in that is not wrong, just a style difference. The main thing here is that Houdini expects vertex colors that you want viewed in the viewport to be called "Cd". Vertex colors in Blender can be named anything and the color layers included in the example file are named Power, Thickness etc...

I found it hard to find good info on how Houdini expects vertex colors, but some sources say Houdini uses Cd- [x], Cd- [x], Cd- [x] and a separate Alpha attribute. I dived into Houdini and indeed had a very hard time to get the vertex colors to something that Houdini likes. You can however view the attributes in Tree.abc with a Visualizer, from the display options in the lower right corner of the 3D viewport. But other than that it is indeed very hard to convert to regular Cd vertex colors.

I tried writing an attribute wrangler that runs over vertices, but it does not work. It does create the right Attributes, but for reasons unknown to me, it does not show in the viewport. I am not an expert in Houdini, maybe you know why? Here is the code:
vector thick = attrib(0, 'vertex', 'Thickness', @vtxnum);
@Cd = set(thick- [x], thick- [x], thick[2]);
@Alpha = thick[3];

Anyway, I found a much easier way to fix this. Select the Alembic Geometry node and head to its parameters. At the bottom you will find "Remap Attributes" - click the plus button.
Type in the name of the attribute in the Alembic file, for instance "Thickness". Enter the Houdini name, and you can enter "Cd" here. That works right away, you could also set the type to color, but that seems to happen automatically.

Have fun!

Hi Atomic and Sybren, I think Sybren is right, in that is not wrong, just a style difference. The main thing here is that Houdini expects vertex colors that you want viewed in the viewport to be called "Cd". Vertex colors in Blender can be named anything and the color layers included in the example file are named Power, Thickness etc... I found it hard to find good info on how Houdini expects vertex colors, but some sources say Houdini uses Cd- [x], Cd- [x], Cd- [x] and a separate Alpha attribute. I dived into Houdini and indeed had a very hard time to get the vertex colors to something that Houdini likes. You can however view the attributes in Tree.abc with a Visualizer, from the display options in the lower right corner of the 3D viewport. But other than that it is indeed very hard to convert to regular Cd vertex colors. I tried writing an attribute wrangler that runs over vertices, but it does not work. It does create the right Attributes, but for reasons unknown to me, it does not show in the viewport. I am not an expert in Houdini, maybe you know why? Here is the code: vector thick = attrib(0, 'vertex', 'Thickness', @vtxnum); @Cd = set(thick- [x], thick- [x], thick[2]); @Alpha = thick[3]; Anyway, I found a much easier way to fix this. Select the Alembic Geometry node and head to its parameters. At the bottom you will find "Remap Attributes" - click the plus button. Type in the name of the attribute in the Alembic file, for instance "Thickness". Enter the Houdini name, and you can enter "Cd" here. That works right away, you could also set the type to color, but that seems to happen automatically. Have fun!
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
8 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#53745
No description provided.