What I am trying to do is simply export the navmesh generated by unity as an .obj file so I can edit it in 3ds max. Is there any way of accessing that kind of data ? It would be very helpful in so many regards.
Thanks for any answers
What I am trying to do is simply export the navmesh generated by unity as an .obj file so I can edit it in 3ds max. Is there any way of accessing that kind of data ? It would be very helpful in so many regards.
Thanks for any answers
Perhaps this is a bit late, but maybe this will help people hoping for an answer… I achieved to convert the navmesh to a Mesh object by using the following code:
NavMeshTriangulation triangles = NavMesh.CalculateTriangulation();
Mesh mesh = new Mesh();
mesh.vertices = triangles.vertices;
mesh.triangles = triangles.indices;
Then maybe you can dump the Mesh in OBJ using AssetDatabase.CreateAsset(…) and AssetDatabase.SaveAssets(); or else you can use some OBJ exporter like this one: http://wiki.unity3d.com/index.php?title=ObjExporter
However I must say the documentation about NavMesh.CalculateTriangulation() is a bit poor … It usually (but not always) worked for me until now.
I can’t assure you the model will be perfect. But if you expect to modify it with 3D MAX, you may spot eventual problems.
If anybody knows more about this CalculateTriangulation function, his/her opinion is more than welcome
Hope this helps! Cheers.
Yes, it seems that you cannot acces the mesh data generated in the editor. My plan was to use that data to build in 3ds max a new mesh that is more similar to the nav mesh. I guess I have to do it manually I’m sure there could be a way to access it if we had the unity source code and transpose the mesh data into an .obj or something. That type of priviledge seems to be off limits for us, proletariates