Unreal, Subdivision Guided Deformation

27 views
Skip to first unread message

Benjamin Slack

unread,
Mar 24, 2025, 9:28:10 AMMar 24
to OpenSubdiv Forum
Greetings:

I work for an animation house that uses Unreal as its finals rendering package, and Maya for its animation package. Our current workflow uses control meshes rigged in Maya to generate subdivided meshes whose animations are then cached through a proprietary tech to Vertex Animation Textures (VATS). The meshes are then subdivided explicitly and exported to FBX for import into Unreal.

For the next version of this pipeline, we'd like to animate directly in Unreal, but we have it from the UE devs that subdivision surface support is not on the horizon (or likely ever to be.) Our character designs depend on it, so we've been looking for an alternate solution and I think I have one, which I'm calling Subdivision Guided Deformation.

The basic idea is that I'll prepare a stencil table in Maya, saving it out to some format (likely novel) that I can then import into UE. We'll then export the low res cage and the uniform subdivided high res meshes to FBX. Once in UE, we'll then build a custom deformer graph node that will take the animated low res cage, and apply the stencil table to generate the positions for the high res subdivided mesh, guiding the deformation of that mesh.

We're early in the planning stages on this (I've literally just finished compiling the OpenSubdiv library), and before I invest a lot of time, I wanted to run the idea by some experts and perhaps ask for some advice. Specifically:

1. How do I (or can I) apply the stencil table in HLSL on the UE side, assuming that the deformer graph can give me the animated positions of the control cage. The OSD examples in the documentation are scant. To be completely clear, we're not looking to draw with the OSD code. We only want to evaluate the stencil table to generate point positions.

2. I know from the docs the Topology Descriptor is a struct, so I could push that out to binary easy enough. Is there documentation on the structure for the stencil table?

3. Is there a whitepaper some could point me to to help me understand the application of stencils tables in depth, so that if I need to recreate an "evaluator" in HLSL, I wouldn't be working so much in the dark.

Greatly appreciate any time you can take to assist me.

Yours,

-B

David G Yu

unread,
Apr 7, 2025, 11:59:34 AMApr 7
to OpenSubdiv Forum
An OpenSubdiv stencil table is a sparse matrix representation of the linear weights needed to compute refined or limit surface values or derivatives as a function of values at the base face vertices of the subdivision surface mesh.

Using a sparse representation is beneficial since for typical meshes the corresponding full matrix representation of this computation would have many zero valued entries and a sparse representation can avoid unnecessary storage and computation.

There's an example HLSL compute shader in the OpenSubdiv code base which you can compare with the similar CPU computation. See: hlslComputeKernel.hlsl, and cpuKernel.cpp.

One thing to note is that the values computed by the stencil table might not by themselves be sufficient, e.g. you might also need to save the refined or tessellated mesh topology corresponding to the computed values. This could turn out to be a significant expansion of the data in your pipeline, and so you may want to continue to look into how you might keep the data relatively compact, i.e. animated base mesh data, and defer surface evaluation until you are loading mesh data at runtime.

Thanks!
-David
    


Reply all
Reply to author
Forward
0 new messages