Igor_de Posted September 12, 2012 Share Posted September 12, 2012 Hi, I'm trying to create a route2D and app crashes. Reproduced on the world samples/path/mesh00, just unzip in "samples/path/" and uncomment lines. Call stack application attached. Used Unigine source SDK-2012-09-07.paths.zip Link to comment
frustum Posted September 12, 2012 Share Posted September 12, 2012 Please patch the source/engine/game/navigations/NavigationMesh.cpp file at 1399 line: from: // nodes node->nodes.resize(nodes.size()); node->npolygons.resize(npolygons.size()); Math::memcpy(node->nodes.get(),nodes.get(),sizeof(Node) * nodes.size()); Math::memcpy(node->npolygons.get(),npolygons.get(),sizeof(int) * npolygons.size()); to: // nodes node->nodes.resize(nodes.size()); Math::memcpy(node->nodes.get(),nodes.get(),sizeof(Node) * nodes.size()); // node polygons node->npolygons.resize(npolygons.size()); for(int i = 0; i < npolygons.size(); i++) { node->npolygons[i] = node->polygons.get() + (int)(npolygons[i] - polygons.get()); } And change 38 line at your sample: add_editor(node); // engine.editor.addNode(node); Link to comment
Igor_de Posted September 12, 2012 Author Share Posted September 12, 2012 Thank. Now works correctly. Link to comment
craig.biggs_ Posted October 2, 2012 Share Posted October 2, 2012 For users who don't have a source version of the SDK, when is a patched binary version going to be available/new SDK available with this fix in it? This crash is currently blocking our development. Link to comment
manguste Posted October 4, 2012 Share Posted October 4, 2012 ETA is in a week or around so. Link to comment
binstream Posted October 4, 2012 Share Posted October 4, 2012 We can also suggest upgrade to the full source SDK so we'll be able to send you hotfixes faster. Moreover you'll get more control over the technology, if you need some deep modifications. Link to comment
Igor_de Posted June 10, 2013 Author Share Posted June 10, 2013 In SDK-2013-06-07, same problem, can not create path and app crash when reload world. In another scene, path finded but Z = -5 in path point always. Link to comment
silent Posted June 10, 2013 Share Posted June 10, 2013 Hi, Could you please provide simple test scene? I've tried to reproduce such behavior on test scene from first post, but wolrd_reload command is working fine. Please, check the attached zip file. Thanks! path_updated.zip How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Igor_de Posted June 10, 2013 Author Share Posted June 10, 2013 On path_updated can not reproduce. Download and install https://developer.unigine.com/fileserver/download/sdk/UnigineSDK_source_2013-06-07_windows.exe , download first attachment and extract without replace files in sub dirs: common, meshes, nodes. What about "PathRoute failed"? Link to comment
silent Posted June 10, 2013 Share Posted June 10, 2013 I've tried your sample and my updated sample on the old SDK version (2012-10-19, with NavigationMesh.cpp fix) and I get "PathRoute failed" here too. Path updated sample is the same sample, but with edited mesh_00.cpp file on line 38: I've replaced engine.editor.addNode(node); to add_editor(node). How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Igor_de Posted June 10, 2013 Author Share Posted June 10, 2013 Ok, add_editor is my mistake. About Z = -5, "This upload failed" so check mesh_00.cpp in post. Result: p0 inside:1 p1 inside:1 point0: 68.09 77.45 -5.00 point1: 69.42 85.92 -5.00 #include <samples/paths/common/paths.h> Navigation navigations[0]; Vec3 offset = Vec3(0.0f,0.0f,0.0f); void update_scene() { engine.world.updateSpatial(); PathRoute route = new PathRoute(0.5f); // Vec3 p0 = Vec3(0.0f,6.0f,26.5f) + offset; // Vec3 p1 = Vec3(9.25f,4.36f,26.5f) + offset; Vec3 p0 = Vec3(68.09, 77.45, 3.86) + offset; Vec3 p1 = Vec3(69.42, 85.92, 3.86) + offset; log.message("update scene\n"); while(1) { foreach(Navigation n; navigations) { n.renderVisualizer(); engine.message(" p0 inside:%i",n.inside2D(p0, 1.0f)); engine.message(" p1 inside:%i",n.inside2D(p1, 1.0f)); } route.create2D(p0,p1); if(route.isReached()) { route.renderVisualizer(vec4_one); forloop(int i = 0; route.getNumPoints()) { vec3 point = route.getPoint(i); log.message("point%i: %.2f %.2f %.2f\n", i, point.x, point.y, point.z); } } else { engine.message("PathRoute failed\n"); } wait; } } void create_scene() { Node node = node_cast(node_append(engine.world.loadNode("samples/paths/nodes/terra_test.n"))); node.setPosition(vec3(0.0f,0.0f,0.0f)); int index = node.findChild("navigation_mesh"); assert(index != -1); NavigationMesh navigation = node_cast(node.getChild(index)); add_editor(node); //engine.editor.addNode(node); navigations.append(navigation); return "PathRoute2D in single NavigationMesh"; } Link to comment
silent Posted June 10, 2013 Share Posted June 10, 2013 Great, thanks! I've passed this information to the developers. How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
silent Posted June 11, 2013 Share Posted June 11, 2013 Hi, Your mesh minimum Z coordinate is -5, maximum +5, so as a result if you trying to navigate on this mesh on it's bottom side you will get Z = -5, on top side you will get Z = 5. This behavior is absolutely correct. Also, this behavior is absolutely identical to the old SDK version (2012-10-19, with NavigationMesh.cpp fix). Thanks! How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
Igor_de Posted June 11, 2013 Author Share Posted June 11, 2013 Destination point Vec3(69.42, 85.92, 3.86), why -5 is correct? After update meshes and nodes on test scene all finding good, but on work world other behavior. I will try to reproduce the test scene. Link to comment
frustum Posted June 11, 2013 Share Posted June 11, 2013 This is 2D navigation on mesh. Link to comment
Igor_de Posted June 11, 2013 Author Share Posted June 11, 2013 Add offset(0, 0, 0.1) to points when create2D path, and got the desired behavior. Link to comment
Recommended Posts