Digital Art Zone

 
   
1 of 2
1
Metal falls through metal ?
Posted: 13 September 2012 11:03 PM   [ Ignore ]
Member
Rank
Total Posts:  150
Joined  2011-11-01

Hello!
I am experimenting with an animation involving metal objects being pulled towards a magnet.
I have it kinda working. I can drop paper clips onto a ” Metal ” surface and if I place a point force in the magnet
they will bounce towards the magnet. It kinda works. but if I place the clips are on the plane whether it is a cube or a plane, the clips fall through. It doesn’t seem to matter what material I choose for the plane, or the density or friction. Some times when I try it it works, but sometimes if I alter the placement the objects fall through. Is there any way to just make a solid a solid when it comes to physics?
It seems sometimes they just break through.
Thanks
8068

Profile
 
 
Posted: 14 September 2012 03:20 AM   [ Ignore ]   [ # 1 ]
Power Member
Avatar
RankRankRank
Total Posts:  1067
Joined  2007-10-15

Not sure what you’re getting at. Maybe an image or something? Are you just referring to objects not colliding correctly with a flat plane, and instead falling thru?

Profile
 
 
Posted: 14 September 2012 04:33 AM   [ Ignore ]   [ # 2 ]
Power Member
Avatar
RankRankRank
Total Posts:  1825
Joined  2004-08-24

HI 8068 smile

Physics depends on geometry,. so,. if you have a simple “plane” or a Cube “primitive” then the geometry of those objects will be very low.
(Usually two Tri’s in a plane, or in a cube face)
That doesn’t give the physics engine a lot of information to play wit, especially if you’re working with small objects on a plane or cube. so, you’ll get some objects passing through.

Use a Vertex Grid, or Cube, which allows you to determine the definition of the surfaces.

Hope it helps smile

Profile
 
 
Posted: 14 September 2012 04:43 AM   [ Ignore ]   [ # 3 ]
Power Member
Avatar
RankRankRank
Total Posts:  1067
Joined  2007-10-15
3DAGE - 14 September 2012 04:33 AM

  ...if you have a simple “plane” or a Cube “primitive” then the geometry of those objects will be very low.
(Usually two Tri’s in a plane, or in a cube face)

I’m certainly not disagreeing with you, but are you sure about that? The reason I ask is something in the back of my head recalls something about Bullet converting simple planes, etc., to a higher density. Or maybe that was a tweak they made in one of the releases not long ago. Or maybe I’m just mis-remembering. Though it seems to work fine for me with primitive planes, etc. which is why I asked for clarification.

Profile
 
 
Posted: 14 September 2012 05:00 AM   [ Ignore ]   [ # 4 ]
Power Member
Avatar
RankRankRank
Total Posts:  1825
Joined  2004-08-24

Hi Joe smile

You have a Smooth option in Softbody which will calculate the mesh differently depending on the smoothing, but not as far as I’m aware for simple planes or primitives.
However,.. I’ve just done a quick test and it’s working fine for me here, although, it depends on what the scene is, and which version of Carrara.

C6 or C7 will produce different results from C8 with bullet, or the 8.5 beta.

smile

Profile
 
 
Posted: 14 September 2012 05:06 AM   [ Ignore ]   [ # 5 ]
Power Member
Avatar
RankRankRank
Total Posts:  1067
Joined  2007-10-15

What I’m referring to is Bullet doing its own, internal modelling of a simple plane as a denser mesh. My thought is that DAZ might have included an automatic converter-type thing in the Bullet code to take any of the Carrara primitives and convert them internally in Bullet to a dense mesh. Somewhere in the far recesses of my brain I think I saw that somewhere. Or maybe it was another app….

Profile
 
 
Posted: 14 September 2012 05:19 AM   [ Ignore ]   [ # 6 ]
Power Member
Avatar
RankRankRank
Total Posts:  1825
Joined  2004-08-24

It’s certainly possible that I’ve missed that,.. but physics in general tends to opt towards Bounding box simplification, almost like creating a “virtual proxy”, instead of calculating facet on facet collision detection.

If you look closely at a simple Bullet physics sim of a sphere bouncing on a plane, you’ll notice that there can be an Offset, or Gap, between the actual sphere geometry and the Collision / bounce (see pic)

Image Attachments
physics_test.jpg
Profile
 
 
Posted: 14 September 2012 05:34 AM   [ Ignore ]   [ # 7 ]
Power Member
Avatar
RankRankRank
Total Posts:  1067
Joined  2007-10-15
3DAGE - 14 September 2012 05:19 AM

It’s certainly possible that I’ve missed that,.. but physics in general tends to opt towards Bounding box simplification, almost like creating a “virtual proxy”, instead of calculating facet on facet collision detection.

So do you think, with your suggestion of using higher res vertex object instead of a primitive, you’d keep it from using a bounding box simplification? And I thought that the offset, or gap, was just the settable collision distance, to make sure the collision detection has a bit of a buffer for fast moving objects.

Profile
 
 
Posted: 14 September 2012 05:54 AM   [ Ignore ]   [ # 8 ]
Power Member
Avatar
RankRankRank
Total Posts:  1825
Joined  2004-08-24

Increasing the definition has worked for me in the past, not only in bullet, but in other software, despite the Bounding box simplification it gives the physics more information to calculate, so if one edge or corner sinks into an object, then it’s more likely that the next vertex or edge space to detect a collision will cause the physics sim to recalculate the rest of the object and bounce it back out.
Some software actually “Back steps” when mesh penetrations are detected, and recalculates the last few frames (pre collision) to avoid this issue.

You’re right, the collision spacing is adjustable now, but even at it’s lowest level, it’s still using a simplification rather than actual mesh on mesh collision. mostly because it’s faster to calculate, although it can be less accurate.

Profile
 
 
Posted: 14 September 2012 03:31 PM   [ Ignore ]   [ # 9 ]
Power Member
Avatar
RankRankRank
Total Posts:  1067
Joined  2007-10-15
3DAGE - 14 September 2012 05:54 AM

....it’s still using a simplification rather than actual mesh on mesh collision. mostly because it’s faster to calculate, although it can be less accurate.

Hmmm…again, I’m not arguing with you, just trying to understand what you’re saying. If it uses a simplification, and not the actual mesh, then why would increasing the mesh density make any difference?

Profile
 
 
Posted: 15 September 2012 07:12 AM   [ Ignore ]   [ # 10 ]
Power Member
Avatar
RankRankRank
Total Posts:  1825
Joined  2004-08-24

I didn’t write Bullet, so I don’t know why it works that way, but I know from trial and error that by either increasing the mesh resolution, or by adding another surface, (thickness) that the objects won’t fall through it.

Profile
 
 
Posted: 15 September 2012 04:23 PM   [ Ignore ]   [ # 11 ]
Power Member
Avatar
RankRankRank
Total Posts:  1067
Joined  2007-10-15

Right, and I guess that was the point I’m making. It’s really tough (for me anyway) to make definitive statements about how Bullet works, because any information you can find on it is pretty much written for programmers. And unless you can understand what a “voronoi simplex solver for GJK” is, and decode a whole bunch of C++ code and figure out what it’s trying to do, you’re pretty much in the dark. Unless someone has found a simple explanation. I’ve looked, and can’t find anything.

The best I can determine is that it uses a number of algorithms for collision detection, designed for speed and accuracy. I *think* what it does is apply increasingly accurate detection alogorithms as needed. The simple, fast one first, and the slower, more detailed ones afterwards. For example, if you have two spheres heading for each other, and each is 1ft in radius, then you can do a real quick calc to see if the distance between centers is more than 1 + 1 = 2 feet. No need to check individual polygon-to-polygon distances.

Now if you have some object other than a simple sphere, that might not work. So then you have to try and apply some other sort of simplification. And it that doesn’t work, you may have to get down to the poly-to-poly collisions.

And I suppose even that varies by how the DAZ guys have implemented it in the latest release, which algorithms they’ve enabled, how they’re applying the object simplifications, etc.

So I’ve pretty much given up for now trying to understand it, other than an occasional look at some Bullet forums to see what’s going on. Turns out there appears to be an inherent problem with objects resting on collision objects (floor, whatever) getting bouncy and unstable.

Anyway, without more info, it’s tough to make a call on the OP’s problem. Unless it’s something simple like starting the sim with the objects already penetrating each other, in which case it might not be surprising that one falls thru the other.

Profile
 
 
Posted: 16 September 2012 05:52 AM   [ Ignore ]   [ # 12 ]
Power Member
Avatar
RankRankRank
Total Posts:  1825
Joined  2004-08-24

You’re right Joe smile
it’s a big “bounding box” collision detection followed by smaller areas of detection if that big one fails.
the density / resolution of the mesh will effect both the primary, and secondary collision detection, and if there’s more definition in the object, then it should be more accurately simulated.

I just found out in another thread that 8068 is using Carrara 6 Pro, so all of this discussion of bullet is partially irrelevant, since it doesn’t apply to C6 physics.

the problem is more likely to come from the strength of forces in the scene.
Even in Bullet, it’s sometimes more effective to replace the default Scene gravity, with a directional force, so that you can keyframe the strength on and off as required.

Profile
 
 
Posted: 16 September 2012 01:50 PM   [ Ignore ]   [ # 13 ]
Power Member
Avatar
RankRankRank
Total Posts:  1067
Joined  2007-10-15
3DAGE - 16 September 2012 05:52 AM

You’re right Joe smile
it’s a big “bounding box” collision detection followed by smaller areas of detection if that big one fails.
the density / resolution of the mesh will effect both the primary, and secondary collision detection, and if there’s more definition in the object, then it should be more accurately simulated.

How do you know that?

Profile
 
 
Posted: 17 September 2012 01:56 PM   [ Ignore ]   [ # 14 ]
Power Member
Avatar
RankRankRank
Total Posts:  1825
Joined  2004-08-24

Experiments / tests, and hours of failing simulations.

Increasing the mesh density improves the simulation.

If it looks like a Banana, Smells like a Banana, and tastes like a banana ,.. it’s probably not an orange.
smile

Profile
 
 
Posted: 17 September 2012 08:44 PM   [ Ignore ]   [ # 15 ]
Power Member
Avatar
RankRankRank
Total Posts:  1067
Joined  2007-10-15

That’s fine, I’m just trying to determine whether you have some specific knowledge, or you’re just doing the same as the rest of us and experimenting. Because if it’s just experimenting, then you need to keep in mind that, in keeping with your analogy, it may actually be an orange. It depends on a lot of stuff that we may not be aware of, like the shape of the colliding objects, which algorithms are enabled, and a bunch of other stuff. If you did your experiments with spheres, for example, and the OP is talking paper clips, your results may not apply.

I am only trying to caution people here to accept that if you don’t know the answer, it’s best not to act like an expert and make definite statements. Instead, admit the limits of your knowledge instead citing stuff as fact.

Because there’s absolutely no way you can make the pronouncement like this based solely on experiments:

“You’re right Joe…
it’s a big “bounding box” collision detection followed by smaller areas of detection if that big one fails.
the density / resolution of the mesh will effect both the primary, and secondary collision detection, and if there’s more definition in the object, then it should be more accurately simulated.”

And in fact, based on what I’ve read, I think you’re probably mistaken about the mesh resolution affecting the “primary and secondary collision detection”. If you’re just repeating what I said, and deciding “it’s right” without knowing the real answer, it’s a bit misleading. Unless you have the ear of one of the programmers that we don’t know about…  smile

Profile
 
 
   
1 of 2
1