Jump to content

Collision problems on imported fbx mesh


waswart
 Share

Recommended Posts

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:

 

post-8001-0-37132700-1389598549_thumb.jpg

 

If I position the box over an area dense with triangles, the box falls through the mesh, and collision does not work at all:

 

post-8001-0-34085800-1389598511_thumb.jpg

 

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

Link to comment
Share on other sites

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.

tescase.jpg

 

Or you can use LE3 terrain to avoid that problem.

 

I made a terrain using falling cubes and i got LE3 crash ??

testcase2.jpg

 

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

Stop toying and make games

Link to comment
Share on other sites

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 ?

Stop toying and make games

Link to comment
Share on other sites

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.

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

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.

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

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.

  • Upvote 1

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

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.

Stop toying and make games

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...