Double Detection
Here is a little tutorial to make things float. Like a boat on water or a cork in wine.
We will be using a collision detection node and a target tag.
This will be the end result of the tutorial.

Follow up:
Lets get started with a plane animated by a flag deformer or in my case by NICKL (from Jenna).
Then we need two detection "needles" this is a long and thin polygon (orange). Place one needle in front of the boat and one at the back end.

Open the xpresso editor and drop both needles and the animated plane in it.
Connect the sticks and the plane to a collision detection node (put it in distance mode and check deformed points)

I connected the Point1 to a red sphere as to see what I am doing.
Actually we are floating already but I don't like it. The floating movement of the sphere is much to direct.
So the next thing is to use a memory node as to get values from a few frames ago (5 frames or more), I connected this value to the green objects.

The result is a kind of inertia, it gives the impression the boat actually has weight. The longer the memory the heavier the boat.
The final step is tot pass the position value of the back green object to a "boat" null and to "target-tag" this null to the front green object as to get the inclination on the waves.

The model would look something like this.

Hit F8 and enjoy

19 comments
What's up you think?
There is a relation to the density of the mesh, make the sea as low poly as possible and try to make the "sticks" as thin as possible, as to make sure it is hitting only one polygon at a time.
where you say: I connected the Point1 to a red sphere as to see what I am doing.
Actually we are floating already but I don't like it. The floating movement of the sphere is much to direct.
I'm not floating there yet. When i connect the spheres with global position, they just move back to 0. and nothing happens.
Is the boat in a null? Is the boat connected to the sticks or the spheres? are the spheres pre positioned? I would love to see your object manager for this project.
Sorry, i'm pretty new to xpresso and would love to get my head around it, so what's obvious to you is not yet obvious to me...
Is the boat in a null? Is the boat connected to the sticks or the spheres? are the spheres pre positioned? I would love to see your object manager for this project.
Sorry, i'm pretty new to xpresso and would love to get my head around it, so what's obvious to you is not yet obvious to me...
Very nice Tutorial.
I Guess it doesn't work for some of you because your geometry is still parametric. The plane and the stick must be polygonized!
I also have the problem with the jumping of the spheres and i am searching for a solution, because reducing the mesh resolution makes it almost unusable :-/
Looks like the collision-node could use some improvement.
chris
I made a modified version of this tutorial. Instead of using the point-output of the collision-node directly i use the polygon-output and compute the hitpoint myself. This is posible because we know the xz-position of the stick-object and can therefore construct a ray which can intersect the polygon. The file can be downloaded here: http://www.cineplace.de/forum/viewtopic.php?p=509#509
I hope somebody finds it usefull
Chris
thank for you response
anthony
And if you want to do easier stuff try the first tutorials I wrote.
Secondly, I have the same issue as b a s. My spheres snap into the center of the world. Could you please give me any hints or "indications" on what I might be wrong?
Thanks
Morph
I have managed to apply it up to the following point: "Actually we are floating already but I don't like it. The floating movement of the sphere is much to direct".
My spheres are indeed moving and the movement is rough. So i go to the next step to add the memory card. I dont know though how i can define to take the movement from 5 frames earlier. In the memory card, which parameter should i change?
Also should the sphere lags be in polygon mode?
Please provide me woth more specific quidance after the above mentioned point...
thanks!!!