Home › Forums › A* Pathfinding Project › Beginner Questions › because of verticies > 60000 error, problem with useing mutible graphs
This topic has 2 voices, contains 9 replies, and was last updated by benjamin 94 days ago.
| Author | Posts |
|---|---|
| Author | Posts |
| February 8, 2012 at 20:02 #1464 | |
|
benjamin |
Well i have no code to put here so just a description will have to do… the terrain im using is HUGE and thus when trying to make a graph with the correct proportions i have a error (which you mentioned in faq’s). Because of this i have decided to make multiple graphs which end the error |
| February 9, 2012 at 18:00 #1474 | |
|
Benjamin |
If anyone has the info for this it would be greatly appriciated all I have to do is show this working and the company will get the pro version, but no go until its a viable solution to save us time. Thanks again |
| February 9, 2012 at 19:08 #1475 | |
|
Aron Granberg |
Hi I would recommend not to try creating multiple grid graphs and stitching them together. It will not work good near the edges I’m afraid. First, try running it in Unity 3.5. They fixed some things related to that error in 3.5, and I think it occurs less often. You can also try to disable all gizmo rendering like Show Graphs and especially Draw Unwalkable Nodes. What is drawn in the editor are the center points of the nodes, so the bounding box extends a small bit outside it, exactly 1/2 of a node since the nodes are squares with 1 [node-size] on each side. If possible, you could also try using a navmesh as they most likely never will cause such an error because of their usually small size. They are also faster to search and better in most other ways, though quite tedious to build. Also, note that the 60K vertex error AFAIK only happens in the editor, when building the game it should work fine. |
| February 10, 2012 at 03:37 #1480 | |
|
benjamin |
well thank you for your advice! The size of my terrain is… 2000w 600h 2000l (got that from set terrain resolution). I already set the node size to 10 {(50,50,10)x4} the nav mesh i somehow knew would most likely be my best bet… should i use the heightmap export to create it when useing a normal unity generated terrain? if the question is answered in your awesome tutorials then dont bother telling me as next time we talk i will most likely know |
| February 10, 2012 at 03:42 #1481 | |
|
benjamin |
side note {Also, note that the 60K vertex error AFAIK only happens in the editor, when building the game it should work fine.} <—– i know alot of people at the office who will be very very happy to hear this! |
| February 10, 2012 at 19:04 #1485 | |
|
Aron Granberg |
Ah, the major drawback of navmeshes are that they are very hard to update, it requires some very tricky boolean operations on polygons, which I have implemented to some extent in other projects but they are too unstable to be used at the moment. The system has not (currently) support for updating navmeshes other than changing existing nodes’ penalty and walkability. That’s why grid graphs are better for games where the user creates many obstacles. Navmeshes are usually created by hand in a 3D modeling program (like Blender) to describe the walkable surfaces in the world. In the pro version I have build-in support for automatic navmesh generation though (based on Recast). From my experience the 60K error only occurs in the editor, but to be sure, try it and check the player logs.
|
| February 10, 2012 at 20:27 #1488 | |
|
benjamin |
well considering the update problem in the future when using nav meshes i think using the grid graphs are better. Although im not sure how just making the nodes to unwalkable when something is built there then changing them back when its destory’d wouldn’t work.?? i assume you are talking about the bools essentially doing this. also cant you just place a collider on the placed object to invoke an inability to let the seeker navigate through or does this result in erroneous movement around the object? also involving stitching im at a loss to understand what this entails. is it what i was doing basically moving it closer. ill be searching for a tutorial about this. Can i just force move it using code from one graph to the next? thanks again |
| February 10, 2012 at 20:41 #1489 | |
|
Aron Granberg |
Navmeshes are composed out of triangles, a triangle might be much larger than an object you want to place. So currently you would have to deactivate the whole triangle which would probably lead to weird movement. Instead I have to cut the mesh to create new triangles. If you still want to stitch your grid graph together (which I do not recommend, but anyway), you can enable a feature which is not exposed in the editor. Open the GridGenerator.cs script and look for a variable named “autoLinkGrid”. This variable will be set to false, so set it to true. When you scan graphs again, the grid will hopefully be linked automatically. |
| February 12, 2012 at 23:17 #1505 | |
|
roto23 |
having similar problem. how do you stitch together multiple grid graphs. here is a cut and paste of a post I almost submitted before I spotted this related post……… Thanks for the replies. I’m still wrestling with this but making progress. I have a question. Since I get that >60000 error, I made my node size bigger. But it is too big to get nodes where I need them. The largest node size I can live with is probably 10 (5 would be better). At a size of 10 I cannot cover my whole terrain. Can I make 4 graphs of node size 10 to cover my entire terrain? If I do this can a path be found when it starts in one graph and ends in another? These are grid graphs |
| February 14, 2012 at 10:17 #1524 | |
|
benjamin |
sry i guess i should have posted this earlier but im useing 3.4.2f3… as far as i can tell this is the latest… im not sure if this is going to be plausible though considering the problems with unitys bug errors and navmesh updating thanks for all you help though |