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

19 comments

Comment from: Subuddhi [Visitor]
Thanx Base, interesting thing, but could you attach a demo file? I meant .c4d ))))
2005-10-27 @ 11:14
Comment from: base80 [Member] Email
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 (€).
2005-10-27 @ 11:25
Comment from: JoeLafrite [Visitor]
Hi Base, great ! Do you want to marry me ?
2005-10-30 @ 01:37
Comment from: Didier [Visitor]
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.
2005-11-01 @ 14:39
Comment from: Papain [Visitor] · http://www.gillespapain.com
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 !
2005-11-09 @ 22:09
Comment from: Nimpsy [Visitor] · http://nimpsy.com
I get wobbly movement in my animation, my spheres wobble and so does my boat.
What's up you think?
2005-11-23 @ 20:08
Comment from: base80 [Member] Email
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.
2005-11-23 @ 22:27
Comment from: b a s [Visitor]
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...
2006-02-17 @ 10:36
Comment from: base80 [Member] Email
bas I mailed you some indications
2006-02-17 @ 12:27
Comment from: flavio [Visitor]
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...

2006-05-09 @ 21:19
Comment from: macsupremacist [Visitor]
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?
2006-05-28 @ 07:48
Comment from: christianS [Visitor]
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
2006-06-05 @ 18:35
Comment from: christianS [Visitor]
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
2006-06-05 @ 23:29
Comment from: anthony [Visitor]
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
2006-07-14 @ 10:29
Comment from: base80 [Member] Email
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.
2006-07-14 @ 12:26
Comment from: Thomas Nordén [Visitor] · http://www.thomasnorden.com
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?
2006-09-27 @ 11:35
Comment from: Morpheus [Visitor]
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
2006-11-11 @ 02:02
Comment from: Edalma [Visitor]
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!!!

2008-09-27 @ 15:06
Comment from: base80 [Member] Email
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)
2008-09-30 @ 20:49

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)