Navigating around water

Actually I just tried it on a larger graph. Around 6000 tiles. 2500*2500 voxels.
That gave me a 21x speedup compared to without the above mentioned optimizations.

Ohh thatā€™s awesome Aron! I would like to merge in your latest changes soon and try it out :smile:
Regarding writing raw data out to an .OBJ, Iā€™m still in the dark about how necessary tiles are when pathfinding (so, not when generating the graph but simply using a giant single-tiled navmesh at runtime). If I use one big tile with all the verts attached, is that okay? Any performance impact?
Is tile information included in your OBJ output? As I said, I lose the tile information by trying to use Unityā€™s triangulation routine. Iā€™m guessing we do want to keep many tiles, otherwise, you wouldnā€™t be suggesting the use of an OBJ file over Unityā€™s triangulation of the navmesh.

Hi

With the obj file I meant that you could gather all the meshes/collider in the Unity scene (not the navmesh) and save that to an obj, and then let the C++ recast version use that to generate a navmesh.

Tiles are not strictly necessary, however I think Unityā€™s navmesh generation can (like mine) generate edges that are not perfectly shared along tile borders. E.g in one tile we have a triangle which has one edge along one whole edge of the tile, but in the adjacent tile, the tile edge is shared by 2 triangles. Detecting connections between two nodes that do not share an edge exactly is trickier and is only done for nodes in different tiles.

I have sent a PM with the patches. If you want I can send you the whole changed files instead if that is easier for you to apply.

Ohh I didnā€™t know we could get private messages on here. Yeah, if itā€™s no hassle, I would love to have the whole files. I appreciate you sending me updates. I thought you meant it was a released version in the asset store when I said I was going to try it out :smile:

Hi

Nah, I do updates to the Unity Asset Store pretty rarely. It takes like a week to even get an update accepted. I do upload beta releases from time to time on my website however.

Ahhh it takes time to get accepted?? I never sold anything in the asset store. That brings back memories of bad experiences with Appleā€™s App Store. I used to publish games, and their whole process was PAINFUL!

Hey Aron,

I finally got around to trying your new Recast generator. Even though I did not have the best results with my bodies of water, the mere fact that you made the scan so much faster means I can scan more often so that I can try different things to attempt to get it to work right for me. I tried simply replacing those files that were affected and, apparently, it didnā€™t work:

I realized that my changes were not necessary on the UNITY end so I didnā€™t care to lose my changes with that set of files. But there seems to be some structural changes having gone on. Any ideas?

Thanks!

Hi

Are you sure you added the VoxelPolygonClipper and RecastMeshGatherer files? Those are new files, not a changed ones. They are definitely included in the files I sent you.

Also. Did you start from with the beta sources as I recommended when you started to make it work outside of Unity?
If you did not, I will have to send you a bunch of other files.

Also, are you keeping all this under version control so you can easily see the changes that you were required to do?

Sorry, I did miss those two files. Most of the errors were resolved by copying them over. You know whatā€¦ Iā€™ve been lazy. I did not update to a newer version before starting my project. Iā€™m going to have to do some serious merging. But I actually only have one error left. In base, ScanInternal had a void return type, now you return an iterator.

	public void ScanInternal () {
		ScanInternal (null);
	}

It seems like this is very close to compiling. I know I need to apply my changes to the latest version but, for now, I wanted to see if I can get this working. I need to see base.cs. Are the files in a git repo or do I have to get the .unityproject from the Asset Store?

To answer your other question. I do use git but I have no remote repo as of now. My server-side copy of A* Pathfdinding resides in a local repo and I regularly commit but not push anywhere.

Hi

I sent you a PM with the two files that you will need to update. There may have been other changes in them, so look out for that. I donā€™t think you should need any other files if you have removed all other graph generators.

Thanks Aron!! For my client-side version, I did have the other generators, which I donā€™t use. Later, I need to remove them so they donā€™t try to inherit from the incorrect ScanInternal (from Base) and it should work perfectly!
I donā€™t want to keep maintaining two different versions so I plan to mark off my changes with #if #else #endif throughout to prevent things like MonoBehaviour on the server side.

By the way, Iā€™ve just about given up on Detour. Even on unmodified version of Detour does things like give me a straight path to the destination without regard for obstacles. I have a modified version that can have 4.2 billion verts per tile instead of 65535 and it does the same thing. Originally, I thought the problem was me modifying the code but, nope. It has a hard time with data that did not come from Recast. Albeit, Iā€™m only creating one tile.
As for Recast, I gave it a chance tooā€¦ I tried giving it verts and indices from a Unity scene and, 5 minutes later, SEGMENTATION FAULT! ARRRHHHHH!!
Just thought Iā€™d share my story :smile: