Geometry reuse and animation in USD schema

Hello!

We’re trying to port our 3D text feature to USD and have trouble figuring out the right approach. The key things to note are:

  1. We’re generating letters in a pretty sophisticated way so being able to reuse letters that occur multiple times in the input string is a must.
  2. It should be possible to apply one or more “text behaviors” onto the text prim (most likely Value Clips, since we use them elsewhere in a very similar scenario) that will animate the letters’ position, rotation, scale and tracking, either per-letter, per-word or per-line.

We already tried:

  1. Implementing a single 3D text schema that generates and handles the entire thing. The problem with this approach is that animating letters means rebuilding the entire 3D text (and trashing USD cache in the process), which is very slow. We’d rather want to generate letters once and just animate them afterwards.
  2. Implementing this as two separate schemas: one for generating single letters and one for the parent prim that would encapsulate, place (and reuse) letters - it seemed like a better approach, but the problem is that we need to modify letters based on the parent’s setting, for example spread/compress the letters’ positions when text Tracking is modified. It seems that I can’t modify a prim’s children in any way from the Adapter class. And it still doesn’t solve geometry reuse problem.

How would you approach this issue?

If you do the geometry generation inside the Hydra adapter, rather than as part of the USD scene itself, then the single prim adapter can manage the caching and reuse however it wants. The two main downsides I’d see are:

  1. The geometry is only available to renderers, not for scene-based computing
  2. You’d need to come up with your own, bespoke, per-letter animation controls on that single-prim schema

But I think that should work in both old/current and new Hydra architectures.

1 Like