How do I prevent a mesh from masking an image?

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Fahim, Distinct Sun, Víctor Paredes, erey, Belgarath, slowtiger

Post Reply
User avatar
Reindeer
Posts: 185
Joined: Sat Oct 17, 2015 8:13 am

How do I prevent a mesh from masking an image?

Post by Reindeer » Sun Sep 18, 2016 8:07 pm

I am trying to animate the face in a portrait (a jpeg image) with a mesh.
I built the mesh around the face and features of the portrait's face, triangulated the mesh and then went to Frame 1 to start animating. But I find the face of the portrait is floating, alone, because the rest of the portrait is masked out by the mesh. Can I have Moho not do this?
kavlor
Posts: 42
Joined: Wed Jun 10, 2009 11:58 pm

Re: How do I prevent a mesh from masking an image?

Post by kavlor » Sat Sep 24, 2016 2:41 pm

For it to draw the meshed image it has to both be covered by a triangle (manually drawn triangles will also work) and the triangle filled.Use the bucket icon when you have your vector selected and fill in any triangles that are showing holes.I don't know if there is a way to fill multiple triangles at once.
dueyftw
Posts: 1941
Joined: Thu Sep 14, 2006 10:32 am
Location: kingston NY
Contact:

Re: How do I prevent a mesh from masking an image?

Post by dueyftw » Sat Sep 24, 2016 5:20 pm

Duplicate your image. Place the duplicate behind the mesh image layer. You might have to shrink it a tiny bit or make the mashed image a tiny bit larger.

The ideal way is to cut out the meshed image from the background. Fill or 'redraw' (can be a pain in the @#$@) the background so you have the meshed image and the background separate form each other.

Dale
User avatar
Greenlaw
Posts: 4496
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: How do I prevent a mesh from masking an image?

Post by Greenlaw » Sat Sep 24, 2016 6:22 pm

As mentioned above, the simplest thing is to just duplicate the image and place it behind the masked/deformed version. Ideally, you'll want to paint out part of the bg version, which is super easy using Photoshop's Content Aware Fill. Just lasso the subject, select Fill and choose Content Aware. This looks at the pixels surrounding the outside of the selection and interpolates the pixels and patterns it finds. It usually works surprisingly well...at the very least, it leaves you less work to fix manually.

If you really don't want the image masked and you don't mind the BG also deforming a little (which can be appropriate in some situations), just make the BG a part of your mesh. If you're drawing a square frame around the entire image, make sure you divide it an appropriate number of times using the Split button, and draw paths within the box to define the regions you want to animate and hold. Don't closed shapes unless you want holes punched into your mesh.

Another quick trick is to use the Grid shape for a mesh. Just drag it over the entire image and dial in your subdivisions. This will give you a mesh similar to what you might get using a standard mesh warp found in many compositing programs.

There's a lot of different ways to these tools so experiment and have fun.

Bonus tips:

Always create a duplicate of your shapes and paths before running Triangulate. This way, you you need to modify the mesh, you still have the original shape to work from.

If the mesh you created isn't detailed enough to make the deformation you want, apply Split on it and run Triangulate again. This will create a new mesh based on the same shapes but with twice the mesh density.
Last edited by Greenlaw on Sat Sep 24, 2016 11:00 pm, edited 1 time in total.
D.R. Greenlaw
Artist/Partner - Little Green Dog | Little Green Dog Channel on Vimeo | Greenlaw's Demo Reel 2019 Edtion
Lead Digital Animator, Dreamworks Animation

Image
User avatar
Reindeer
Posts: 185
Joined: Sat Oct 17, 2015 8:13 am

Re: How do I prevent a mesh from masking an image?

Post by Reindeer » Sat Sep 24, 2016 10:47 pm

Thank you, these are all really valuable suggestions!
Post Reply