export ABC instances with time offset

   2715   0   0
User Avatar
Member
94 posts
Joined: Aug. 2010
Offline
hey all, I'm exporting “crowd-like” instances to ABC and had a question… If I pass deforming geometry into a Copy SOP then Alembic ROP, all of the nodes in the ABC are instanced correctly.

In practice, you likely want to offset the timing of the instances. Unfortunately, I haven't been able to figure out how to offset the timing and still retain instancing (I've attached a hip). Anyone know how to set this up? thanks!

FYI to check, read the ABC back in and look at the path attribute. if you see “instance” in the name, you're probably good; or you can use python like I do to inspect the file:
import alembic

def visitObject(iObj, tab=''):
printObject(iObj, tab)
for child in iObj.children:
visitObject(child, tab+' ‘)

def printObject(iObj, tab=’'):
name = iObj.getName()
schema = iObj.getMetaData().get('schema')
instance = ‘'
if iObj.isInstanceRoot():
instance = ’instance: %s' % iObj.instanceSourcePath()
print ‘%s%s (%s) %s’ % (tab, name, schema, instance)

f = ‘/tmp/output.abc’
arch = alembic.Abc.IArchive(f)
top = arch.getTop()
visitObject(top)

a correct file looks like this:
ABC ()
geo1 (AbcGeom_Xform_v3)
copy1 (AbcGeom_Xform_v3)
copy1 (AbcGeom_PolyMesh_v1)
copy1_instance_1 (AbcGeom_Xform_v3)
copy1 (AbcGeom_PolyMesh_v1) instance: /geo1/copy1/copy1
copy1_instance_2 (AbcGeom_Xform_v3)
copy1 (AbcGeom_PolyMesh_v1) instance: /geo1/copy1/copy1
copy1_instance_3 (AbcGeom_Xform_v3)
copy1 (AbcGeom_PolyMesh_v1) instance: /geo1/copy1/copy1
copy1_instance_4 (AbcGeom_Xform_v3)
copy1 (AbcGeom_PolyMesh_v1) instance: /geo1/copy1/copy1
copy1_instance_5 (AbcGeom_Xform_v3)
copy1 (AbcGeom_PolyMesh_v1) instance: /geo1/copy1/copy1
copy1_instance_6 (AbcGeom_Xform_v3)
copy1 (AbcGeom_PolyMesh_v1) instance: /geo1/copy1/copy1
copy1_instance_7 (AbcGeom_Xform_v3)
copy1 (AbcGeom_PolyMesh_v1) instance: /geo1/copy1/copy1
copy1_instance_8 (AbcGeom_Xform_v3)
copy1 (AbcGeom_PolyMesh_v1) instance: /geo1/copy1/copy1
copy1_instance_9 (AbcGeom_Xform_v3)
copy1 (AbcGeom_PolyMesh_v1) instance: /geo1/copy1/copy1

Attachments:
abc_instances.hip (142.1 KB)

  • Quick Links