This modifier has been developed by @bettiabba at MAD Entertainment for the animation studio feature films development and it's based on Surface Deform Modifier for meshes code.
The project aims to bring a better integration between GP strokes and 3D animated characters.
The Surface Deform modifier allows an arbitrary mesh surface to control the deformation the Grease Pencil, essentially transferring its motion/deformation.
There are two main uses for this:
The modifier will work better with lines rather than fills. This is not a modifier limitation, it's rather an issue with the current grease pencil filling algorithm. In order to make the fills work correctly they should have an internal tassellation. Whenever the GP fills will get a tasselation algorithm, the modifier will be able to deform fills correctly.
Target
The object to which to bind.
Target Mesh Validity
While there are no restrictions with regard to the modified mesh, the target object’s mesh has a few constraints, which if not followed, will prevent a successful binding:
Interpolation Falloff
How much a vertex bound to one face of the target will be affected by the surrounding faces. This essentially controls how smooth the deformations are. This setting only applies when binding; it can be set differently for different frames but not changed retroactively.
While lower values result in smoother deformations, they may also introduce slight artifacts.
Strenght
The overall amount of influence the modifier has on deforming the GP.
Vertex Group
Allows you to define the influence per vertex (point).
until a bound frame is visible, this modifier will have no effect at all. When a bound frame is visible, any change in the target mesh will deform the Grease Pencil.
Bind All
Each frame of the modified Grease Pencil gets bound to the state the target mesh is in that timeline frame, all layers at once.
Bind Current Frame
The current frame of the modified Grease Pencil gets bound to the state the target mesh is in the current timeline frame,all layers at once. The current frame is the Grease Pencil frame that is visible right now due to the current timeline position.
Unbind All
Executing this frees all the frames of the modified Grease Pencil from the target, and resets it to its original shape.
Unbind Current Frame
Executing this frees just the current frame of the modified Grease Pencil from the target, and resets it to its original shape. The current frame is the Grease Pencil frame that is visible right now due to the current timeline position.
The GP’s are bound with regard to global coordinates, but later transformations on the objects are ignored. This means that one can freely transform the target after binding, without affecting the modified object. The modified mesh will only pick up changes to the target object’s mesh itself.
The further a mesh deviates from the target mesh surface, the more likely it is to get undesirable artifacts. For this reason it is recommended to have a clean topology on the binding mesh; the topology should follow the pattern of the drawing as closely as possible.
When a frame is bound, on the timeline it will turn the same color of the scrubbing background to indicate it is bound and locked. The locked frame cannot be moved or removed on the timeline. To move the frame, please unbind or bake it first.
The purpose of the bake panel is to bake the deformation of the modifier on the grease pencil, creating new, unbound keyframes. All layers are baked at once.
the freshly baked frames are unbound. They can be bound if desired.
This note is also the text at the bottom of the panel, to avoid any confusion.
Bake Current Frame
Bakes the frame at the current timeline position.
Bake Range
Bakes all the frame in the range specified below.
Range start
The start of the frame range to be baked.
Range end
The end of the frame range to be baked.
Fill range
Click on the clock icon at the side of the range to use the Fill range operator. It fills the range start and end fields with the current timeline's start and end.
You can at this point rig, animate or make a cloth simulation with your target mesh as you would normally do and the GP drawing should deform accordingly.
Please note that viewport overlays should be off, otherwise the strokes will stick to anything found in the viewport including bone widgets, cameras, lights, etc.
Repeat points 5 and 6 to create and bind any new GP keyframe
If you want to interpolate bound GP strokes, you can bake the involved keyframe range. At this point all the strokes in the range are unbound and will act as a regular GP drawing, so you can use all the bundled GP tools to edit them. When edits are over, or the interpolation is made, the resulting keyframes can be bound back to the target mesh.
At this moment the only way to effectively interpolate a GP keyframe is to bake it first. This method has some limitations:
Both these issues could be solved by including an interpolation operator in the modifier itself so that users could create a new interpolated keyframe between two bound ones whilst taking the deformation in account.