PDA

View Full Version : Help with collision "sticky" object



medicalart
01-12-2008, 12:01 AM
Not sure at all how to do this.

One long object (rectangle) moves slowly across the scene. I need to have a number of spheres fly one at a time toward the moving rectangle and stick to it. The rectangle keeps moving with the new "passengers" attached.

Would you use hardfx for this?
Any suggestions appreciated.

evenflcw
01-12-2008, 01:50 AM
How many are a number?

Some alternatives:

* have clones parented to the rectangle and fade them in while you fade the mobile ones out on impact.

* parent nulls to the rectangle and via modifier or expression blend each of the mobile ones to the nulls positions on impact. You could also use Parenter or Dynamic Parent motion modifier or whatever it's name is. Proton made a video of it long ago I think.

Only if I already knew of a solution or there were alot of items to deal with would I resort to dynamics.

serge
01-12-2008, 04:59 AM
Another alternative: play the animation in reverse. So, create the rectangle with the spheres attached, move the spheres away from the rectangle, and play that in reverse.

medicalart
01-12-2008, 08:44 AM
There's going to be 40 or 50 spheres. I was looking around for a "Dynamic Parent" solution--seems the most straightforward. Having the spheres land on the surface at assigned places. I looked through a list of Proton's videos before posting but didn't see something like that. (Will keep looking...)

Serge's suggestion of playing in reverse: How would I just have certain objects play in reverse? Use the graph editor for that? (I can't play the whole scene in reverse because of nearby motion.)

Thanks.

medicalart
01-12-2008, 01:20 PM
Dynamic parent works pretty well. If anyone knows where Proton's tutorial is, please post.(I can't seem to find it.)

Also, found an old discussion about using Hardfx and collision to accomplish this. (Originally Posted by metallo "... seems the "stick" mode isn't as good as bounce..." I'll play around with this today, but if anyone has pointers using Hardfx that would be greatly appreciated.

serge
01-12-2008, 01:42 PM
How would I just have certain objects play in reverse? Use the graph editor for that? (I can't play the whole scene in reverse because of nearby motion.)
I don't know if it's possible with the graph editor. You can do it with ClothFX, although it's a bit tedious with so many objects.

For every object you need to do the following steps:

--> After you've made the animation create an mdd file for the object. Do this by adding ClothFX. Under "ClothFX > File" click "Scan Motion". This will create the mdd file.
--> Delete all the keyframes related to the object.
--> Under "ClothFX > File" set Playback Mode to Local. Set speed to -100% (so it plays backwards). Set Shift frames to the number of frames the mdd has (so it starts playing at the end of the mdd).

medicalart
01-12-2008, 01:50 PM
Interesting approach. Thanks for posting.

evenflcw
01-12-2008, 02:03 PM
Is each sphere it's own object? Are they all the same, unique or randomised? In any case you could try to animate via particleFX and FX_link the spheres.

Do you have several spheres per layer and animate them as parts? Then you could displace points and hardLink.

I'm really just wondering if you are taking the full spheres into the dynamics calculations when probably only a point per sphere would suffice and calculate much faster. Later you could transform/displace the sphere to these points using fx_link/hardLink.

medicalart
01-12-2008, 02:14 PM
They're almost spherical, and randomized slightly to show some variety--but I'd sacrifice that for a good motion solution. I'm not familiar with hardlink, fxlinker and particle FX (I have read a little bit about them and watched a simple video, but I don't know enough to envision a solution) These are good leads, though. Thanks.

serge
01-12-2008, 04:07 PM
...In any case you could try to animate via particleFX and FX_link the spheres.
Yes, and besides calculation time particles also seem to act much better than HardFX objects when is comes to collisions. Particles will stick pretty well onto an object when the Friction Power (of the collision object) is very high. (It doesn't seem to matter much whether the mode is set to "bounce" or "stick".)

Medicalart, what about the movement of the spheres. Do I understand correctly that the spheres are floating (moving?) in space, and when the rectangle passes them they're getting attracted towards it, like gravity?

walfridson
01-12-2008, 04:43 PM
Well, I thought a collision object (attracting by using wind) set to sticky would solve it. No, can't get the particles to stick! Going crazy here.

edit. oh :) forgot to press calculate. In realtime it just dont work.

medicalart
01-12-2008, 06:09 PM
Medicalart, what about the movement of the spheres. Do I understand correctly that the spheres are floating (moving?) in space, and when the rectangle passes them they're getting attracted towards it, like gravity?

I picture the spheres aiming for targets on the rectangle, but your description is fine, too. If the rectangle "attracts" the spheres, that may look more interesting.

evenflcw
01-12-2008, 07:59 PM
Dynamic parent works pretty well. If anyone knows where Proton's tutorial is, please post.(I can't seem to find it.)

ftp://ftp.newtek.com/pub/LightWave/Tutorials/Vidz/p2_web.mov

medicalart
01-12-2008, 08:07 PM
Super. Thanks for posting that Evenflcw! Proton's videos always get right to the point.

Mr Rid
01-12-2008, 08:44 PM
I would just use particles. Either make the spheres with HV or use FX linker to attach sphere objects to particles (is easy, dont need a tutorial, check the manual). Set the rectangle Collision to attract with appropriate radius, and have a clone of the rectangle (Unseen) set to to 'stick' or BOunce with high fix power may work... something like this-
http://www.box.net/shared/static/5fqsftydcw.mov

Make your particle size the same size as your sphere objects (enable Show Size under Particle tab) so they collide edge for edge.

medicalart
01-12-2008, 08:54 PM
Looks good.

serge
01-13-2008, 09:08 AM
... something like this-
http://www.box.net/shared/static/5fqsftydcw.mov...
Mr Rid, why are those particles being attracted by the vertices of the bottom object (and not by it's pivot point)?

adamredwoods
01-16-2008, 07:05 PM
That's how particles math works, is by locations of vertices. It's the least computational. So Attaction or Repulsion will get it's data from the vertices.

My vote would be for particles, then Dynamic Linker for the objects.

serge
01-17-2008, 08:00 AM
That's how particles math works, is by locations of vertices. It's the least computational. So Attaction or Repulsion will get it's data from the vertices.
Adam, I don't understand. When I have a particle emitter and I set its Motion Target to a certain object, then the particles are being pulled towards the pivotpoint of that object and not towards its vertices.
But I'm guessing we're talking about different scene setups here. How would I set up the scene so that the particles are pulled towards the objects vertices (as shown in Mr Rid's movie)?

adamredwoods
01-17-2008, 12:08 PM
When I have a particle emitter and I set its Motion Target to a certain object, then the particles are being pulled towards the pivotpoint of that object and not towards its vertices.

opps! Good catch, I am sadly mistaken.

Yes, the PIVOT POINT is the easiest computational point to attract towards. I'm not sure how Mr.Rid got those particles to attract towards vertices, unless he played it in reverse. (Emit->vertices)

EDIT:
Oh, wait, I see his explanation. He setup another object to attract, then used the "Attract" collision object in it's path.

I've attached a screenshot.

serge
01-17-2008, 01:09 PM
Thanks, Adam! :)