How it works...

stores vertices position of a mesh. We have to create them in a 3D package. Unity imports Blend Shapes and we can modify their weights in runtime using the SetBlendShapeWeight() function on the Skinned Mesh Renderer component. We can also use animations as shown in the, Animating facial expressions with Blend Shapes recipe in Chapter 5Characters Actions and Expressions.

Blend Shapes have trouble with storing Normals. If we import Normals from our model, it may look weird after morphing. Sometimes, setting the Normals option to Calculate in the Import Settings can helps with the problem. If we choose this option, Unity will calculate Normals based on the angle between faces of our model. This allowed us to morph a hard surface cube into a smooth sphere in this example.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.189.171.125