Search - User list
Full Version: Reading vertex colour attributes from Blender Alembic export
Root » Technical Discussion » Reading vertex colour attributes from Blender Alembic export
n1ckfg
So I need to extract vertex colours from an Alembic exported in Blender. I'm almost there–using the Python node I can get an empty array of Cd attributes:
import _alembic_hom_extensions as abc

def getAbcAttr(attrName):
    geo = hou.pwd().geometry()
    time = hou.frame() / hou.fps()
    
    if geo.findGlobalAttrib("abcFileName") is not None:
        url = geo.attribValue("abcFileName")

        for childGeo in abc.alembicGetSceneHierarchy(url, "/")[2]:  
            path = "/" + childGeo[0] + "/" + childGeo[2][0][0]
            
            x = abc.alembicArbGeometry(url, path, attrName, time)
            print(x) 
            
getAbcAttr("Cd")

From the abcls output below, can anybody tell me what I need to change in the script to get the attribute values?

/crv_GP_Layer_1_mesh_007/crv_GP_Layer_1_mesh_007Shape/.arbGeomParams:
CompoundProperty Cd {
arrayExtent=1
geoScope=fvr
interpretation=rgba
isGeomParam=true
podExtent=4
podName=float32_t
}
/crv_GP_Layer_1_mesh_007/crv_GP_Layer_1_mesh_007Shape/Cd:
ArrayProperty float32_t[4] .vals[1] {
arrayExtent=1
geoScope=fvr
interpretation=rgba
isGeomParam=true
podExtent=4
podName=float32_t
}
Enivob
I submitted this as a Houdini bug but SESI claims it is a Blender export bug.
I have reported this to the Blender developers and there is some investigation in progress.
https://developer.blender.org/T53745 [developer.blender.org]

It is an interesting approach to try and pull the information directly from the .abc file, however.

Are you unpacking your Alembic before you run the Python?
n1ckfg
Yup, I'm unpacking, but the discussion at the link you provided seems to definitively confirm it's a Blender bug, not a Houdini problem. Thanks!
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB