Page MenuHome

Sculpt Snapshots
Needs ReviewPublic

Authored by Pablo Dobarro (pablodp606) on Jan 15 2020, 10:49 PM.
"Love" token, awarded by Shimoon."Love" token, awarded by asmitty."100" token, awarded by TheAngerSpecialist."Like" token, awarded by Constantina32."Love" token, awarded by Debuk."Like" token, awarded by slumber."Love" token, awarded by myclay."Love" token, awarded by MetinSeven."Like" token, awarded by xrg."Love" token, awarded by Brandon777."Like" token, awarded by Ravenman13."The World Burns" token, awarded by jfmatheu."Love" token, awarded by RodDavis."100" token, awarded by Frozen_Death_Knight.



[Design exploration, do not review the code]

This feature lets the user store multiple versions of the mesh and go back to them using a brush or a mesh filter. Snapshots are not linked to the mesh topology, so it works after remeshing.

It also allows to use another mesh as a snapshot, so you can sculpt one object into another

I included the Snapshot Write brush in the patch to be able to test it. You just need to use the "Create Mesh Datablock Snapshot" operator in the brush popover and then use the brush to get the volume back from the mesh copy. It can also be easily implemented as a mesh filter.

We need to decide the scope of the feature as the use case is similar to how some users use the sculpting layers. A lot of features based on this can be implemented (better snapshot management, a brush that reads mesh data and puts it into the snapshot to merge shapes, get the snapshot back from undo, mix different snapshots in the mesh filter...).

In my opinion, I would prefer using multires layers as the main "storage" system of sculpt mode and leave this for quick shape exploration.

We also need to decide how this will work with multires (or if it we want to implement it in multires if we are going to have layers). With the remeshers works fine, but with static topology it can create a lot of artifacts that can't be fixed.

Diff Detail

rB Blender
sculpt-snapshot-prototype (branched from master)
Build Status
Buildable 6267
Build 6267: arc lint + arc unit

Event Timeline

Overall I think layers would also address this use-cases, but in a more broad and generic way. If we can get layers and Multires working well, I'm not sure there is that much value in this?

@William Reynish (billreynish) This works after remeshing and using datablocks of different objects. Layers don't, so this is much better for concept art/sketching.

  • Fix some snapshot projection artifacts

I have a question. Will this feature be able to use snapshots from different objects while sculpting on a new mesh? I.e. you want a mouth shape from an old sculpt of yours and an ear from another one, so you import them into your project, save a snapshot from each, and then you can paint in those two pieces onto a brand new object. I could see that being pretty useful. : )

Really cool, btw.

Nice work again, Pablo! It would be great if snapshot thumbnails would be generated, which you can choose from a pop-up menu.

@Pablo Dobarro (pablodp606) I'm testing it right now and the first thing I am noticing is the constant need to remesh, This is because the snapping to the snapshot target is not very accurate. I'm assuming that the method used is similar to "Target Normal Project" or "Nearest Surface Point" in the Shrinkwrap modifier.

Is it possible to try "Project" instead since it generally does a way better job with distributing the mesh to fit the forms of the target object. There might be issues with points snapping to the wrong side of the object from time to time so no method is perfect but it's worth trying out IMO.

In my opinion, I would prefer using multires layers as the main "storage" system of sculpt mode and leave this for quick shape exploration.

I agree with this. But one idea that I find very interesting that could also be used in multires is that you could bring back model variations from the undo stack and paint in those previous versions.
Fleshing snapshots out with more functionality, like the ones you mentioned, would be essential in making it a useful addition in the sculpting workflow.

Another thing I noticed right now is that the strength setting has no influence over the behaviour. Anything within the stroke immediately gets snapped to the snapshot target.
What do you think about that @Pablo Dobarro (pablodp606) ?

Debuk (Debuk) added a subscriber: Debuk (Debuk).EditedJan 16 2020, 12:30 PM

Yes very nice indeed. Quite some usecases may be somehow comparable to layers though.

But the possibility to work with other meshes is very intriguing.

If other objects could get tagged as "clone-source" and change to ghost shading it would be very useful. Best here would be if multiple ones could get tagged simultaneously.

Also I could see a version where the other object is translated to be under the brush and/or oriented towards the surface normal and then snapshotted ( once at the beginning of a stroke). That could transform it into a sort of kitbash brush that just deforms where you are drawing with the brush.

  • Fix strength
  • Enable store snapshot operator

@Julien Kaspar (JulienKaspar) I fixed the strength and I enable the "store snapshot" operator, which works more like a shape key instead of a shrinkwrap, so it can be used to get data back from undo. That way it should be possible to use in Multires.
The problem is how to make a clear UI for this. It should be easy to tell if the brush is getting the data form a mesh datablock or from the internal stored snapshot. Maybe we can make two different brush tools or add a dropdown to select the mode.
I also created this patch if you want to try project P1220. That is how I initially made it (it is what is shown in the videos), but with large mesh deformations it creates a lot of artifacts. I think that nearest surface works better for this case.

@Pablo Dobarro (pablodp606) Looks and works really well! What if both Snapshot methods are working outside of the Undo Stack, which makes it so powerful. If users know that their snapshot will be saved while going back & forth in the undo stack it becomes a massively useful feature.

In terms of UI and usability I think it's important to add the snapshots to the Tool Settings (maybe in the options since it's so crowded in the header) since taking a snapshot should be possible no matter what Tools you are using at that moment.
I think you mentioned that the "Write Snapshot" brush could also be part of the mesh filter, which makes sense. The name "Write Snapshot" is misleading though since it more accurately "reads" or "copies" the snapshot.
For the naming here are some suggestions (One that is based on the current topology vs one that is just based on the mesh data as a snapping target):

  • Relative Snapshot vs Absolute Snapshots
  • Vertex Position Snapshot vs Mesh Data Snapshot
  • Topology Snapshot vs Shape Snapshot

The naming is tricky ...
I'll try the project snapping method later since I don't know how to apply P1220 right now.

@Julien Kaspar (JulienKaspar) A limitation of this implementation is that vertex position snapshots (the ones that do not create the datablock) are temporal. If you exit sculpt mode, that information is lost. They can be used to go back in the undo history, create the snapshot, redo and write the positions from the undo history in to the mesh, but not for storing the mesh state in the blend file.
I can add support for storing and managing multiple vertex position snapshots as a datalayer (similar to shape keys or vertex colors), but then it will start conflicting too much with the complexity of the layers functionality. Vertex position snapshots are the ones that work exactly like layers, so I think it is better to have more advanced layer features instead of adding this to snapshots.

Vertex position snapshots are the ones that work exactly like layers, so I think it is better to have more advanced layer features instead of adding this to snapshots.

@Pablo Dobarro (pablodp606) Fair enough. I think it's the best case if the snapshots are fast, temporary, on-at-a-time way of storing data.
So why not see it as something that goes hand-in-hand with other types of data instead of something that conflicts with them. Here's what I think snapshots could be:

  • Taking a snapshot stores data while keeping it unaffected from going forward & backward in the undo-stack.
  • Various data can be written or loaded as a snapshot: Mesh Data, a Layer, Vertex Colors & a Mask.
  • Using the "Write Snapshot" Tool will change the current data with the snapshot.
  • Going out of Sculpt Mode will remove the stored data as a snapshot, which will make it affected by the undo stack again or remove it entirely if not stored.