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.
double-detection by base80

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.
double-detection
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)
double-detection
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.
double-detection
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.
double-detection
The model would look something like this.
double-detection
Hit F8 and enjoy
double-detection by base80


23 comments

Comment from: Subuddhi [Visitor] : 2005-10-27 @ 11:14
Thanx Base, interesting thing, but could you attach a demo file? I meant .c4d ))))
Comment from: base80 [Member] Email : 2005-10-27 @ 11:25
As this is a fairly strait forward xpresso I will not provide a sample model. The purpose of this site is to show possibilities of cinema4d and xpresso but not to do the work for you. If however one would like to get files or set-ups I am open to any suggestion (€).
Comment from: JoeLafrite [Visitor] : 2005-10-30 @ 01:37
Hi Base, great ! Do you want to marry me ?
Comment from: Didier [Visitor] : 2005-11-01 @ 14:39
J'ai testé. Je n'ai pas pu suivre le tut par manque d'info. Je ne connais pas bien C4D et je souhaitais découvrir l'outil Xpresso, mais là, ça manque singulièrement de détails. Une personne qui connais suffisamment l'outil n'a probablement pas besoin de lire ce tut, et ceux qui ne le connaissent pas assez ne peuvent pas l'utiliser ! Il faut choisir dans la vie, ou on instruit ou on montre juste qu'on sait faire pour pouvoir le vendre.
Comment from: Papain [Visitor] · http://www.gillespapain.com : 2005-11-09 @ 22:09
Salut Didier ! Je te trouve un "peu" dur !!!! Apres tout, tu t'es posé la question : Pourquoi ce type (si tu penses qu'il n'est là QUE pour vendre ses Expresso) dévoile une partie de ce qu'il sait ?? Peut-être pour te donner l'envie de découvrir par toi-même... C'est un trop facile de l'accuser sous prétexte que son tut est trop compliqué pour toi. Je te décomplexe tout de suite, perso, je n'y pige RIEN, mais je vais pas lui faire un proces : je vais juste LIRE LA DOC... Merci Base !
Comment from: Nimpsy [Visitor] · http://nimpsy.com : 2005-11-23 @ 20:08
I get wobbly movement in my animation, my spheres wobble and so does my boat.
What's up you think?
Comment from: base80 [Member] Email : 2005-11-23 @ 22:27
This is common on this setup and actually my setup doesn't solve the problem.
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.
Comment from: b a s [Visitor] : 2006-02-17 @ 10:36
Great site! just found it. This is the first tut i'm doing but i have the feeling you skipped a bit?

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...
Comment from: base80 [Member] Email : 2006-02-17 @ 12:27
bas I mailed you some indications
Comment from: flavio [Visitor] : 2006-05-09 @ 21:19
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...

Comment from: macsupremacist [Visitor] : 2006-05-28 @ 07:48
I seem to be having the same problems as everyone else. I do everything up to the spheres, but my spheres return to the origin and don't move with the rest of the scene. What have you been telling everyone else who had this problem?
Comment from: christianS [Visitor] : 2006-06-05 @ 18:35
Hey

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
Comment from: christianS [Visitor] : 2006-06-05 @ 23:29
Hey

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
Comment from: anthony [Visitor] : 2006-07-14 @ 10:29
Hey, thank you for your knowledge and this object flooting tutorial. But I can't get it to work. I feel like I am missing some steps. Is there a tutorial, beginner like to work me up to the this one.

thank for you response

anthony
Comment from: base80 [Member] Email : 2006-07-14 @ 12:26
In the comments there are some clues to solve this tutorial.

And if you want to do easier stuff try the first tutorials I wrote.
Comment from: Thomas Nordén [Visitor] · http://www.thomasnorden.com : 2006-09-27 @ 11:35
Base80... first of all, what a great resource your page is! Truly super.

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?
Comment from: Morpheus [Visitor] : 2006-11-11 @ 02:02
Hi Base80, I was wondering if this sort of setup could be used in the following way. (this is a simpler version of what I want to do) I have two cubes with align to spline tags (straight spline) and I want the second one to repel the first one when they hit each other or get to a specific distance between each other, and vice versa. I have a scene file of where I have got up to at the moment, but I don't know how to post it so maybe you could have a look. I have posted in on C4D cafe if you browse round that?

Thanks

Morph
Comment from: Edalma [Visitor] : 2008-09-27 @ 15:06
Hallo, i have just found this tutorial and i find very handy since i would like to animate a boat to waves.

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!!!

Comment from: base80 [Member] Email : 2008-09-30 @ 20:49
Set the Memory node to 5 and use the output value. Actually the Cinema4d Help is very helpful on this specific node, much more than me at this time ( I would have to look it up myself)
Comment from: Free Hypnosis CDs [Visitor] · http://www.RawHypnosis.com : 2010-01-07 @ 10:59
This is really cool. Thanks.
Comment from: Synwave [Visitor] : 2010-02-17 @ 23:58
Should be a good tut when you finish it.
Comment from: Au Kun [Visitor] Email : 2010-02-28 @ 17:24
Hi, I enjoy most of your tutorial and I appreciate your generosity (as many of us probably do).
I tryed to apply your Xpresso : Double Detection, but I beleive I miss some information…
To what object is the Xpresso applyed?
Is the Sphere a Child of the Pole?
Could the Sphere be replaced by a Null Objet (into witch another object could be placed?)…
So many questions you say! Well, that' how learning is : we start from zero and try to grab information and make sense out of it.
You probably receive many requests such as mine… But if you take a few moments to clarify my «darkness», I will be gratefull, which I am, anyhow ;-)
You do a great job, helping «illeterates» such as me (63 years old and still trying to learn and understand!) ;-)
Comment from: Chechuga [Visitor] : 2010-06-24 @ 10:16
*****
Thank you very much for all your tutoriales Base...

They are of great help for my...
But this one resists me.

I manage to set to float both spheres, but always they place in the limits of the plane, and I can´t put in they place on, and to simulate the effect of floating that you obtain your.

That I am doing badly?

It has turned into a challenge, and I go several days turning him.

Helpme

Sorry for the translation,

Regards

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
PoorExcellent
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
This is a captcha-picture. It is used to prevent mass-access by robots.
Please enter the characters from the image above. (case insensitive)