waswart Posted January 13, 2014 Share Posted January 13, 2014 Hi, I imported a .fbx mesh originally created in Blender, and in Leadwerks created an accompanying .phy file (Polymesh), with collision set to Scene. Created a box with collision set to Prop. As per attached images: When I position the box over an area sparse with triangles, the collision works as expected: If I position the box over an area dense with triangles, the box falls through the mesh, and collision does not work at all: I initially could not understand why collision was sometimes working, sometimes not, and eventually could reproduce the problem consistently. Any thoughts would be appreciated. Thanks Quote Link to comment Share on other sites More sharing options...
Josh Posted January 13, 2014 Share Posted January 13, 2014 Please post your files. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
waswart Posted January 14, 2014 Author Share Posted January 14, 2014 Please find attached. Thanks Testcase.zip Quote Link to comment Share on other sites More sharing options...
YouGroove Posted January 18, 2014 Share Posted January 18, 2014 I tested several case and confirm the bug : solid go trhough mesh where there is more polygons. In fact LE3 don't work for collision against planes also, a volume will pass throught planes. You would need to make not a plane, but a volume like a big cube having the top face detailled and sculpted, it should work this way. Or you can use LE3 terrain to avoid that problem. I made a terrain using falling cubes and i got LE3 crash ?? I joined my crashing map, just dezip it to a new LE3 project , just run project. Important : This is LE 3.0 test, not 3.1 test. Or more simple , create a level with terrain, make a cube or cylinder with a mass flying above terrain, nad run the project start.zip Quote Stop toying and make games Link to comment Share on other sites More sharing options...
YouGroove Posted January 21, 2014 Share Posted January 21, 2014 In fact this bug seems similar to one i had : http://www.leadwerks.com/werkspace/topic/7874-model-collision-bug/ I would like to see if it is Newton 3 related or LE3 or other problem ? Quote Stop toying and make games Link to comment Share on other sites More sharing options...
waswart Posted January 23, 2014 Author Share Posted January 23, 2014 On the 3.1 Indie Edition for Steam I don't get any collisions (no collisions on both flat and sloped areas) although Show Physics indicates there should be at least collisions on the flat areas: Quote Link to comment Share on other sites More sharing options...
YouGroove Posted January 23, 2014 Share Posted January 23, 2014 Could you post the file or it is the same models test ? Quote Stop toying and make games Link to comment Share on other sites More sharing options...
waswart Posted January 23, 2014 Author Share Posted January 23, 2014 It uses the same .fbx Quote Link to comment Share on other sites More sharing options...
YouGroove Posted January 23, 2014 Share Posted January 23, 2014 I remade a test wit ha cube on areas where collision worked, i mean with less polygon density. And yes in 3.1 the cube passes through with no collision. In fact Newton physics doin't seem to work with planes style objects, and there is serious bugs like no collision with simple models or simple cube collision tests that could make it also can't work for what you want to do unfortunatelly. What was your test ? a simple test ? or did you had a game project behind ? Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Josh Posted January 23, 2014 Share Posted January 23, 2014 Okay, I have the model now and the first thing I notice is picking doesn't work outside a certain range. The model is scaled to 1000,1000,1000, which is quite large. It could cause floating point problems, but nothing to this degree. It is not terribly surprising that such an unusual case would have problems with picking and scaling, but it is still a bug. This extreme case just reveals a problem that doesn't come up at lower scales. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted January 23, 2014 Share Posted January 23, 2014 Okay, further testing indicates that the small triangles are not pickable, while the large triangles are. This is consistent with the collision behavior you described. So it appears the mesh has triangles too small and the physics build process discards these triangles based on a floating point threshold. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Josh Posted January 23, 2014 Share Posted January 23, 2014 There is another technique I can use to build the physics meshes but I don't want to invest time in changing that when there are more critical issues to focus on. At this time my official explanation is triangles cannot be below a certain threshold in size or they will be discarded in physics and picking. The solution is the scale up the vertices in your modeling program. Note this has nothing to do with the scale of the model, AFAICT. I'm moving this to suggestions because it naturally leads to the suggestion to handle all triangles regardless of size. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
YouGroove Posted January 23, 2014 Share Posted January 23, 2014 I just tested in another 3D engine. In fact the mesh surface model is really tiny compared to standard characte rsize. I put mesh collision and the character could work on it without any collision problem. LE3 will need to improve with any Mesh/triangle size like this one it should work and not be so much restrictive. Quote Stop toying and make games Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.