Tuesday, 22 July 2014

Unity3D- Collider

09:04 Posted by Unknown No comments
Simple video on what is collider and how to apply it in your scene. 


Sunday, 20 July 2014

4. Humanoid Avatars

14:43 Posted by Unknown No comments
Humanoid Avatars

When you select a mesh on the project panel, in the inspector will have 3 tab Model, Rig and Animations.
To configure the avatar, click the Rig tab. 
We assume the avatar is humanoid so the animation type should be humanoid.
This is Avatar Definition party and that is the option. Copy from other avatar means simply copy other avatar definition  
Checking Optimize game objects, Unity will not create extra empty game object 
To expose a transform, click the + sign and find the one you want.
Choose the one you want and need to configure it after this. 
When this come out, choose apply if you want to keep your changes. 
This is the configuration scene that in inspector have Mapping and Muscle
This is the representation of humanoid model with various circle and dot.
It represent bone of the model.
This part will allow you to choose which one you want to look
This is the list off all bone 
Mapping have for option.
Clear for clearing all the bone
Automap will get unity auto detect the bone
Load and save are use for dealing with humanoid template
Pose are for making the model to pose and when finish. click apply
Then click for the muscle tab. This is the three group subset.
First group is just a preview of overall movement.
Second group setting is for adjust  range of muscle movement
The third group is additional setting.
Twist setting for how much the muscle can twist and
stretch is for how much it can stretch
Feet spacing ts the default for spacing between the avatar

3.Blend Trees

03:01 Posted by Unknown No comments

Blend Trees


Blend Trees are used for allowing multiple animations to be blended smoothly by incorporating parts of them all to varying degrees. The amount that each of the motions contributes to the final effect is controlled using a blending parameter, which is just one of the numeric animation parameters associated with the Animator Controller. In order for the blended motion to make sense, the motions that are blended must be of similar nature and timing. Blend Trees are a special type of state in an Animation State Machine.


Right click on the empty space > Select Create State > From New Blend Tree from the context menu that appears.

This create a state that have Blend trees as it motion. Double click on before will allow you to edit it.
This is where you will edit the Blend Tree and the Blend type for this is 1D (1 Dimensional Blend Tree)
1 D Blend tree use a single parameter to control how much motion should be play. 
This is the list of motion. To add motion click the plus icon and choose Add Motion Field




To add the motion you can either drag from the asset list or click circle select button

This blue cross diagram is the illustration of where the different motion lies on the scale of parameter.
The lowest threshold is on the left and highest on the right.
Automate Threshold is check then the threshold that you had for each animation is set and wont be changeable.
 If uncheck, we can use the following tools option. Compute Thresholds will calculate and set threshold base on your motion field. It will do this base on root motion that  you will select.

Adjust Time Scale you can make the speed homogeneous speed or reset time scale.




There are 3 type of 2D Blend tree.

2D Simple Directional: Best used when your motions represent different directions, such as “walk forward”, “walk backward”, “walk left”, and “walk right”, or “aim up”, “aim down”, “aim left”, and “aim right”. Optionally a single motion at position (0, 0) can be included, such as “idle” or “aim straight”. In the Simple Directional type there should not be multiple motions in the same direction, such as “walk forward” and “run forward”.
2D Freeform Directional: This blend type is also used when your motions represent different directions, however you can have multiple motions in the same direction, for example “walk forward” and “run forward”. In the Freeform Directional type the set of motions should always include a single motion at position (0, 0), such as “idle”.
2D Freeform Cartesian: Best used when your motions do not represent different directions. With Freeform Cartesian your X parameter and Y parameter can represent different concepts, such as angular speed and linear speed. An example would be motions such as “walk forward no turn”, “run forward no turn”, “walk forward turn right”, “run forward turn right” etc.


The view of 2D Simple Directional.

Monday, 14 July 2014

7.Animation Controller Layers

07:45 Posted by Unknown No comments
  • The Animation Layer Widget
Unity uses Animation Layers for managing complex state machines for different body parts. An example of this is if you have a lower-body layer for walking-jumping, and an upper-body layer for throwing objects / shooting.

You can manage animation layers from the Layers Widget in the top-left corner of the Animator Controller.



You can add a new layer by pressing the + on the widget. 
On each layer, you can specify the body mask (the part of the body on which the animation would be applied).The Mask property is there to specify the body mask used on this layer.
 Blending type : Override means information from other layers will be ignored, while Additive means that the animation will be added on top of previous layers.
Sometimes it is useful to be able to re-use the same state machine in different layers. For example if you want to simulate "wounded" behavior, and have "wounded" animations for walk / run / jump instead of the "healthy" ones. You can click the Sync checkbox on one of your layers, and then select the layer you want to sync with. The state machine structure will then be the same, but the actual animation clips used by the states will be distinct.

Sunday, 13 July 2014

Saturday, 12 July 2014

2.The Animator Controller

13:03 Posted by Unknown No comments
What is Animator Controller

Animator Controllers are state machines that determine which animations are currently being played and blends between animations seamlessly.

How do i open the Animator Controller?


Right click at project view

Right click any place in Asset view
 How do i open the Animation?

At window

Double click at any animation asset
The Animator Controller Window will contain :

  • Mecanim State Machines


Mecanim's Animation State Machines provide a way to overview all of the animation clips related to a particular character and allow various events in the game (for example user input) to trigger different animations.
State Machines consist of StatesTransitions and Events and smaller Sub-State Machines can be used as components in larger machines.

  • Animation Parameters
Animation Parameters are variables that are defined within the animation system but can also be accessed and assigned values from scripts. For example, the value of a parameter can be updated by an animation curve and then accessed from a script so that, say, the pitch of a sound effect can be varied as if it were a piece of animation. Likewise, a script can set parameter values to be picked up by Mecanim. For example, a script can set a parameter to control a Blend Tree.

Default parameter values can be set up using the Parameters widget in the bottom left corner of the Animator window. 
  • Vector - a point in space
  • Int - an integer (whole number)
  • Float - a number with a fractional part
  • Bool - true or false value

1.The Animator Component

09:02 Posted by Unknown No comments
What is Animator Component??

Any GameObject that has an avatar will also have an Animator component, which is the link between the character and its behavior.

How do it's look like?



Explain more detail

The Animator component references an Animator Controller which is used for setting up behavior on the character. This includes setup for State MachinesBlend Trees, and events to be controlled from script.


The animator controller attached to this character
The Avatar for this character.
Should we control the character's position from the animation itself or from script.

Should the animation interact with physics?



Always animate, don't do culling


When the renderers are invisible, only root motion is animated. All other body parts will remain static while the character is invisible.