# Interaction between a surface and inner object.

This topic is 3618 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

##### Share on other sites
If I understood right, you mean that the hard inner object is suspended inside the outer soft object? Like a small stone inside jello. (In contrast to a small stone inside a balloon.)

Using a mass-spring system, I would do this by also modeling the actual jello, not just the surface. So you would have the outer surface and a grid of springs and masses inside it. The hard object could then connect to the jello.

Take a look at
http://commons.wikimedia.org/wiki/Image:Finite_element_triangulation.svg
to get an idea of what I mean. If each of the blue lines were a spring and each crossing a small mass, that would behave quite nicely.

Its slower than simulating just the surface, though :).

##### Share on other sites
Your correct in that the hard inner object is 'suspended' inside the outer softer object.

After considering a mass-spring setup as you described (nice picture by the way), i realised that it is not possible to interact with a tetrahedrally meshed system in real-time, which is the main goal of what i'm trying to do. Thats the reason i turned to simulating just two surfaces.

At the moment i'm interested in detecting the whats inside the outer surface (the harder inner surface), given that the two don't actually collide. So possibly shooting rays from the surface.

Any more suggestions?

##### Share on other sites
I think the problem with that approach is determining and maintaining the position of the inner object. If your outer soft surface can deform but the inner lump should somehow stay connected to it, you need a way to model the connection. You need forces that push and pull the lump towards its correct place. Once you have these forces, they should automatically give you the opposing forces affecting the surface.

If the inner and outer objects are both relatively spherical and the lump is near the center, you could get away with something like:
http://www.astrology.com/images/blank_wheel.gif
where the surface is connected to the lump with simple direct springs.
(Sorry about the image, I am at work and can't upload images anywhere, so I need to rely on Google's best hits :P)

You could also try springs that only push the lump away from the surface, but don't care if it is already far enough. Think of the magnetic repulsion effect. The outer surface repels the lump when it gets too close. To adjust the position of the lump, make some of the surface vertex 'magnets' stronger, depending on the desired distance.

Whatever your solution, I'd suggest keeping the physics simple and logical. Magic trickery and imaginary forces usually bring more trouble than they are worth. But get the forces right, and the rest will follow.

##### Share on other sites

The points you raised are actually about determining the force itself which is step 2 of my plan, mentioned in my first post. But i like the repulsion comment and will consider it when i reach that hurdle ;)

One idea, leading from the main problem (of detecting the inner object from the surface) maybe to determine what proportion of the inner object can be felt from the surface and then somehow have this reflected in the response force. But for now detection is definitely the priority. Surely some algorithms or published work can give an insight into the influence of two objects on one another that don't touch, minimum distance?

##### Share on other sites
Quote:
 Original post by chrome68For now i am not concerned at how this force is determined...I am thinking about HOW MUCH of the inner sphere influences this force.

It seems to me that these two problems cannot be separated. If you don't know what causes the force, you can't say how much each part of the inner sphere affects it.

I always try to solve physics simulation problems by digging lower and lower into the underlying logic. Trying to find an abstraction for "roughly spherical deformable surfaces" and "harder lumps inside them" is very difficult, and does not lead to reusable calculations. But if you break it down to the lowest level possible, you often get simple rules that you can use everywhere in your physics engine.

Let's say you have one surface node and one lump node. No springs. What happens when they are close together? How do you define "close"? What determines the optimum distance?

How about a triangle surface with three nodes and three springs and one lump node inside? If the nodes repel the lump, it can still probably escape through the walls. Is it a problem?

Once you have clear solutions to the simplest problems, you can easily build a thousand-node surface with any kind of lump inside it; it will always work.

1. 1
Rutin
24
2. 2
3. 3
JoeJ
20
4. 4
5. 5

• 9
• 46
• 41
• 23
• 13
• ### Forum Statistics

• Total Topics
631746
• Total Posts
3002021
×