does anyone know how to warp a mesh to another

does anyone know how to warp a mesh to another

Skyslicer
Enthusiast Enthusiast
665 Views
4 Replies
Message 1 of 5

does anyone know how to warp a mesh to another

Skyslicer
Enthusiast
Enthusiast

I am working on a project and I am making a 2D character using planes. I want the character to look like a shadow projected on the set. right now I am experimenting with shrink wrapping a skinned mesh onto a set but I am running into some weird problems depending on the rig placement. does anyone know of a simpler or better way to do this

0 Likes
Replies (4)
Message 2 of 5

Kahylan
Advisor
Advisor

Hi!

 

Having the mesh wrapped to something else while rigged at the same time is always going to cause problems. The skincluster and the wrap deformer are too complex to be compadible, there are always going to be exceptions where one or the other doesn't calculate right depending on the deformation...

 

I would probably approach something like this in two steps. First create the animation with the rig, then cache the animation onto the mesh and wrap it afterwards. Or even first rendering the character as a separate render with alpha and then use projection mapping to project the render onto the scene, this would also give you the kind of stetching and squashing you'd expect from a shadow.

 

I hope it helps!

0 Likes
Message 3 of 5

Skyslicer
Enthusiast
Enthusiast

ya I juat wanted something I could change on the fly

0 Likes
Message 4 of 5

Kahylan
Advisor
Advisor

I'm not sure that exists. What you want to do is quite complex. Most examples for animating shadows in 3D that I've seen at conventions an in papers were either handanimated or pre-rendered, and then projected...

 

You could try going the live blendshape route:

1) Duplicate your mesh

2) create a blendshape from the rigged mesh to the duplicate

3) set the targetweight to 1

4) then wrap the duplicate to your set.

 

Maybe the degree of separation provided by the blenshape will stop your wrap deformer from having problems since it only needs to calculate the vert deltas into the wrap deformer instead of the skincluster and whatever else deformers are in the rig. But its a long shot.

0 Likes
Message 5 of 5

mcw0
Advisor
Advisor

If it's simple 2D planes, then might it be assumed that the number of vertices remains constant?  For example, there would be 2 vertices, an inner and an outer, to describe a joint such as an elbow or knee.  In any case, if the number of vertices remain constant and they are all edge vertices that describe the silhouette, then it's just a simple trig solution. 

 

Use Bifrost.

Input your animated mesh.

Input a light vector.

Loop through all the vertices of the animated mesh and output a Bifrost mesh that can be converted to a normal mesh.

0 Likes