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
   
 
Piston Rig
Posted: 22 December 2017 07:08 AM   [ Ignore ]  
Avatar
Total Posts:  197
Joined  2017-02-07

I followed a tutorial that shows how to model and rig a piston. Everything is working great for the most part. However, if you move the time slider to about frame 11 and 34 however, you’ll see that the arm doesn’t line up to where it’s supposed to with the driver. Can something be done in the XPresso setup to fix this? Also, is there a way to fix the delay/lag?

Thanks!
Matt

File Attachments
piston.zip  (File Size: 238KB - Downloads: 87)
Profile
 
 
Posted: 22 December 2017 07:48 AM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Matt,

There are many ways to make a piston work. I guess the simplest is via Pythagoras . (Faster perhaps via a Trigonometric set up.)

Please have a look at the last post of this thread:
https://www.cineversity.com/forums/viewthread/1699/
It sketches the simplest relation among all parts needed.

I have discussed some other versions in the old forum:
http://old.cineversity.com/forum/forum_posts.asp?TID=1816&KW=piston

If you need anything as a rig set up for your model, please let me know.

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: 22 December 2017 02:05 PM   [ Ignore ]   [ # 2 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

P.S.: Each project needs more or less freedom. Previous examples showed after more requirements were presented, that they couldn’t deliver.

My target was here to allow for a rotation of the parent object, or a move in any direction. If a scale is needed, use with no exception the Object Mode, the Model Mode will NOT work!

I hope this allows for anything you have in mind. I placed three “Result” nodes in the XPresso, to have a better readability with it.
Scene file
https://www.amazon.com/clouddrive/share/xQqfYYjllZeITNIQowQdIGCwh3dlSwJCEtWpsDHxNzM
Screen shot
https://www.amazon.com/clouddrive/share/G5OUJmgsRn0gUy6TOaFMa2n4XN65n98fFuEPeKOD7Am


ENJOY

 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: 22 December 2017 11:25 PM   [ Ignore ]   [ # 3 ]  
Avatar
Total Posts:  197
Joined  2017-02-07

Holy cow! Thank you so much for taking the time to make the adjustments. I am definitely not a math whiz (had to drop Trigonometry class two separate times as I couldn’t wrap my head around it). It honestly blows my mind that you’re able to figure something like this out. There are special people in this world that just have the ability to see things differently, and you are definitely one of them. I will *attempt* to figure out your XPresso setup, but doubt my tiny brain will get very far haha!

Thanks again Dr, I really appreciate this!!

Profile
 
 
Posted: 23 December 2017 01:51 AM   [ Ignore ]   [ # 4 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

You’re very welcome, Matt.

I hope it is following all needed changes. If something isn’t working, please let me know. There might be always a use that I didn’t anticipated. Again, changing the scale: use the Object Mode.

I’m sure if we would take an hour during a coffee, you would get your head around Sin, Cos, and Tan. I blame it on the teachers. There is always a way to find the right “language/communication” to make that happen.

This time I took a different approach, from the crankshaft rotation, and the two distances to the meeting point, I created a result for the y position of the piston and the conrod’s angle, i.e., where the conrod has to point to the connection to make it look like it is connected/following.

Anyway, the most important part is that you know what you want as an artists, the technically is a servant to that, and of course, I try to support here any level.

Let me know if there is anything else, I’m happy to look into it.

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: 23 December 2017 02:24 AM   [ Ignore ]   [ # 5 ]  
Avatar
Total Posts:  197
Joined  2017-02-07

Thanks again for your kind reply. I have been trying to study your XPresso and see that yes, you have used the Gear’s rotation to calculate where the piston should be located on the Y axis and what angle the connecting rod should be. I even took some more notes with your XPresso setup to try to wrap my head around it haha. I also came across this, but not sure how helpful it’s been: https://www.intmath.com/cg3/curve-shape-movement-piston-applet.php

How did you know what formula to use, for example this one: SQRT(($3*$3)-($2*$2))+$1

I am also very inspired by the work of Gareth Fowler: http://garethwashere.tumblr.com/

He uses trig and constraints to get a lot of his animations working. Just blows my mind how people figure this stuff out. I want to be able to figure it out, but my brain won’t let me!

Matt

Profile
 
 
Posted: 23 December 2017 03:47 AM   [ Ignore ]   [ # 6 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi Matt,

I will go in the next few paragraphs through several points to share how my thought process is. It might sounds different, but just read along and let it sit for a while. As an engineer, I can explain the math, but as an artist, I can only show my way of doing and encourage to find out what works for you in the best way. It is never the tech that makes us unique, it is the way we are able to look at the world and really see (or not, but assuming we know it already)

The main part in most of the math above is based on a 90º relation somewhere. “Pythagoras” works that way for example. So the formula in your image might be out of luck, or do I miss something?

The formula in the first link [intmath.com] is an example of the relations, but the problem with 3D animation is, that we need to look often from another angle. What is an x axis might be a z axis after a 90º H rotation (i.e., breaks the solution), which would be the first thing to look at. Just to name a small problem … Local values often don’t change in relation to the parents.

However, the biggest step to get things going (in 3D animation) is to let go of the idea how things really work, as in “Work In Reality”. The initial question must be, what do I really see, want to see as final animation, instead of looking based only on your knowledge. If we look with what we know, we don’t see anymore (as in any MORE).
We create magic, not engineering here. Over the years I have seen it too often that people get stuck in the idea to reproduce reality. Cinema 4D is an animation tool, targeting a visual result that has to convince people what they are seeing is “real”. The audience is looking from the point of “knowing” and so we get away with a lot of our “magic”. Relying purely on knowledge makes blind for most creative solutions.

Let me deepen that thought. The biggest stop in our development is the sentence “I know that”. The biggest push in creativity are the two words “What if …” followed by something that others would express as: don’t bother.
Last but not least, “these are the rules and we have done it that way since ever” are the most limiting way to work in an creative environment. The only thing that counts is that we make our audience imagine.
As I always extent the old saying for film, “don’t tell, show!”, with: make the audience imagine – Instead of show, instead of tell. Here is the starting point for animation.

So, back to math, first we make notes of everything we have already. Then we outline what we need, and with that I mean what is really visible as final result. In my set up, the crankshaft doesn’t move the conrod at all, they have no mechanical or dynamically relation ship. You might say, but they are connected via math. Well, I could create a slider [user data] and have the crankshaft rotating from it, as well the piston go up an down, while the conrod is derived from the slider in position and rotation. All three part could be placed on different spot on the depth axis, but a camera could combine them all as one working unit. After all, we decide and find the flow of information, and C4D is based on an information-flow as well, but it is wide open to any tricks we come up with.

All of that should lead after a while to see beyond what one knows and what reality would dictates. Then things fall into new sub-units and from there each part might receive new solutions how to move it. The smaller the unit is, the less complex each part will be. Which eery part that is solved, we gain more information to solve the next step.

After all, there is something any good inventor knows, there are no failures, there is only gained experience. (For more, see the NLP handbook, how the brain works wink

For the the solution of the example that I have shared here, I ignored the mechanic dependency at the connection point of conrod and crankshaft. I just focused on the piston, as it seemed the simplest to solve. Which made me feel better and more open to stay creative to fond “something” new for the conrod. Since I had the piston movement, I thought, “What If …”

Well, what if I make the conrod a child of the piston, and just find a way to point to the part that the crankshaft has for it. A target Tag came to mind, but I wasn’t really happy about it. I find the XPresso method more elegant and I can control the priority in the cleanest possible way. Tags, as in constrains, mixed with other dependencies, not so much. Since I had the XPresso window open, I knew that the P.Y of the piston was already correct, so the math need to be found in the part I had so far established.

SQRT(($3*$3)-($2*$2))+$1
The Input Value 1 shows up as $1, the Value 2 as $2, the Value 3 as $3
SQRT() stands for a square-root of the content in the ()
The $3 is the conrod from axis to axis
The $2 is the horizontal [X] value
So, the square root out of ($3*$3) [square] subtracted by the square of the horizontal ($2*$2) equals the Y value above the specific crankshaft. The Y value below the crankshafts connection point and the axis of the crankshaft was already established, so the plus of the $1 made the full Y length between piston axis and crankshaft axis.  ($3*$3) could have been also written as SQR($3).
Please check out the Formula in the Help Content Appendix.

I hope that helps a little bit

Happy Holidays

 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: 23 December 2017 04:40 AM   [ Ignore ]   [ # 7 ]  
Avatar
Total Posts:  197
Joined  2017-02-07

Thank you so much for the insight Dr. This is much appreciated smile

Happy Holidays!

Profile
 
 
Posted: 23 December 2017 05:03 AM   [ Ignore ]   [ # 8 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

You’re very welcome, Matt, and thanks a s well.

Have a great weekend!

 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