Here are few advices on how to improved your Houdini Geometry workflow by reducing the size of your caches and faster computation time.
Please note this list is not exaustive and all the examples might not work in all situations. If you are working with volumes, please read this other page: Optimizing Volumes
Time dependency
Always try to get the maximum of your nodes not being time dependant.
Geometry | Animated | Transform iteration | Computation time |
---|---|---|---|
1,000,000 points | Yes | 1000 | ~0.3s |
1,000,000 points | No | 1000 | ~0.001s |
How those values were collected
Created 1,000,000 points and applied a color node to them and played them for 1000 frames.
A transform node was responsible to animate the points.
Blast unused attributes
Do not save what you don't need - remove unused attributes. This is the best way to reduce your cache size. If your setup allow it, try to remove attributes that won't change along your setup and transfer them back on your geometry at the end. That's the case for most rendering attributes.
Geometry | Attributes | File Size |
---|---|---|
1,000,000 points | P, Cd, N, v | ~45mb |
1,000,000 points | P | ~11mb |
How those values were collected
Created 1,000,000 points, and created random values for all the attributes.
Attribute Variation
This is just here for information. The more different values you have for an attribute, the more space it take on the disk.
Geometry | Attributes | File Size |
---|---|---|
1,000,000 points | 1,000,000 values | ~3mb |
1,000,000 points | 1 value | ~16kb |
How those values were collected
Created 1,000,000 points at origin. In one case they all had a unique id value whereas in the other case they all had the same id value.
Choose the right components
When working with VOP/VEX, think over which component will you be able to do the less computation iteration. Do you need to calculate the value for each indivisual point/primitive or can it be calculated only once ?
Geometry | Component level | Computation time |
---|---|---|
1,000,000 points | Points | ~0.008s |
1,000,000 points | Details | ~0.003s |
How those values were collected
1,000,000 points going into a wrangle with the expression:
`i@n_unique = nuniqueval(0, "point", "id");`
Ran the wrangle over "Points" / "Details"
Pack Geometry
For simple transform operations, try to work with pack geometries, as it reduce the number of components you are working with.
Geometry | Packing | Transform iteration | Computation time |
---|---|---|---|
1,000,000 points | No | 1000 | ~2.3s |
1,000,000 points | Yes | 1000 | ~0.1s |
How those values were collected
Scattered 1,000,000 points and connected them to two transform nodes to apply a rotation. One had input points packed, the other one not. Did performance monitoring over 1000 frames.
Improve Read/Write
Here are two examples putting in application everything you read above.
Packed Rigid Body:
When doing RBD with pack primitives, save your simulation as "points that represents the objects" and a static frame of your fracture object as packed.
Geometry | DOP Import | File Cache | Duration | Disk usage | Read time |
---|---|---|---|---|---|
Fracture Box - 1000pieces | Fetch Geometry from DOP Network | Animated geometry | 100 frames | ~113mb | ~2s |
Fracture Box - 1000pieces | Create Points to represent Objects | Static Geometry + Pack transform points | 100 frames | ~7mb | ~0.5s |
How those values were collected
Please see attached file - rbd_cache.hip
Deformed Geometry:
When working with Bgeos (because alembic work differently), a good way to optimize your caches size and reading time is to write static information and animated one in different caches. An example of usage is when writting out deformed geometry such as cloth simulation or deformed colliders.
Geometry | File Cache | Attributes | Duration | Disk usage | Read time |
---|---|---|---|---|---|
Mocap Biped + 1 level subdivision | Single - All in one | P, N, Cd, v, shop_materialpath, uv & groups | 1000 frames | ~2.6gb | ~12.6s |
Mocap Biped + 1 level subdivision | Static Geometry + Animated Points | P, N, Cd, v, shop_materialpath, uv & groups | 1000 frames | ~347mb | ~2.1s |
How those values were collected
Please see attached file - advance_cache.hip