top of page

Inverse Kinematics.

Made in Unity engine with C#.

Created as a part of a VR project for a clients PhD.

​

The initial application, in VR, is the example of the arm to the left, where using just the positional and rotational information from the controller (sphere in example), the position of the players arm is estimated. This arm will aim towards the controller and bend to fit, the hand will also copy this targets rotation. If the target is too far away, the arm will be outstretched.

There is also a 'pole' point placed behind the arm, the elbow aims to point towards this to avoid unnatural bending behavior.

​

Any amount of joints can be added to this system. With this ability, if the script is wanted to be used on arms in a non-VR context, where no rotational information from the target is given, a dummy joint can be added at the end of the hand, causing the hand's position to also be estimated.

​

The right example shows how this script can be applied in a different scenario, to estimate leg positions dependent on ground gradients and body movement, with this I have generated realistic leg movement without rigging or animating them.

OA_5.gif

Obstacle Avoidance.

Made in Unity engine with C#.

Created for flying AI in 'Moko and the Seven Gates' (on releases page).

​

The avoidance works using a grid of line casts to see where obstacles are, and will calculate a new direction based on the direction to the target, its previously moved direction, how close each hit point is, and their angles to the AI.

In the example, the red lines are points on the grid that the AI has detected an obstacle, the blue line is where it is adjusting its path towards to avoid them, and the green line is its new path.

This requires no baking, working on any moving object, thus can be used with dynamic maps.

​

By changing the size and resolution of this grid, you can change the AI's behavior, as well as affecting the system resources used. 

This example uses a short cast distance as there are lots of objects in a small area. A longer cast distance would allow the AI to react earlier with a smoother gradient away from obstacles.

​

Smart 3D camera.

Made in Unity engine with C#.

Created for 'Moko and the Seven Gates' (on releases page).

​

Created to keep the player always in view, even within buildings and cave systems in the game.

​

Checks to see if the player is visible, if not, it calculates the furthest position on the path that it can still see the player and aims towards this point, always staying on a rail.

Whilst the player is moving, jumping, and going towards the camera, the cameras checks and movement are sped up to avoid clipping.

Wildlife Simulator - AI project.

Made in Unity engine with C#.

Created as an artefact for a university project.

​

A simulation involving rabbits and foxes. Where the rabbits eat grass, and the foxes eat the rabbits.

These agents breed and generate offspring with attributes based off of the parents, meaning the behavior of the agents changes over time.

​

Utilizes:

    State Machines

    Fuzzy Logic

    Genetic algorithms - emergent behavior

    A* path finding

    Steering behaviors - applied to a grid

    Boids flocking behavior

    Procedural map generation ( more complex version listed below )

​

Procedural Map Generation.

Made in Unity engine with C#.

Created for a personal project.

​

The biomes are places using a voronoi diagram on a distorted grid. On generation, each chunk becomes the biome of that of the closest point on this grid.

The biomes themselves have different chances of being placed, and within them different chunk types have varying chances of being placed too.

​

Within the chunks, objects are placed in a realistic fashion using a perlin noise function.

Values are easily tweaked to give each object a unique type of placement on the map, depending on what it is and what biome it is in.
 

​

​

Chunk Management.

Object Pooling - Loading / Unloading, World Detail Management

Made in Unity engine with C#.

Created for a personal project.

​

Managing this open world procedural map took lots of management.

Chunks are unloaded and loaded as the player comes into range of them, with objects loaded asynchronously so there are no framerate spikes.

Objects are stored in an object pool, and relocated as new chunks are loaded and other unloaded.

World detail is only visible in a small radius around the player for efficiency, their distance to the player is only checked on the chunks surrounding the player.

In a similar fashion, objects and the player only have interaction checks when they are close enough, and objects billboard to the camera at different rates depending on how close they are to it.

These systems made the open world map with extremely high numbers of objects manageable, without lagging and taking up all of the systems RAM.

bottom of page