Language:
Page Info
Skill Level:
Engine Version:

4. Creating Blend Spaces

Choose your OS:

The next thing we will do to create movement for our character is to create Blend Spaces for each of our movement states (Walking, Jogging, and Crouch Walking). Blend Spaces are special assets that allow for blending of animations based on the values of two inputs. In our case, we will blend between forwards/backwards and left/right movement based on the character's movement Speed or Direction.

For more information on Blend Spaces, refer to the Blend Spaces documentation.

The steps below will show you how to set up the movement Blend Spaces:

  1. Right-click inside the Content Browser, select Animation, then select Blend Space to create a new asset.

    Blendspace_1.png

  2. In the Pick Skeleton window, select your Skeleton (UE4_Mannequin_Skeleton), then name the asset Walk_BS.

  3. Open the Walk_BS Blend Space, then under Parameters, set the X Axis Label to Direction and Y Axis Label to Speed.

  4. Set the X Axis Range to -180 to 180 and the X Axis Divisions to 4.

  5. Set the Y Axis Label to Speed, the Y Axis Range to 0 to 200 and Y Axis Divisions to 4.

  6. Once you have set the values for both the X and Y Axis, click the Apply Parameter Changes button.

    Blendspace_2.png

    Your set up should look like above. After clicking apply, the grid space to the left of the Parameter window will update to use our input values that will be used to determine the blending between our movement animations.

  7. In the Asset Browser window, search for rifle ironsights animations (we will be using these motions for our character).

    Blendspace_3.png

  8. Locate the Walk_Fwd_Rifle_Ironsights animation, then drag-and-drop it to the bottom-center position on the grid space.

    Blendspace_4.png

    This will create a point of reference on the grid space.

  9. Drag the Walk_Lt_Rifle_Ironsights and Walk_Rt_Rifle_Ironsights animations into the grid to the left/right of the walk forward point.

    Blendspace_5.png

    Above Walk_Lt_Rifle_Ironsights (L), Walk_Fwd_Rifle_Ironsights (F) and Walk_Rt_Rifle_Ironsights (R) are shown on the grid.

  10. Drag in the Walk_Bwd_Rifle_Ironsights animation and place it on the bottom left end and bottom right end points.

  11. Along the top of the grid, repeat the same layout as the bottom from left-to-right (Bwd, Lt, Fwd, Rt, Bwd).

    Blendspace_6.png

    Moving your mouse inside the grid now, you should start to see the character walking and blending between directions.

  12. In the Anim Asset Details, under Sample Interpolation, set the Target Weight Interpolation Speed Per Sec to 2.0.

    Blendspace_7.png

    This will smooth out the blending when shifting between directions.

  13. Save then close the Walk_BS Blend Space window.

  14. In the Content Browser, Right-click on the Walk_BS asset and select Duplicate.

  15. Rename the copy to Jog_BS and open it up.

  16. Under Parameters, change the Y Axis Range max value from 200 to 375 then click apply.

    Blendspace_8.png

    The 375 value refers to the speed of our Jog that we set inside the MyCharacter Blueprint.

  17. The grid will update to use the max speed value, however the points on the grid remain in their previous position.

    Blendspace_9.png

  18. Left-click on and drag each of the points up to the top of the grid at their respective locations.

  19. In the Asset Window search for Jog animations.

  20. Replace the walk animations on the grid with jog animations by dragging a Jog animation onto a Walk point on the grid.

    Blendspace_10.png

    Along the bottom and top of the grid we are using the Jog (Bwd, Lt, Fwd, Rt, Bwd) Rifle animations.

  21. Save then close the Jog_BS Blend Space window.

  22. Duplicate the Jog_BS and rename it to Crouch_BS then open it up.

  23. Under Parameters, change the Y Axis Range max value from 375 to 160 then click apply.

  24. In the Asset Browser, search for rifle ironsights.

  25. Replace each of the points on the grid with their respective Crouch_Walk animations.

    Blendspace_11.png

  26. Save then close the Crouch_BS Blend Space window.