Crispoly Characters Mini - Unity Asset

Version 1.0

Characters: 135

Animations 216

Overview

Crispoly Characters is a low poly character collection where all characters share the same armature making it easy to reuse animations between them. The low poly characters only have between 150-800 vertices and they all share the same material making them very performant for any game, including low-end mobile devices.

Table of Contents

Key Features

*) The game engine will report 1000-3000 vertices because the characters are flat-shaded and to render flat surfaces, the game engines need to duplicate each vertex multiple times to get different directional normals.

Key Assets

CCM-Character_URP Prefab

Path: Imphenzia\CrispolyCharactersMini\Prefabs\CCM-Character_URP.prefab

This is the main character prefab. It contains the master character mesh with material, the armature hierarchy, and an Animator component on the prefab root.

Changing the character mesh

For an instantiated prefab, or if you create your own prefab, you can change the mesh by selecting the CCM-Mesh child object and changing the Mesh under Skinned Mesh Render in the inspector.

You can also change the character’s skinned mesh renderer mesh from a script. For example, this randomizer script lets you specify character renderers in the scene and meshes from the project and when pressing space it randomizes all the meshes as seen in the “DemoActions” scene.

using UnityEngine;

namespace Imphenzia.CrispolyCharactersMini
{
    public class Randomizer : MonoBehaviour
    {
        [SerializeField] SkinnedMeshRenderer[] renderers;
        [SerializeField] Mesh[] meshes;

        void Update()
        {
            if (Input.GetKeyDown(KeyCode.Space))
            {
                Randomize();
            }
        }

        public void Randomize()
        {
            foreach (var renderer in renderers)
            {
		            // This is where the renderer gets
		            // assigned a new character mesh
                renderer.sharedMesh = 
	                meshes[Random.Range(0, meshes.Length)];
            }
        }
    }
}

CCM-CharacterWithProps_URP Prefab

Path: Imphenziza\CrispolyCharactersMini\Prefabs\CCM-CharacterWithProps_URP.prefab

This prefab comes with some included props. The props are parented to various bones. Weapons are generally parented to Hand.R and shields are generally parented to ForeArm.L. When the props are parented to bones, they will automatically follow along when animations are played.

Working with props

You can add props to the character by dragging and positioning props to bones of the character prefab or new character prefab variants. You can also instantiate props through code to add or remove items from the characters.

Commonly used props can be included in a deactivated game object state all the time and then enabled when necessary.

The prefab, as seen in the screenshot above, has multiple props attached but set to inactive. By default the LLA-Shield01-White shield is activated under LowerArm.L, and the RH-Sword01 weapon is activated under Hand.R.

It is recommended that you create your own character prefabs and only including props that are appropriate for your game.

This example shows how different props can be deactivated and activated. If you want to add your own props, import them and parent them to bones and position them as needed.

Props are prefixed with to easier identify which bone they may be best parented to, e.g. RH for Right Hand and LLA for Left Lower Arm.

Character Animations

All character animations are stored in the Imphenzia\CrispolyCharactersMini\Animations folder. Animations are individually stored so you can remove unused animations in your project and to easily allow addition of more animations in the future.

Looping Animations

Looping animations have the suffix “_Loop” and they are configured to loop through the “Loop Time” and “Loop Pose” settings.

Mainly, all the idle animations, walking animations, and running animations are configured as loops.

Pose Animations

Some animations have the suffix “_Pose” and they are included because it is common to blend between poses either using blend trees or through scripts.

The demo scene DemoPoseBlending_URP demonstrates how frame blending can be used. The scene has a demo character that uses the CCM-AC-Jumping AnimatorController which has an idle state, a blend tree to blend between jump up and fall down poses, and a crouch pose for landing.

The idle loop plays by default and when the Grounded bool is true. The demo script jumping.cs applies a jump force to the rigidbody component of the character every other second. As the character jumps up into the air, a physics check in the script detects that the character is not touching the floor and sets the Grounded bool to false which makes the Animator transition to the JumpingBlendTree state.

The JumpingBlendTree state has a BlendTree with two animations which in this case are poses rather than animations. The VerticalSpeed parameter is sent from jumping.cs to the animator and it contains the Y velocity of the rigidbody. The blend tree has a threshold of -10 for the falling down pose, and 10 for the jump up pose. As the character smoothly jumps up into the air and falls back down to the ground, the value of VerticalSpeed interpolates between the jumping and falling poses making it seem like an animation rather than key frames.

When the character lands again, it transitions to the Crouch pose, and then it blends back to the idle animation.

AnimatorController

To play Animations you need to configure an AnimatorController and set up the animations you need for your project. Each game will require their own AnimatorController since character movement and action needs vary from game to game.

This asset comes with some AnimatorController samples that can help you along the way and they can be located in the Imphenzia\CrispolyCharactersMini\Demo\AnimatorControllers folder.

The prefab comes configured CCM-AC-Base animation controller. This has a looping idle animation as the only transitional state and all other animations have been imported without transitions.

Animation Events

Some animations come configured with animation events. These events are triggered by the animation and can be useful to call a function, for example when a punch or kick is at its most extended state. In the example to the right, the animation BoxingPunchStraightLeft calls a function called AttackEvent() is called if there is one in a MonoBehaviour on the same game object as the AnimatorController component.

These animation events have been set up with the SendMessageOptions.DontRequireReceived so they won’t generate an error if they are not found. The animation events have also been configured to send a string parameter as an identifier so you can play the appropriate sound effect or perform appropriate actions.

Other demo prefabs and scenes that use animation events to call script functions are boxers, blacksmith and martial artists.

You will most likely want to set up your own animation events for your game, so these are more included for demonstration purposes.

List of included animation events:

AnimationTimeFunction CalledString Parameter
BlacksmithHammer0.6666667SparksEvent
BoxingPunchBodyLeft0.4AttackEventBoxingPunchBodyLeft
BoxingPunchBodyRight0.3333333AttackEventBoxingPunchBodyLeft
BoxingPunchStraightLeft0.4AttackEventBoxingPunchStraightLeft
BoxingPunchStraightRight0.4AttackEventBoxingPunchStraightRight
BoxingUppercutLeft0.3333333AttackEventBoxingUppercutLeft
BoxingUppercutRight0.2631579AttackEventBoxingUppercutRight
GolfSwing0.1538462GolfSwingEvent
KickFront0.4AttackEventKickFront
KickSide0.32AttackEventKickSide
KickSideAlt10.4444444AttackEventKickSide
KickSideAlt20.3636364AttackEventKickSide
KickSideAlt30.32AttackEventKickSide
RevolverBodyHipFire0.1428571AttackEventRevolverBodyHipFire
RevolverDraw0.1666667RevolverAppearEventRevolverDraw
RevolverFire0AttackEventRevolverFire
RevolverHipFire0AttackEventRevolverHipFire
SwordHit10.59375AttackEventSwordHit1
SwordHit20.5AttackEventSwordHit2
SwordSlash10.46875AttackEventSwordSlash1
SwordSlash20.4117647AttackEventSwordSlash2
SwordStab10.5AttackEventSwordStab1

Render Pipelines

The asset was designed for URP but materials are supplied for all three render pipelines. Prefabs, materials, shaders, and demo scenes have the suffix _URP for Universal Render Pipeline, _HDRP for High Definition Render Pipeline, and no suffix for Build-in Render pipeline.

Demo Content

Support is not offered for the demo content - it is included to showcase some of the feature and to act as guidance.

Scenes

Demo_URP.scene / Demo_HDRP.scene / Demo.scene

This scene shows all the characters in random positions on a grid along with sample animations. The demo scene is also available for HDRP (Demo_HDRP.scene) and Built-In Render Pipeline (Demo.scene).

DemoActions_URP.scene

This scene shows how some of the characters and animations can be used. Demo prefabs have been set up in the scene to show boxers, martial artists, a blacksmith, fighting knights, a golfer, a backflipping ninja, and a cowboy.

If you look at the prefabs in the scene, you can see example animator controllers and scripts that are used to perform actions and in the case of the boxers, also detect punches and play animations when hit.

DemoRunning_URP.scene

This scene shows characters running to random positions on a NavMesh with NavAgent components. Three characters use a demo animation controller and script that makes them run forward in the direction of the destination. The other three characters use a different animator controller and script showing how the characters can use 9-directional strafing which is useful if you are creating a top-down shoot’em up where the character should always face forward.

DemoPoseBlending_URP.scene

This scene demonstrates how pose animation (containing just a single pose) can be blended into fluent animations using the AnimatorController and blend trees. See for more information and examples.

Thank you for buying Crispoly Characters Mini. Happy gamedev!