Company special effects group The last half of the people have been doing a repetition of such a duplication of work, I heard that the company before everyone has been doing so, this completely can not be the artist from the repeated work of the state of liberation is indeed a bit of grief. Recently I am also doing this work, I would like to take this opportunity to summarize their experience in this area, but also focus on a can be applied to the general majority of the role of the problem of solving methods. Hope to be able to do the effect.
First, let's talk about two common situations in character animation.
The first more common is the insertion of characters and other objects, such as hand-holding cups and foot-underfoot. The solution to this situation is more flexible, because it is two objects, so it is often possible to use the volume method to find the location of the interspersed with gradient or Ray method to solve the problem interspersed. In addition to this situation often we can clearly define the interspersed surface and the interspersed surface, two although the theory is mutual influence, but the processing we can completely ignore the interspersed surface (by the role of the area encountered) deformation problem, because most of the situation is not deformation at all, so the deformation of the variable is very good control.
There is another situation in the role of the insertion is due to the front-end rigging process did not achieve hundred characters in the role of anti-interspersed or similar to their own hands blows their own meat this situation, first we are on a solid surface to find a different surface between the interspersed, If the introduction of volume means that we have to rely on artificial judgment, manually in between interspersed between the role of cutting off, in the separate processing. This method is undoubtedly inseparable from duplication of labor, and if there are several places interspersed, probably get the lens of the people will only want to how cheat.
It is estimated that if you really have an experience in Houdini, you will basically understand how to use volume and ray to deal with it. I just want to talk about it. In the second case, how to solve the problem of interspersed.
Liberate the artist's hands and let them do more creative things. --Machine Cat
Let's take a look at the effect:
Before deformation
After deformation
First talk about the idea, and one more chat:
1, use the Intersect method to find the intersection position
2, the direction of the location of the uniform
3, use the new normal in the area to be found again intersect to get a more accurate squeeze offset displacement
4, find the cross-area dew on the outside edge
5, extrude a little budge after the soft edge according to normal and edge weight
6, uniform to the interspersed and edge parts to do smooth smooth
In the whole process because of the size of the geometry of the test is very different, found that the direct use of the original mesh points on the above sampling and calculation, the results are very unstable, and the final animation interspersed site will have a serious jitter problem. Because with the motion of the animation, interspersed parts of the point into and out of the interspersed area will have a more obvious impact on the subsequent deformation, it is clear that the sampling point is not dense. So in this improved version of the discussion, scatter is used to sample the objects by the scatter point. The higher the scatter point density, the smaller the problem of the patch jitter. This method requires that the point of scatter in the animation process relative position is fixed on the mesh, the use of UV method is not difficult to achieve.
1, use the Intersect method to find the intersection position
A intersect calculation is performed on a mesh of triangular surfaces using the scattered point cloud. It is not difficult to judge the interspersed and not interspersed, if we go along the normal to solve the problem, if you encounter the number of mesh is odd number of times that the point is in the interior of the geometry, if it is an even number of times the point is not interspersed. Reason oneself think.
It is worth mentioning that if the use of intersect this function, the collision of the normal direction of the prim and the incidence of the normal direction is close to 90 degrees, it is very easy for the next iteration of the calculation of immortality interference and error. This condition is similar to the incident normals tangent over the surface surfaces. Here I am using the vector point multiplication method to avoid this more sensitive situation. In addition, for the interspersed area and the edge area, I used the whole process of red to represent, so that the degree of visualization is also a bit higher.
This may be the most important step in this method, is to use it to find their own interspersed parts.
1Vector startpos = @P + normalize (@N) *0.00001;2 3Vector Raydir = normalize (@N) * -;4 5 vector collidpos;6 floatMyu, MYV;7 intFlag =1;8 intCount =0;9 Ten while(flag) { One intPrimnum =0; A -Primnum = intersect (1, Startpos, Raydir, Collidpos, Myu, MYV); - the if(Primnum! =-1){ - //[email protected] = Primnum; -Vector Primnor = Prim (1,"N", primnum); - //[email protected] = Primnor; + - if(Dot (normalize (Primnor), normalize (@N)) >0.05){ +startpos = Collidpos +0.00001*normalize (@N); Acount++; at}Else{ - Break; - } -}Else{ - Break; - } in } - to if(Count%2!=0){ + -@Cd =Set(1,0,0); the}Else{ *@Cd =Set(0,0,0); $}
2, the direction of the location of the uniform
This step requires a little bit of skill, and unifying or blurring any of the attributes is required to be averaged with adjacent points. The problem is that the points of different laws have been mixed together, so the use of the point cloud interspersed to unify the law, the effect will be counterproductive. Here we need to introduce T POS model, do animation will definitely have T POS this state model for you to call.
The solution to the problem of unification is to prepare for the subsequent migration along the new law. Because the parts that are interspersed are often curved surfaces, if you use the original method when extruding the interspersed part, it is possible that the point becomes chaotic when the extrusion occurs.
Although the above may be a bit extreme, this is why we do not recommend using the original method for extrusion.
In fact, the unification is not in the absolute sense, but makes the normals more relevant to the normals of the neighboring points.
3, use the new normal in the area to be found again intersect to get a more accurate squeeze offset displacement
With the first step in preparation, there is no threshold for this step, repeat intersect, only this time in the area previously detected in reverse calculation.
4: Find the cross-area dew on the outside edge
The method we use here is to expand the selection using the Pcfilter method based on the area range originally detected, of course filter will change the value already selected and the edge is also the gradient blur, we directly use more than 0 of the judgment to re-change the value to 1. By subtracting the previous selection from the enlarged selection, you get a circle selection around the interspersed position. This process uses a bit of cloud computing so it's still a deal to move under T pos.
5, extrude a little budge after the soft edge according to normal and edge weight
This step is nothing to say, is to soften the last step of the constituency, and then as a weight value to squeeze the interspersed fringe area, so that the impact of the place more sensual.
6, uniform to the interspersed and edge parts to do smooth smooth
This can be smoother by using the smooth node directly, or by using neighbours to find the neighbor point and the average neighbor location to determine its position.
In the end, there are many areas where this method can be perfected, such as how to offset more accurately and make the scatter point more evenly distributed. Especially scatter this link, H14 on the scatter can be evenly distributed, but previously learned that through the iterative method of uniform distribution can not be 100% of the guaranteed point cloud can be completely follow the animation mesh. These aspects will have the opportunity to gradually improve.
Finally, this method of a document, we can refer to, but also hope to get comments and feedback.
Repair interspersed source files
The method of general modification of characters in Houdini