My AssetStore Link


Unity Store Link - Click to see all the Song's work that has been put on Unity AssetStore

Wednesday, 3 October 2012

PathFinder WIP & Coming Update

I'm glad to announce that PathFinder is now getting an overhaul. I've been trying to do this since a few weeks back but only manage to find time now one of the project I've been working on it finished.

I understand that some of the user do prefer C# over JS. For that reason, a C# counterpart will be added to the package. The new C# code will coexist with the current JS code so user will be able to choose their code of choice. Both C# and JS will have exact the same function and feature.

Another thing that will be worked on is the thing that has been bugged me for a while, path-smoothing. The path smoothing in the current version is based on a rather simple Line-of-Sight (LOS) scan. Although it manage to make some of the twisty path straight, it doesnt look very natural. And what bug me the most, it tends to ignore any gap on the walkable surface and "fly" over it. I've added a few more procedural ray-casting along the smooth path to prevent this. So the result is shown in the image bellow:

A comparison of the post LOS smoothing algorithm path. Left: PathFinder v1.0. Right: WIP
The LOS smoothing in current version on the left shows some places where the path over cut the corner as highlighted in the red rectangular. The modified LOS smoothing, which result is shown on the right side of the image, show no obvious over-cutting .

On top of that, I've added another layer of mean smoothing to smooth out the path. The result is a much smoother path. One that is more natural and organic compare to the direct result of LOS smoothing. You can see the difference in the image below, on the right. For comparison sake, the original path found with no post-processing is shown on the right.

The comparison of pre-smoothing and post-smoothing path in the upcoming PathFinder.
Of course, there will be other small tweak, optimisation done to the package other than the smoothing algorithm before the update is finally released. I hope it wont be long from now.

No comments:

Post a Comment