Bruce Jones

brucedjones

About Me

Connect

LOCATION
Not Specified
WEBSITE

Houdini Skills

Availability

Not Specified

Recent Forum Posts

Properties missing importing Alembic particles Feb. 16, 2017, 4:21 p.m.

Hi,

I'm new to both Houdini and Alembic, so bear with me.

I'm using the PyAlembic script below to generate an alembic file containing 100 points. When I run the resulting file through AbcEcho, I can see that the positions, velocities etc are all there. I am also able to import this file in houdini apprentice, and the particles are correctly positioned. However, the imported particles are missing all other properties such as velocity, width, id etc. Is this normal?

The abc file I generate is attached.


from imath import *
from alembic.Abc import *
from alembic.AbcGeom import *
def pointsOut():
    """write out points archive"""
    archive = OArchive("particlesOut3.abc")
    topObj = archive.getTop()
    ptsObj = OPoints(topObj, "somePoints")
    positions = V3fArray(100)
    velocities = V3fArray(100)
    ids = IntArray(100)
    widths = FloatArray(100)
    for i in range(100):
        positions[i] = V3f(i / 100.0, i / 100.0, i / 100.0)
        velocities[i] = V3f((100.0 - i) / 100.0, 0, 0)
        ids[i] = i * 10
        widths[i] = 0.1 + i * 0.05
    widthSamp = OFloatGeomParamSample()
    widthSamp.setScope(GeometryScope.kVertexScope)
    widthSamp.setVals(widths)
    psamp = OPointsSchemaSample()
    psamp.setPositions(positions)
    psamp.setIds(ids)
    psamp.setVelocities(velocities)
    psamp.setWidths(widthSamp)
    ptsObj.getSchema().set(psamp)
pointsOut()