Jump to content
toadstorm

Houdini Alembic export to Maya, with instancing

Recommended Posts

I'm trying to export an ABC from Houdini with instancing enabled. I have a bunch of regular packed primitives with a Cd attribute on the points, and they're being written out to disk just fine. Instancing on the Alembic ROP makes these files very manageable.

However, when loading these in to Maya via the VRayMesh proxy loader, the Cd attribute isn't detected as a color set. Additionally, in Houdini, if I try to read this Alembic back in, the Cd attribute is gone, even after unpacking.

I'm using 16.5.439. Anyone have any ideas?

Share this post


Link to post
Share on other sites

if I colour points...didn't work...changed to vertex....worked..(no, didn't test with vray..just a straight abc import)

worked in Maya and also reading back in Houdini, I'm using Apprentice so cannot do an abc sequence....only 1 frame.

(for reading back into Houdini, colour point was enough to work....but not with Maya, Maya needs it on vertex)

InstanceColouredBoxes.jpg

Edited by Noobini

Share this post


Link to post
Share on other sites

Thanks for taking a look, but what I meant was getting per-instance attributes to export. In order for instancing to work for the Alembic export, I need to export packed geometry, but if I want those instances to have arbitrary attributes of their own (like @Cd), Houdini doesn't seem to be able to export them. I'm suspecting after looking at more of the Alembic specification that this sort of thing just isn't supported, though I wonder if someone's found a workaround?

Share this post


Link to post
Share on other sites

yes I 'pack and instance' on my copy...whether that satisfies your condition...I'm not sure

(also since using Apprentice, I can only rclick>save geo...1 frame...so it could be entirely different to an abc ROP ?)

Edited by Noobini

Share this post


Link to post
Share on other sites

Unfortunately not, since the attributes we're talking about would be baked into each instance before packing, which means each instance of a particular color would be unique. I was hoping for a similar workflow to adding a @Cd attribute to packed primitives post-packing and using that to vary copies. The end product is supposed to have hundreds of thousands of instances with many different colors applied, so assigning colors to copies pre-copy operation is not going to be efficient enough.

Share this post


Link to post
Share on other sites

I was playing around with trying to recreate the situation you have described. But I find that Houdini can't write an Alembic file that references instances. When I export the .abc file it is only 2K and unreadble...

Is there some other setup required to export and instance of a packed primitive animation?

ap_toads_instance_packed_problem.hiplc

Share this post


Link to post
Share on other sites

correct me if i'm wrong but i think alembic doesn't support anything else than polygonal geometry with standard attributes (like N, uv...). no instancing, no packed geo, no custom attributes, no anything. And I guess it doesn't really matter as other software packages wouldn't know how to read it anyways.

Share this post


Link to post
Share on other sites
24 minutes ago, davpe said:

correct me if i'm wrong but i think alembic doesn't support anything else than polygonal geometry with standard attributes (like N, uv...). no instancing, no packed geo, no custom attributes, no anything. And I guess it doesn't really matter as other software packages wouldn't know how to read it anyways.

Yeah, I guess I was misreading the flag "use instancing where possible." It's just data de-duplication in Alembic. So it looks like there's no easy solution to this problem.

Share this post


Link to post
Share on other sites

Maybe you can export a particle system into Maya, with the right attributes, and then use the instance tools in Maya to instance your geo (exported as obj, abc and whatnot) ?

Share this post


Link to post
Share on other sites

If you change the deployment from Instance to CopyToPoints the Alembic export node will write them out as individual meshes with the Cd attribute embedded. I don't have Maya but I can see that Blender can detect my @Cd colors when importing an Alembic cache. You do end up with a larger file this way, however.

 

Share this post


Link to post
Share on other sites

@Atom, The confusingly-named "use instancing" option on the Alembic ROP can leverage packed primitives to keep the file size down. If I weren't using packed prims, getting color sets and other vertex data would be no big deal, but I'm dealing with a situation that involves hundreds of thousands, possibly millions of copies, so the resulting Alembic would end up way too heavy. 

@StepbyStepVFX I'd definitely do this if Maya's Alembic build supported particles, but as is typical with Maya they're years behind in their implementation. Unless they've updated something very recently, it's impossible to get particles into Maya via Alembic.

Share this post


Link to post
Share on other sites
16 hours ago, toadstorm said:

@StepbyStepVFX I'd definitely do this if Maya's Alembic build supported particles, but as is typical with Maya they're years behind in their implementation. Unless they've updated something very recently, it's impossible to get particles into Maya via Alembic.

Forget about importing the particles as Alembic : seems you can use the Houdini Engine, importing an HDA that contains a file SOP pointing toward a bgeo file that contains the particles.

From there, you can instance objects on your particles directly into Maya (it seems that importing that HDA through Houdini Engine creates a classic Nucleus particle system, from what I see on the video below) :

 

 

 

Edited by StepbyStepVFX

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×