Using Expressions for rotational values
Is there a way to use Expressions within C4d to use the lateral x/y distance to rotate a null around its axis? If you can, how do you apply them to the channels you want to affect?
I can do this in Autodesk Flame using the expression -360*(axis name.position.x/(Diameter*PI))
This multiplys -360 by the position of x divided by the diameter of the null multiplied by Pi.
This creates the effect of a rolling wheel where for a given distance forward, the wheel rotates the correct amount to make it look as if its rolling.
I will be using this to move a wobbling balance board around whilst having it realistically stick to the floor - so moving in both x and z directions.
thanks in advance
Dr. Sassi last edited by Dr. Sassi
Please have a look here:
This is connected to the X position for the distance and the Radius for the rotation.
Let me know if you need something else.
All the best
Thanks Dr Sassi - thats perfect.
Once i was able to figure out this is based on Radii and not diameters, I was able to deconstruct your formula and figure out how to make it work for a sphere (use *-1 after the formula for the z position transforms)
as always - your assistance is invaluable to figuring out these puzzles
ahh...it works for part of the motion, but i have just noticed a new problem.
The shape of the balance board where it contacts the ground is not a perfect sphere, and on the actual product the pivot /rotional axis is always based on the physical shape so as the curvature changes, the point of contact changes. The 3d model is not doing that - as the shape veers away from perfect sphere the model begins to fly.
These screengrabs show the problem (and also the expresso formula i used for each axis)
Is this something that would work more accurately with Dynamics than using a hypothetical point of rotation for the entire object?
Further investigations - i am certain i need to use Dynamics and Fields to achieve what i need - but i cannot understand how to do this.
I have a collider tag on the floor and a Rigid body tag on the Model. If i hit the play button, then it all vibrates like its balancing, and i cant get much further. I tried adding a Spherical field so i could move it across the model and (hopefully) push the model downwards at various places on its surface and have the dynamics make the model roll to that point (exactly as would happen on a circular balance board!) The Field does not seem to affect anything.
Can anyone point to tutorials that might explain the proces? All the tutorials i can find seem to use bunches of clones being affected yet nowhere can i find something showing how to affect a single complicated model !
Dr. Sassi last edited by Dr. Sassi
If you are using the Bullet System, there is an option to use a simplified shape. (Another Object)
(Which allows for a better handling of otherwise complex objects.)
Who doesn't love dynamics to solve animation problems but sometimes manual animation might be the faster and more art directable way. However, using a rough model with a few polygons might help to recreate the motion in dynamics. This can be a useful reference to set the needed keyframes manually.
To create a "proxy" model, the Cone might be the fastest way to get this shape done. Please note those "Another Object" Proxies need to be polygon-based (shortcut C)
I have attached two example files trying to roll the shape; I got the feeling I'm not duplicating your "storyboard".
Please keep in mind that images might trigger inside of you the whole story, which might not work for others in the same way. I work with files (or storyboards if the file is unavailable).
All the best
@Dr-Sassi Hi Dr Sassi,
thanks for those files.
I'm now thinking what i really need is some hybrid between manual and dynamic animation. I need the control to be able to press down on any area of the model and have it pivot accurately, but then to be able to move the weight and have the model roll/rotate accurately.
I'm trying to replicate the game play of a new product - it has an electronic game aspect to it where you move to have certain coloured sectors touch the floor in a specific sequence. A way of making fitness fun!
whatever i try with the dynamics seems to go crazy. I cannot control the model in any way and its proving impossible to achieve anything useful. The best thing i get with the Dynamics is that the model does sit on the floor and it does use the shape of the model to act against the floor.
Is there a way to have that functionality but still be able to control the rock and rolling using manual techniques?
I have made a simple model with the same profile so can use that to do the animations more simply before copying the motion data over to the complex model. I have not included rigid body tags on this version.
On the model - i used a hidden sphere as a child of the model to provide the Radius needed for the rolling. If you move either x or z position on the model, it will roll...BUT if you roll past 74mm in either direction, the radius is no longer correct and the model floats in the air. I cannot manually lower the Y position because thats controlled by the Expresso formula. If i move both x and z positions then the model appears to be flying more than its on the ground.
i even started looking into the mathematics of rolling elipses but my brain just melted!
Dr. Sassi last edited by
When I saw the images, I thought first of a loudspeaker with a big magnet. In other words, a Center of Gravity needs to be addressed, which I have too little information about.
Anyway, the key is to use the Dynamic here (!) as a reference, but I believe that your intentions to art direct it will overwrite this. I can't speak for you, nor do I even have any idea about your background, But after using Dynamic systems in Cinema 4D in my third decade, well, shy in the third, I have discussed this so many times that I tend to feel like a broken record: The reference, best taken from the real object if possible, and then animate manually has more advantages than one might think. Yes, with thousands of objects, I would not even remotely suggest this, but with one? My tendency is high to do so.
Another observation that I like to share, and I do this in a forum, so forgive me if you know all of that: We all (IMHO) want to see something as long as we need to understand it or we enjoy it. The one take that has it all is often not needed nor wanted. Again, I have no idea about your storyboard here, but a cut allows you to set another parent to the object, and the motion is more accessible to set with the new one. If done well, all edits together might leave most of the audience missing that there was a cut. With clever camera moves and cut-in motion, it melts into one impression.
Long answer short, I have no idea other than what is called "tech" in the file above or the text so far here that could benefit you more. Keyframes can be set, and the amount they will be used during the dynamic calculation can be animated by themself. If done well, it looks great, but chances are that the animated influence leaves doubt in the resulting motion.
All the best
Loudspeaker is actually a pretty good description of the shape. The only problem i have with it is i cannot use it as the only reference model is too brittle - its not a production sample, so filming it action is awkward.
I have also come to the conclusion that manual animation is thre way forward - after two days trying everything i could think of and getting nowhere, its time to just get it done!
I understand better than most what you mean about cuts - i've been a pro video editor for nearly 4 decades! 3d is just something i use to expand my abilities when i get the chance.
thanks for all your help, Sassi...i owe you a beer!
Dr. Sassi last edited by
Perhaps use an old Soup-bowl for some tests
In editing, like in many other arts, you find a rhythm and a structure to tell a story.
In rotoscoping, one needs to find where one motion or the direction it changes to move around without too many manual adjustments.
In animation, both of the above are combined, and one or the other is used to find the "Key-Frames" that will define the main motion, which might be a bit counterintuitive, as the change of something is the key here.
Go back a few steps, and we will discuss the storyboard: which is the smallest number of images needed to illustrate the flow of the story so a team can reproduce it on set?
I assume that sounds very familiar to you.
Or, as a friend of mine coined it around 15 years ago before you start any action, try to say it out loud in one sentence what you like to do.
All of that separates each motion into sub-sequences. Each of these could have key points that stick out like a stop initially, but each individual motion could be based on a few Nulls that create a hierarchy of movements and compose the subsequence with just a few timeline entries. Those subsequences could be visible only briefly, then another rig or setup takes place and continues the motion. In other words, define each subsequence. Or Take it if that sounds more familiar.
(A rig could be a parent null that cares only about the position, the next one about the orientation, and a third one defines the rotation, etc.)
When these subsequences are done, you render a preview and take nodes.
If that flows in the way you like, put an object into sync with the positions and motions you have found.
Yes, the object you have is not a simple one to animate believably. Like any craft, it needs training and experience. Similar to that is the editing of a movie, experience and storytelling-IQ shows up heavily in the result; there is no shortcut. In other words, allow yourself some time.
My best wishes for your project