A new version of Cineversity has been launched. This legacy site and its tutorials will remain accessible for a limited transition period

Visit the New Cineversity
   
 
tangent of a spline (spline node)
Posted: 01 July 2014 01:41 PM   [ Ignore ]  
Total Posts:  13
Joined  2008-02-08

Hello,

I would like to send the tangent information of a spline (for all its points) to the velocity of some TP. 
(In order to make some cross product)

I can’t find a way to iterate through the offset to get the tangent for all points and not for only the first one (default offset value I guess).

Many thanx

Jérôme

Profile
 
 
Posted: 01 July 2014 02:24 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Jérôme,

There is no option with the XPresso nodes to go to the vertices only of a spline and get the tangent. Perhaps “points” in your requests, means all points (positions) that you decide to use have and not the points you find in the structure manager.

I will use the term vertices in the following for the “real” points—as listed in the structure manager, to avoid confusion.

If iteration is the problem and you like to have the information for, e.g., an x-number of positions (independent of the vertices), the iteration node will do just fine. The Iteration can count only in integer. This leaves us for a 100% value, to set the iteration to 0-100 and divide this iteration by 100, to get the 0-1 value for the offset.
The Spline Node will allow for Tangent (Vector) information.

Other than that, if the vertices are the main interest, you might set up a rail and position an object on the spline, or better on its vertices and have it target an object on the rail, then take the object information.

All the best

Sassi

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 01 July 2014 02:49 PM   [ Ignore ]   [ # 2 ]  
Total Posts:  13
Joined  2008-02-08

Thanx a lot Dr. Sassi,

But it doesn’t seem to work, (I tried your first solution) I just connected an iterator node (from 0 to 100), divided the result by 100 and plugged this into the offset of a spline node, then printed to console the tangent port and I just get one tangent value. I guess I am doing something wrong.

Best regards

Jérôme

Profile
 
 
Posted: 01 July 2014 02:55 PM   [ Ignore ]   [ # 3 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Have a look to the attached file, Jérôme.

I think it shows that it works. I used only 50 objects to keep the file size small.

Move the spline for a test.

All the best

Sassi

File Attachments
CV2_r15_drs_14_XPit_01.c4d.zip  (File Size: 40KB - Downloads: 134)
 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 01 July 2014 03:08 PM   [ Ignore ]   [ # 4 ]  
Total Posts:  13
Joined  2008-02-08

Thanx again,

It is working of course, in fact I was trying to get the tangent data and send them to the velocity of a TP group which just doesn’t work, it returns errors everywhere.

Is there a way to achieve this ?

Thanx a lot

Jérôme

Profile
 
 
Posted: 01 July 2014 03:14 PM   [ Ignore ]   [ # 5 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

The iteration works per frame, one time through, then the next frame again.

So, how is that working in your scene with the particles? You use the Born-Number? How do you sync this. If you like a progression over time, perhaps use the Time node set to “frames” (with a math node) and use that as iteration instead.

I have the feeling we fix here something in the middle, instead of starting fresh and leave all steps done so far out. Sounds like a plan?

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 01 July 2014 03:49 PM   [ Ignore ]   [ # 6 ]  
Total Posts:  13
Joined  2008-02-08

I guess it is all wrong but I just tried to get the tangent info from the set up you explained and plugged it into the velocity of a TPgroup via a Psetdata.

I thought the vectors generated would just ‘push’ the particles.

Here is a scene.

Many thanx for helping, I really appreciate.

Jérôme

File Attachments
iterator_spline.c4d.zip  (File Size: 71KB - Downloads: 126)
Profile
 
 
Posted: 01 July 2014 04:50 PM   [ Ignore ]   [ # 7 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Thanks, I love to start from the beginning of a problem.
I hope I got your idea. But it needs some adjustments ;o)

Have a look into the Iteration-node, I have set it to “TP Particle”
I converted the Tangent to a Matrix.

I think the rest is clear. Animate the spline heavily to test the result!

Do yourself a favor (You might do that already…) and try to avoid working with the Particle group “All”, and as a side note, to keep the hierarchy in the X_manager chronologically is not a must do, but certainly the best way to get clean results.

File Attachments
CV2_r15_drs_14_TPtg_01.c4d.zip  (File Size: 40KB - Downloads: 137)
 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 01 July 2014 05:06 PM   [ Ignore ]   [ # 8 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Perhaps the next question could be, how to set up the Particle count, or how to limit the Particles to one per position? Maybe both?

Have a look into the file and click one time on the XP_TP >Attribute Manager>User Data (press play to see the effect)

File Attachments
CV2_r15_drs_14_TPtg_11.c4d.zip  (File Size: 34KB - Downloads: 120)
 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 01 July 2014 07:27 PM   [ Ignore ]   [ # 9 ]  
Total Posts:  13
Joined  2008-02-08

Really nice, thanx for all these precious informations.
I really didn’t know about the X manager hierarchy.

What exactly prevents us from driving directly particles with those tangent vectors ?

thank you

Profile
 
 
Posted: 01 July 2014 08:07 PM   [ Ignore ]   [ # 10 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

You’re welcome, Jérôme.

“What exactly prevents us from driving directly particles with those tangent vectors ?”
There is certainly some use, but this was the fastest way (AFAIK) to get what you have asked for.
Information that is given to all particles will perhaps lead to some surprises, e.g., if the position is the same, it might look like as if there is only one particle left in the scene.

Changing the existing and working information of Particles:
Particles and information needs to have a synchronized flow, otherwise nothing or the wrong stuff will happen. If you can’t address the information to the individual paarticle, then: nothing is in sync.
The best way to do that, would be in “Channels”. Perhaps you might request a tutorial series about.

Good luck

Sassi

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 02 July 2014 04:35 AM   [ Ignore ]   [ # 11 ]  
Total Posts:  13
Joined  2008-02-08

I see, I guess thanks to you I am finaly understanding the “flow” of information in the Xpresso set up.

It does work when you do a simple subtraction between the particle positionS and a single position of a null for example, but if I understand it well, it is because this just build vectors between all particles and one point in space, so there is no confusion about what particle position should be taken in count in order to be subtracted to the null position.

So I would need some kind of attribute that tells the particles to be linked to a specific tangent (then influenced by) ? (like in Houdini if you know this software)
It could be related to the ‘nearest tangent’ I guess ?

Many many thanx, I learned a lot, as usually with your tutorials and advices.

Profile
 
 
Posted: 02 July 2014 11:22 AM   [ Ignore ]   [ # 12 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Thank you very much, Jérôme.

You seems to absorb information easily and produce knowledge with it. Which leads me to suggest the “Thinking Particles Presets Library Version 3”.  I believe that exploring those will deepen your idea what is possible and I’m certain you will go beyond that.
http://www.maxon.net/support/materials-goodies.html

Yes, I’m aware of Houdini. I wouldn’t say I know it, I took only a few courses over at FXPHD about. Given that I have only a “handful” of applications in use over two decades for my productions (many went EOL since), which means I know them like breathing, I do not consider newer applications in that way, even if I would like to :o) To know is relative, so I’m under the illusion to know Houdini, this would be the most accurate about it what I can say ;o)
BUT, you might have seen this announcement already, if you know Houdini very well, then this will be certainly great for your workflow: (At least I’m excited about this “bridge”!)
http://www.maxon.net/en/news/press-releases/singleview/article/maxon-announces-partnership-with-side-effects-software.html

“Some kind of Attribute…” in channels (Thinking Particles Settings..>Channels.) There you can add information for the individual particle, but always for the whole “family”, everyone is fed with individual information, it is not possible to just pick out a single one.
Yes, as I mentioned it often, it is certainly all about the flow of information, as each software interface is just a comfortable way to translate our way of thinking into machine language, 3D is after all for the computer just a massive formula/algorithm, or just a binary code, nothing that we code use for communication. But the more we provide a nice flow of information, things might be easier to achieve—on both sides.

Have a good one

Sassi

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 02 July 2014 12:02 PM   [ Ignore ]   [ # 13 ]  
Total Posts:  13
Joined  2008-02-08

Yes, of course this announcement is incredible, being able to build assets in Houdini and use them in C4D is just a dream came true.
I am not proficient with Houdini either but I love this software too.
Our little studio tries to fight with those 2 magic weapons that are C4D and Houdini, (since XSI is dead).


Thank you for pointing me to the presets, I will explore those.

Thank you again.

Jérôme

Profile
 
 
Posted: 02 July 2014 12:09 PM   [ Ignore ]   [ # 14 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

You’re welcome, Jérôme.

Yes, Houdini and C4D is certainly a powerful duo. I hope you can solve all your visual ideas with the two, since you certainly miss XSI (I assume that this was a core app in your pipeline… it always hurts to get this EOL thingy!)

However, I believe that things get better, and we need to let go of old stuff, to stay true to ourself and our create.

Take care

Sassi

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile