Unity, 3dmax made morph (blendshape) Considerations for using the import unity

Source: Internet
Author: User

The deformed geometry and eyes formed by the failure of the proton to unfold in the great adventure of the chaotic era (see: http://www.cnblogs.com/wantnon/p/4857072.html). The geometry passes through a series of deformations and eventually turns into eyes. This is obviously supposed to be done with Morph (Blendshape), which happens to unity5 support Blendshape.

For example, the progressive morph is transformed into cubes, spheres, and eyeballs in turn.

In my modeling process, I first created the cube of the 4-segment X4 segment x4, and then copied it into three parts, which were then modified to be tetrahedron, sphere, and eyeball.

It is easiest to modify the cube to a sphere, using the spherify modifier directly, but be aware that you also need to modify the smoothing group so that the sphere normal becomes completely rounded.

The method of modifying the sphere to the eyeball is to compress the eyeball first and then separate the sections.

Modifying a cube to be a tetrahedron is the most troublesome and requires the construction of two triangular patches, erected as follows:

One level is placed, the other is placed with it into a arccos (1/3) =70.5287793 degree angle.

Using the bracket above, the cube's sections are scaled in wireframe mode. Finally get the center of gravity exactly the same as the world's original point to its tetrahedron.

Final check:

1, whether the move value of the tetrahedron is (0,0,0).

2, whether the scale value of tetrahedron, cube, sphere, eyeball is all (100,100,100), rotate value is all (0,0,0).

If an object does not meet the scale value of (100,100,100), such as (50,50,50), it must be changed to (100,100,100), but after the change to find that the object has become one times larger, then how to do? The approach is to go to the vertex level, select all the vertices and scale to zoom in one-fold. Likewise, move and rotate are doing the same thing. Just remember that you should never use rotation, panning, and zooming at the model level, but at the vertex level. Why is it? Because the morph is blended only by vertex local coordinates, the overall transformation of the model level is not picked up.

Adding the Morpher modifier to the positive tetrahedron, you can see many deformation channels, because I now only need a deformation process, that is, the cube--and the ball-----the eyeball, so just use one channel is enough. We add cubes, spheres, and eyeballs in channel 0 in turn, and they appear in the target list of the progressive morph below. Then adjust the value of channel 0, you can observe the deformation process: 0 o'clock is a normal tetrahedron, the values of 100/3 is a cube, when the 100/3*2 is a sphere, when the duty is 100 is the eyeball.

Since I wanted to use the program to control the morph process in unity, I just created the morph, not the K animation. gameobject.getcomponent<skinnedmeshrenderer> () in unity. Setblendshapeweight (channel ID, blendshapeweight) can set the warp progress, where the channel ID and blendshapeweight are exactly the same as the channel ID and channel value in 3dmax.

Normal problem:

After importing a model with Morph through FBX to unity, the normals are not updated during the transformation by default. This causes the shape to change, but the lighting effect is not correct.

The solution is as follows:

(citation: http://docs.unity3d.com/Manual/class-Mesh.html)

There is ways to import blendshapes with normals:
1Set Normals Import Mode to Calculate, this is same logic would be used for calculating Normals on a mesh and blendshapes.
2Export smoothing groups information to the source file. This, Unity would calculate normals from smoothing groups for mesh and blendshapes.
If you want tangents on your blendshapes then set tangents Import Mode to Calculate.

I only tried the first method, which was to change normals to calculate in Unity's import settings, which might have a performance impact and not necessarily be faithful to the normal effect in 3dmax, but it's enough for my current needs. So I didn't try the second method.

Unity, 3dmax made morph (blendshape) Considerations for using the import unity

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.