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
   
 
ZigZag Formula Spline
Posted: 24 September 2019 03:37 PM   [ Ignore ]  
Avatar
Total Posts:  197
Joined  2017-02-07

Is there a way to make a zigzag formula spline? I’m no good with math, so that stuff goes over my head haha.

Profile
 
 
Posted: 24 September 2019 04:17 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Matt,

Yes, there is a way. Please have a look to this screen capture (files included)
https://www.amazon.com/clouddrive/share/cnz1jhNAP7W3IR7tnj0vfE1KKeYQnAahvipZh8EbsFJ

The first number in the rnd() function defines the range, the second the seed of the random rnd(1;t) in this case, as t is the value that is used in the Formula Spline. T is between Min and Max, and how often it is cycled is based on the Sample parameter.


As an alternative, you can set an Effector to Deform, and gain so much more options (file …_11.c4d), the name formula on the spline has no meaning, BTW.

Let me know if you have any questions.

All the best

 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: 24 September 2019 04:42 PM   [ Ignore ]   [ # 2 ]  
Avatar
Total Posts:  197
Joined  2017-02-07

Thanks Dr. Sassi. Do you know if there’s a way to make it more uniform? Looking for something simple, like this:

https://www.silhouette.pics/images/quotes/english/general/black-zig-zag-line-transparent-52650-102254.jpg

Profile
 
 
Posted: 24 September 2019 05:17 PM   [ Ignore ]   [ # 3 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Matt,

A regular zig-zag, no idea why I got the image of a random one in my mind.
https://www.amazon.com/clouddrive/share/gRvR2b83ankx5khkrarTdYafW4rDwSBOlKbvPcOQKpq

Anyway, here are two ways with the Formula Spline and one with a Formula Effector set to Deform> Points.

In the two Formula Spline setups, the summary of the Tmin and Tmax requires a specific Sample amount. Formula.0 -10 to 10 requires 20, and Formula.1 requires twice the amount of samples.

There will be other combinations, but I guess this should work. Have an eye on the Interpolation of each Formula.

The Spline object/Formula Effector set up, uses each Spline Point as an ID. The mod() function gives out 0 or 1 for odd or even IDs. With that, the given Parameters (P.Y) is then set, as in multiplied. Note, the points are only moved up and down, they are not positioned otherwise.

Cheers

 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: 24 September 2019 06:20 PM   [ Ignore ]   [ # 4 ]  
Avatar
Total Posts:  197
Joined  2017-02-07

Thanks Dr. Sassi smile

These are helpful examples. I think I like the final example best for scaleability. Selecting all the points and doing a “Subdivide” adds more “peaks”. Is there a reverse function of subdivide? In case I wanted less peaks?

Profile
 
 
Posted: 24 September 2019 06:40 PM   [ Ignore ]   [ # 5 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Matt,

I would say the best way to answer your question is suggesting the MoSpline.

Project file:
https://www.amazon.com/clouddrive/share/5eHwLjhz2OhvTurxkR2Xgv5m0tR9LskFpjZwydEsLSX

See the HUD interface in the Editor, this is the hint where to find the adjustment. (MoSpline> Attribute Manager> Spline>Spline: parameters)

There are two options here. To use the MoSpline as the spline, you like to use. (Note that the MoSpline creates a kind of a “Rail-Scale” spline internally, this needs to be addressed in a Sweep for example.)

The other option is, to use the MoSpline as converter only, and have a Destination-Spline in the scene. This spline will be generated continuously.

All the best

 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: 24 September 2019 07:03 PM   [ Ignore ]   [ # 6 ]  
Avatar
Total Posts:  197
Joined  2017-02-07

This is very helpful! Thanks so much!

Profile
 
 
Posted: 24 September 2019 07:37 PM   [ Ignore ]   [ # 7 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

You’re very welcome, Matt, thanks for the kind feedback!

Enjoy your project.

P.S.: some tips and tricks:
https://www.amazon.com/clouddrive/share/mIwoj7ebv0bfRlkh36lVqgmJbswwBEr0czWR6OYqUcM

 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