Is it possible to dump the original mesh from Sculpt SOP?

   947   5   1
User Avatar
Member
692 posts
Joined: Aug. 2019
Offline
It seems that Sculpt SOP remembers the original input mesh even after the upstream topology changes (therefore Erase brush works even after the topology changes). But I can't figure out how to dump the original input out. Is it possible?
User Avatar
Member
9384 posts
Joined: July 2007
Offline
you should see a pretty descriptive Warning describing your options

Attachments:
sculpt_warning.gif (12.5 KB)

Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
692 posts
Joined: Aug. 2019
Offline
tamte
you should see a pretty descriptive Warning describing your options
Image Not Found

Yeah, but that's not what I want.

I fully understand this warning message and the options it describes. Neither is what I'm trying to do here. I'm trying to dump out the original input mesh as a Stash SOP or a .bgeo file. "Reset Sculpt" doesn't do that - it just copies the upstream input, not the original input.

I also know how to do it in a manual, interactive manner, by entering the viewer state of Sculpt SOP and dragging my cursor over all the mesh with Erase brush. I'm asking how to do it in a reliable, procedural manner, perhaps with some Python involved.

Basically, I want to apply Erase brush to what's stored inside the Sculpt SOP, but not copying the upstream mesh, whose topology might have changed.
Edited by raincole - June 5, 2025 20:41:36
User Avatar
Member
9384 posts
Joined: July 2007
Offline
ah, you want to extract the original shape, I thought you want to dump the stash so that it updates from input

the Sculpt doesn't store the original mesh in original state, it stores clustered mesh with some attribtues that allow you to restore the original shape, however not all attributes mostly just P

the Sculpt itself doesn't seem to preserve the point order even when you use the Erase method if the input topo changed, so it wouldn't just blendhape with other sculpts, but that's probably just a bug

but regardless here is a node that assembles back the un-clustered mesh and restores the original position and point order so you should get back the original shape, most of the insides are stolen from Sculpt itself with small mods
it has to be connected directly after Sculpt SOP
Edited by tamte - June 6, 2025 00:31:49

Attachments:
ts_sculpt_restore_original.hipnc (798.8 KB)

Tomas Slancik
CG Supervisor
Framestore, NY
User Avatar
Member
692 posts
Joined: Aug. 2019
Offline
tamte
ah, you want to extract the original shape, I thought you want to dump the stash so that it updates from input

the Sculpt doesn't store the original mesh in original state, it stores clustered mesh with some attribtues that allow you to restore the original shape, however not all attributes mostly just P

the Sculpt itself doesn't seem to preserve the point order even when you use the Erase method if the input topo changed, so it wouldn't just blendhape with other sculpts, but that's probably just a bug

but regardless here is a node that assembles back the un-clustered mesh and restores the original position and point order so you should get back the original shape, most of the insides are stolen from Sculpt itself with small mods
it has to be connected directly after Sculpt SOP

Wow, many thanks. I tried to look inside Sculpt SOP but got overwhelmed quickly...

As a side note, what's a "clustered mesh"? There is an (undocumented?) Cluster Mesh SOP inside Sculpt and I'm utterly confused by what it does. Is it related to Cluster SOP?
Edited by raincole - June 6, 2025 04:16:04
User Avatar
Member
9384 posts
Joined: July 2007
Offline
raincole
As a side note, what's a "clustered mesh"? There is an (undocumented?) Cluster Mesh SOP inside Sculpt and I'm utterly confused by what it does. Is it related to Cluster SOP?
this would be just guessing, but to me it looks like something developed directly for purposes of the Sculpt SOP's needs
it seems to be clustering the mesh into chunks and storing as packed prims with some attribs

likely for the performance reasons so that when you paint it doesnt need to modify the whole mesh, just affected clusters

you can potentially use it for tools with similar needs, but as you see managing clusters can get involved and maybe it still needs some supporting tools to make it easier and hence I'm not surprised the node is hidden
Tomas Slancik
CG Supervisor
Framestore, NY
  • Quick Links