Mitovo Posted December 18, 2016 Share Posted December 18, 2016 Hello,So, I decided to test out an in-progress build of a land feature I'm working on, with a quick and ugly texturing job, and I noticed a bug in the terrain system. Maybe it's known about, but I couldn't find anything about it.Basically, the game engine ignores holes in the terrain for character collision, but it seems to work okay for other items; I threw out one of the mines, and it went through the hole as it should. The model is set down into the ground, with the area inside it emptied out, as it would be in an actual scene.I thought maybe it was an issue with my model or something during export, so I did an A/B test... one with the heightmap terrain, and one without it. Without the terrain in the scene, it works fine.Here's a couple short vids demonstrating it...With TerrainWithout TerrainAny idea why that might be happening? Quote Link to comment Share on other sites More sharing options...
LukasPJ Posted December 18, 2016 Share Posted December 18, 2016 Hello,So, I decided to test out an in-progress build of a land feature I'm working on, with a quick and ugly texturing job, and I noticed a bug in the terrain system. Maybe it's known about, but I couldn't find anything about it.Basically, the game engine ignores holes in the terrain for character collision, but it seems to work okay for other items; I threw out one of the mines, and it went through the hole as it should. The model is set down into the ground, with the area inside it emptied out, as it would be in an actual scene.I thought maybe it was an issue with my model or something during export, so I did an A/B test... one with the heightmap terrain, and one without it. Without the terrain in the scene, it works fine.Here's a couple short vids demonstrating it...With TerrainWithout TerrainAny idea why that might be happening? I don't know much about these things, but Player collision is handled differently than all the other stuff's collision (among other things it's a lot more precise I believe), so maybe there is a bug in the Player collision code? Quote Link to comment Share on other sites More sharing options...
RasterRon Posted December 19, 2016 Share Posted December 19, 2016 Hey MiToVo,works ok from here using latest 3.10.. o6OrUZ9f9os also checked with last 2 previous T3D versions and found no issues with it. Are you using visible or collision meshes? Quote Link to comment Share on other sites More sharing options...
Azaezel Posted December 19, 2016 Share Posted December 19, 2016 https://github.com/GarageGames/Torque3D/issues/398 which physics library are you using? the default, PhysX, or Bullet? Quote Link to comment Share on other sites More sharing options...
Duion Posted December 19, 2016 Share Posted December 19, 2016 I had the same issue with using bullet, but it only happens with custom phsyics, the default phsyics worked fine the last time I tested. Quote Link to comment Share on other sites More sharing options...
RasterRon Posted December 19, 2016 Share Posted December 19, 2016 Just got this tested and working with PhysX 2.8 SDK and versions T3D 3.8 and 3.10. I don't see any floating issues so far..rDwe6tAvVXc You should probably post more details about your setup. Quote Link to comment Share on other sites More sharing options...
Duion Posted December 19, 2016 Share Posted December 19, 2016 Then it is with bullet only. Quote Link to comment Share on other sites More sharing options...
Mitovo Posted December 19, 2016 Author Share Posted December 19, 2016 Just got this tested and working with PhysX 2.8 SDK and versions T3D 3.8 and 3.10. I don't see any floating issues so far..rDwe6tAvVXc You should probably post more details about your setup. It looks like you've lowered the terrain at that point, as you have the sandy ground at the bottom of the water/pool.In my case, I've set the terrain to "empty", so there's actually a hole in the ground, which I have my 3D model set into. So, the terrain is visibly not there, but it appears the collision is still being calculated for it. The collision on the 3D model is working fine; I have collision set to "visible mesh" on that. It's only when the terrain is present in the map that it's not working and I'm "running on air".Also, the problem isn't even related to the 3D model. Here's a screenshot I just took where I'm outside that 3D model, on an area I'd just set to "empty", and am getting the same result.http://dl.dropboxusercontent.com/u/53548203/Screenshot%202016-12-19%2015.17.35.pngI don't recall which physics I set it up with, unfortunately. I want to say it's either Torque or Bullet, though. Quote Link to comment Share on other sites More sharing options...
Duion Posted December 19, 2016 Share Posted December 19, 2016 Then check what physics you are using. Quote Link to comment Share on other sites More sharing options...
RasterRon Posted December 19, 2016 Share Posted December 19, 2016 It looks like you've lowered the terrain at that point, as you have the sandy ground at the bottom of the water/pool.In my case, I've set the terrain to "empty", so there's actually a hole in the ground, which I have my 3D model set into. So, the terrain is visibly not there, but it appears the collision is still being calculated for it. The collision on the 3D model is working fine; I have collision set to "visible mesh" on that. It's only when the terrain is present in the map that it's not working and I'm "running on air". Ok got it. So here's the terrain with a hole cut through it, not lowered and still don't see any issues. I also have placed another terrain below it.cfYPK1B31i4 I could post or send the binary files if you would like to test them out. Quote Link to comment Share on other sites More sharing options...
Mitovo Posted December 19, 2016 Author Share Posted December 19, 2016 For those asking,I'm using Bullet Physics, and OpenGL rendering, and I'm using 3.8 (can't seem to get 3.9 to work right).But really, should the physics version really matter? I'd imagine the terrain system would be programmed to recognize when a part of its surface has been set to "empty", regardless. Quote Link to comment Share on other sites More sharing options...
RasterRon Posted December 20, 2016 Share Posted December 20, 2016 I'm using Bullet Physics, and OpenGL rendering, and I'm using 3.8 (can't seem to get 3.9 to work right). Great, looks like it is Bullet specific as Duion also reported. I tested the same floating result with 3.8. Quote Link to comment Share on other sites More sharing options...
Timmy Posted December 20, 2016 Share Posted December 20, 2016 So peeps know this is a bullet only thing, i believe @JeffR is chucking up a fix soonish, if he doesn't get the time or whatever i'll chuck up the fix. Quote Link to comment Share on other sites More sharing options...
JeffR Posted December 20, 2016 Share Posted December 20, 2016 Hey guys, try this and test 'er out. Seemed like it worked for me.https://github.com/GarageGames/Torque3D/pull/1876.Credit goes to @Lopuska from his PhysicsGMKRefactor work, and Az and Timmy for remembering about it ;) For those asking,But really, should the physics version really matter? I'd imagine the terrain system would be programmed to recognize when a part of its surface has been set to "empty", regardless. The setup passes through the physics abstraction layer on to the physics library in question. The issue was that the abstraction part didn't properly translate the holes in such a way for bullet to know about all that. the stock and physx stuff happened to. The above code change should make bullet properly aware of holes in the terrain, so give it a shot and let me know :) Quote Link to comment Share on other sites More sharing options...
RasterRon Posted December 20, 2016 Share Posted December 20, 2016 Awesome, working great now! :) Quote Link to comment Share on other sites More sharing options...
Mitovo Posted December 20, 2016 Author Share Posted December 20, 2016 Well that's a first. I actually posted something useful!:pI'll have to check it out later after work.Thanks! Quote 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.