Exporting alembic with instances is bigger file size?!
3556 7 1- midorisalt
- Member
- 10 posts
- Joined: May 2022
- Offline
Hello!
I'm trying to export an alembic file of an animation. I'm copying a cube onto about 200k points, so obviously instancing should help a lot here. But I'm really confused because when I don't used instancing, the file renders very fast. But if instancing is used then it takes a really long time per frame (probably minutes), and the file size is bigger?!
I have attached a test scene with showing the problem. There are two alembic outputs inside the geo node, and the only difference is that the copy to points node has "Pack and Instance" enabled in the right side tree.
I'm trying to export an alembic file of an animation. I'm copying a cube onto about 200k points, so obviously instancing should help a lot here. But I'm really confused because when I don't used instancing, the file renders very fast. But if instancing is used then it takes a really long time per frame (probably minutes), and the file size is bigger?!
I have attached a test scene with showing the problem. There are two alembic outputs inside the geo node, and the only difference is that the copy to points node has "Pack and Instance" enabled in the right side tree.
- tachbek
- Member
- 46 posts
- Joined: Feb. 2017
- Offline
- antc
- Member
- 335 posts
- Joined: Nov. 2013
- Offline
I can't look at your file right now, but if you mean a cube with only eight vertices it may well be that the overhead of an instance is greater than the small amount needed for the cube. Likewise processing an instance will almost certainly incur more overhead than processing an additional six faces in a mesh. A simple test would be to subdivide the cube more and more and see what point instancing starts to yield a benefit. If it never does then yeah something is probably broken.
- tachbek
- Member
- 46 posts
- Joined: Feb. 2017
- Offline
Update. I use Lop scene tree for visualization.
- Alembic ROP - Geometry - Packed transform - Deform Geometry
The packed primitive’s transform will be baked in to the resulting shape node’s geometry.
= Simply, separate mesh for each copy - Alembic ROP - Geometry - Packed transform - Transform Geometry
A transform node will be created above the packed geometry.
= Creating instances + save each transform in own created parent "null object" - Alembic ROP - Geometry - Packed transform - Merge with parent transform
The packed primitive’s transform will be baked in to the parent transform node.
= Creating instances + save each transform in own parent (instead of creating as in "Transform Geometry"), but if you don't build you own hierarchy it's leads to problems, and in this setup you loose objects transform. - Don't pack - all geometry is a single object
Edited by tachbek - May 31, 2022 15:28:26
- midorisalt
- Member
- 10 posts
- Joined: May 2022
- Offline
tachbek
Use Transform Geometry and try more complex mesh for testings. Boxes more efficient don't pack at all (if you use not many attributes) because each copy need to create reference and transform (and more). And this is bigger then only save single mesh with many boxes. Or roughly, the instance data requirements are bigger than box (as part of single mesh) without attributes
Okay. Thank you a lot for the testing!!
I think I will have to go for just frame-by-frame geo. Seems to be the only to work properly also in unreal engine which I'm trying to export to.
- tachbek
- Member
- 46 posts
- Joined: Feb. 2017
- Offline
midorisalt
I think I will have to go for just frame-by-frame geo. Seems to be the only to work properly also in unreal engine which I'm trying to export to.
Good idea to use unreal instances, and bake only point cloud.
Google "Houdini unreal instancing" good starting point.
Also maybe check "Houdini Labs VAT"
- midorisalt
- Member
- 10 posts
- Joined: May 2022
- Offline
- derrick
- Staff
- 329 posts
- Joined: July 2005
- Offline
midorisalt
I have attached a test scene with showing the problem. There are two alembic outputs inside the geo node, and the only difference is that the copy to points node has "Pack and Instance" enabled in the right side tree.
Instancing is not being used in your example as the Alembic ROP is set to export deforming geometry. You can easily check if instancing is used with Packed Alembic primitives by inspecting the "abcsourcepath" intrinsic.
The structure of Alembic archives is significant. It is good practice to explicitly specify where you want everything to be placed in an Alembic archive. Attached is an updated example that uses instancing and structures the scene so each box has a separate Alembic transform node associated with it.
Alembic archives have a lot of overhead when using instancing. For such small objects like a box, the overhead will significantly outweigh any possible benefit.
-
- Quick Links