Going from relative coordinates to absolute coordinates is a lot more complicated. Primarly due to how relative coordinates are defined. By construction, relative coordinates are defined upto a translation. Indeed, matrix L has rank n-1 with n being the number of vertices. Think about it this way: Imagine a curve defined by a set number of points. We know how each point is positioned relative to the other points but given this knowledge, it is impossible to deduce where exactly in space the entire curve is positioned. If we knew the global position of one point of the curve, we could reconstruct the curve from there. That is exactly the problem with laplacian coordinates. Solving the problem however seems pretty straightforward: we anchor at least one vertex and work our way from there. For multiple reasons however, that doesn't quite produce the original mesh. There are likely to be a few artifacts (some due to numerical errors). I urge you to take a look at the powerpoints two posts back for some image demonstrating the errors that could show. The results are acceptable if we choose to work this way but a more stable solution is desirable.
We can make the method more stable by anchoring more points. The remaining unanchored points are often referred to as the ROI (Region Of Interest). How would you define this from a mathematical viewpoint? We can do this by overdetermining matrix L in the equation LV = W with V being the sought global coordinates of the vertices and W being the differential coordinates. We extend L and W by adding the global coordinate of every anchored vertex to W and by adding for example (0 1 0 0 ... 0) to L as a bottom row if the second vertex was the one being anchored. Because L is overdetermined we can solve for V by using a least-squares solver.
Note that, just like when transforming from absolute coordinates to relative coordinates, we need to solve this equation three times: once for each axis/coordinate.
How will we use differential coordinates? We can use differential coordinates in a mesh editing sense: A set number of points are anchored (in our example, the feet in the IM are anchored). A certain point can then be displaced which is in turn also anchored. The rest of the mesh is then reconstructed using the approach described here.
A problem with the differential coordinates is that they act well under translation but not so good under rotation. Imagine the tentacle of an octopus. The bottom of the tentacly would be anchored and we could move the the tip of the tentacle. The rest of the appendage would be reconstructed using differential coordinates. When we want to rotate the tentacle however, artifacts would start to pop up. I again refer to the powerpoint two posts back for images that will clarify this situation. There has been extensive research into solving this problem. However, as far as the interaction mesh is concerned, translation is pretty much the only operation we need.
Geen opmerkingen:
Een reactie posten