Logo - Crazy Minnow Studio - game, asset, tool development

Welcome to Crazy Minnow Studio! We are a small indie software development team primarily focused on game development using the Unity engine. Our pipeline includes: games, game development tools and assets, and video tutorial production. Check out our Unity lip sync asset, SALSA Lip-Sync, available on the Unity Asset Store. Follow our blog for updates on our Unity asset and game development, as well as other happenings in indie game development.

QUICK-TIP: Limit RandomEyes Movement To Quadrants

In our previous QUICK-TIP (Configure SALSA With Fewer BlendShapes), we showed you how to use fewer blendshapes on your model with the SALSA component. In this article, we'll show you how you can use a similar technique to restrict the awesome eye movement in RandomEyes to certain quadrants, while maintaining some random movement. We'll be demonstrating this using RandomEyes3D; although the principals are the same for RandomEyes2D.

RandomEyes gives you the ability to programmatically set specific eye directions; however, this does require that you turn off random eye movement by unchecking the Random Eyes property in the Inspector or programmatically via the public function RandomEyes3D.SetRandomEyes(boolean):

screenshot01

NOTE: disabling the RandomEyes option in the Inspector hides the properties associated with this function.


Now, let's assume you'd like to keep the natural random movement, but focus your look direction down to half or even one quarter of the available movement area. For this tutorial, the examples assume your index numbers for LookUp - LookRight are the default positions (indexe numbers 4 - 7 respectively) as described in the manual:

screenshot02

To limit your character's random movement affinity, you can restrict it to the view halves, such as: upper half, lower half, right half, or left half. You can also limit to some quarter views, such as: upper right, upper left, lower right, or lower left.


Halves:

Upper Half: Prevent the LookDown index from being used by RandomEyes by setting the LookDown Index property to be the same as the LookUp Index, for example:

screenshot03

Restraining to the Lower Half would be the same principle (LookUp & LookDown) set to index number 5, which is the LookDown index. This prevents the LookUp index from being used by RandomEyes.

Right Half: Using the same procedure for the upper and lower halves, prevent RandomEyes from using the LookLeft index by setting the LookLeft Indexproperty to the LookRight blendshape index number (7 in this example):

screenshot04

To restrain to the Left Half, set the LookLeft Index & LookRight Index properties to the LookLeft blendshape index number (6 in this example).


Quarters:

Upper Right: In this example, restrict RandomEyes to LookUp & LookRight blendshape indexes:

screenshot05

Upper Left: Use the LookUp blendshape index in LookUp & LookDown Index properties, and the LookLeft blendshape index in LookLeft & LookRight Index properties.

Lower Right: Use the LookDown blendshape index in the LookUp & LookDown Index properties, and the LookRight blendshape index in LookLeft & LookRight Index properties.

Lower Left: Use the LookDown & LookLeft blendshape indexes:

screenshot06


Of course, you can also control these values programmatically for more flexibility at runtime. Enjoy!


Categories:SALSA, QUICK-TIP

Comments:No comments yet