måndag 2 maj 2016

Formation change and avoidance

We implemented a few formations for group of three and tried to change between these formations, however we haven't implemented colliders yet, so the agents will at times move through each other while changing formations.


Then we tried to implement some avoidance and change of formation depending on the obstacle. We used Unity's raytracing method to check it there is obstacle's infront the group. It didn't work as we had imagined, and it somehow looks like it only works for the first raycast (leader's raycast). For improvement, we might try some colliders instead of raycasting.


The video above is a hard-coded version of the raytracing method.

söndag 17 april 2016

Slight modifications

Depending on the leaders rotation the agents that follows will change it's speed so it fits the formation accordingly .

onsdag 13 april 2016

Foramtions

Lately we've been working on implementing group formations consisting of three agents. To begin with, we've only tried to get a basic formation to work, consisting of three agent on a straight horizontal line moving upwards, towards a target goal location.

The formation is build from the leader placed in the middle, and the two other agents placed adjacent with a fixed distance to the leader. To goal is for the agents to always stay on each side of the leader. so far, we've only managed to position a leader, spawn the adjacent agents and get them moving towards, and finally to a target point. The agents direction and rotation follow the leader's, but in case of a rotation, the agents doesn't increase/decrease their speed to match the leaders positioning.

To solve this, we've been thinking of implementing a point for each agent adjacent to the leader, which gives each agent a individual target point. drawing a transparent perpendicular line to the leaders direction and placing points on it with a fixed distance, the agents will now have a target point, which will update with the leaders movement. in case the agent is placed behind the line, the agent will have to increase it's speed in order to catch up to the leader, and vice verse, having the agent to slow down, in case he's in front of the leader.

Having static formation with a too high velocity and a rapid rotation would result in the perception the outer agent is teleported, which is not good. therefore, we're not going with the static approach. also, having the leader stop when making a rotation (like a tank), is not up for discussion due to unnatural looks of it.


onsdag 23 mars 2016

UnitySteer Breaks

With the implementation of Unitysteer's path following and avoidance the following result were obtained.

video

As shown above, agents moving towards each other with the intention to avoid breaks, as the algorithm is random there are 2 possibilities. One, where they avoid each other by going the same direction respectively, and the other possibility is that they both go the same directions and ends up blocking each other for awhile.

One way to solve this scenario is to implement listeners, where the agents check at any incoming agents directions, if the incoming agents direction is towards the listener it can choose to change direction to avoid the incoming agent. 

onsdag 10 februari 2016

UnitySteer

By implementing UnitySteer instead of our own steer algorithm(which didn't worked out as planed), we were able to create a working demo of pursuit, follow and evasion.

video

The orange capsule is the pursuit and also the one that the player are able to move around with.
The other geometries evades each other and follows the pursuer. But if it gets too close to the pursuer, it will evade.

onsdag 3 februari 2016

Demo

Due to the circumstances we did not manage to fully explore and implement the steering algorithm. The agents somehow orbits around the target in an elliptic trajectory.

The purple dot is our target.

tisdag 2 februari 2016

Trouble, lost of files

Working with git is always a mess, since we both never had/attended any kind of course in Github (which should be mandatory in KTH). Unfortunately something stranged happened, when we tried to push our work so far, we were not able to revert it, since we never even pushed anything. We will hopefully be able to work something out tonight and tomorrow before our meeting with our supervisor.

torsdag 28 januari 2016

måndag 18 januari 2016

Crowd simulation Bachelor thesis

This blog is about a Bachelor thesis in crowd simulation at a Master thesis level, by two students from Royal Institute of Technology.

This project will be done in Unity with state of the art scientific algorithms and methods from various papers.