PDA

View Full Version : Nodal motion Wheel?



joseba
07-05-2013, 11:49 AM
Hello.
I am trying to make a wheel rotation via nodal motion modifier, but it moves too fast.
This is a screenshot of my node flown.
May be a unit problem?
Thnaks in advance.115418

XswampyX
07-05-2013, 11:55 AM
Hello.
I am trying to make a wheel rotation via nodal motion modifier, but it moves too fast.
This is a screenshot of my node flown.
May be a unit problem?
Thnaks in advance.115418

Don't you need a starting position and a distance travelled? I mean if the wheel is 100 units off to the left it will spin like crazy.

joseba
07-05-2013, 12:02 PM
The wheel is 1m radius, starting at 0,0,0 and moving -5 meters along z axis.
This is the content.

XswampyX
07-05-2013, 12:19 PM
My bad.... Try this. :)

http://i465.photobucket.com/albums/rr16/xXswampyXx/Tractor_Tyre_Rotate_zps49d765ea.jpg (http://s465.photobucket.com/user/xXswampyXx/media/Tractor_Tyre_Rotate_zps49d765ea.jpg.html)

probiner
07-05-2013, 04:28 PM
http://www.rigging101.com/free/cart/index.htm

Just apply this principle built with nodes:
" Turning the wheel
We'll write and expression that will turn the wheel when the cart is moved back and forth.

This expression will work only in one axis (in our case X)

To find out how much we have to rotate the wheel by, we have to use the formula: rotation = 360 * distance / (2 * Pi * radius)

The radius we know is 1.

And the distance is the translateX of the cart. "

joseba
07-05-2013, 05:08 PM
Thanks XswampyX
I am trying with your settings unsucessfully.
Which mode for vector-scalar do you use?
is the first scalar node parameter set to 360?
is the diameter scalar value in meters?
Thanks for your time, it was a very, very fast response.

joseba
07-05-2013, 05:10 PM
That is not the problem, probiner.
It is more of a syntax or node logic problem here, but thank you anyway.

XswampyX
07-05-2013, 05:23 PM
Thanks XswampyX
I am trying with your settings unsucessfully.
Which mode for vector-scalar do you use?
is the first scalar node parameter set to 360?
is the diameter scalar value in meters?
Thanks for your time, it was a very, very fast response.

No problem. :thumbsup:

Here have a look. -> I haven't use a null it's moved and rotated directly.

joseba
07-05-2013, 06:04 PM
Thanks again XswampyX.
I am playing with your content and it works....wonderfully!
But i do not understand it fully, i mean, firstly why is your diameter set to 1 when your wheel is more than 4 meters in diameter?
second, why the -1 scalar node? The Theory says [wheel.X] * 360 / (diameter* PI), so this scalar needs to be 360, or am i wrong?

joseba
07-06-2013, 05:42 AM
XswampyX settings worked well, but testing it with my content, i have simplified it:
I have removed the -1 scalar node and the fisrt multiply node (* -1 only changes sign or polarity)
and changed the diameter to 0.3 (Who knows why?, my wheel is 2 meters in diameter) and it runs fast and ok.
The question is: How it works?, i dont understand it. There is no Pitagorian math at all in there....
Where is the 360 * position / (d*pi)?115441

XswampyX
07-06-2013, 07:48 AM
XswampyX settings worked well, but testing it with my content, i have simplified it:
I have removed the -1 scalar node and the fisrt multiply node (* -1 only changes sign or polarity)
and changed the diameter to 0.3 (Who knows why?, my wheel is 2 meters in diameter) and it runs fast and ok.
The question is: How it works?, i dont understand it. There is no Pitagorian math at all in there....
Where is the 360 * position / (d*pi)?115441

You're thinking about it wrong.

The basic idea that came to my mind was :-

I'm going to rotate my wheel.
I'm going to rotate it one turn.
How far along the x axis must i move my wheel for it to rotate 1 turn?
How far along the x axis must i move my wheel for it to rotate 1 turn? = diameter * Pi .... along the x axis.
=1 x 3.1416
=3.1416 units along the x axis for one turn.
divide x axis position by 3.1416 to give the amount of rotation needed.
You don't need any 'proper' maths as it's just the relationship you need, not an answer.

Thing are further complicated by the rotation vector being in radians.

2*Pi = 1 x turn.

Hope that helps.

joseba
07-06-2013, 08:15 AM
I think yours is a clever "inverse" logic of approaching it,
multiplying Pi and the diameter you get the circumference of the wheel, and then you divide it to the translation but,
what about the diameter not corresponding to the real size of the wheel?

XswampyX
07-06-2013, 10:40 AM
What's complicating it is the conversion from turns to radians. 1 x turn = 2*pi in radians. You have the same value PI turning up all over the place!

Here's the node network with the actual diameter used. This gives us the number of turns.
Then turns to degrees.
Then degrees to radians.

I think this works, and looks like you expect.

http://i465.photobucket.com/albums/rr16/xXswampyXx/Rot_Tyre_Exp_zps2ed3611a.jpg (http://s465.photobucket.com/user/xXswampyXx/media/Rot_Tyre_Exp_zps2ed3611a.jpg.html)

Setting the diameter to half it's value did the conversion from turns to radians straight off.

Hope that helps. Well I learnt something anyway....

Cheers!

probiner
07-06-2013, 11:39 AM
Applying the formula I get the attached scene.
You'll need:
TrueArt Node Library Pack: http://www2.trueart.pl/?URIType=Directory&URI=Products/Plug-Ins/TrueArt%20Node%20Library for "Degrees to Radians" node.
Dpont Item Node Motion (cause I like the options :D) : http://dpont.pagesperso-orange.fr/plugins/nodes/Additionnal_Nodes_2.html for "Node Item Motion" and "Motion Info" nodes

The playback is quite slow because I have 2 instances of Item Node Motion on "Tilt Control" comparing the Heading rotation of the current frame with the previous to make the wheel bank in on curves. If you turn it off it playbacks fine.

Cheers

A null is moving not the wheel. Motion Info from Null to the Wheel rotation.
https://dl.dropboxusercontent.com/u/143766132/Forums/NewTek/turn_wheel.png

Wheel tilt. Comparing the Null rotation on 2 subsequent frames. Not very good and it should be modulated with speed :)
https://dl.dropboxusercontent.com/u/143766132/Forums/NewTek/turn_wheel_tilt.png

Result (Tilt multiply increased)
https://dl.dropboxusercontent.com/u/143766132/Forums/NewTek/turn_wheel.gif

JoePoe
07-06-2013, 12:34 PM
May I jump in ... ;D

Disclamers:
I don't have any of these plugins (I don't even have a simple Diameter node...), but I'm trying to make it work with the regular Nodal Item Motion modifier,... and I know the diameter.
Probiner - I haven't checked out your setup yet. (but what I'm coming up with looks similar).

Okay.... Swampy...
Did you key in the final result? I don't have the plugin NodalMotion, but your scene does load with rotation. So that's what I'm looking at.
That being said... :stumped:, simple math.... the tire is 4.8 m in diameter. So Circ is PiD= 15 (basically). So for each revolution the tire should travel 15m. Right??
So I think you're a little slow (might be just one radian?). Check out the pics below.... 15m grid. Over the approx 45 meters traveled I'm only seeing a total of 838deg rotation. Should be over 1,080deg?? Maybe something got lost in translation without the node....,

XswampyX
07-06-2013, 12:48 PM
Love the scene probiner, you could use that banking for a spaceship flying around. Pretty cool!

Hello JoePoe, You are right, the scene was just an very simple set up to get something working. I didn't realise at the time that it would be dissected and discussed to the extent it has been. :D
Here's the amended scene with all the different conversions put in. It makes the node network more complicated but hey ho.

It has all the conversions from Turns -> Deg -> Radians.

JoePoe
07-06-2013, 01:09 PM
this is what I came up with.... which is essentially your first setup with an additional Multiply for the radians (still have to try that Motion Info :hey:)

Had to hand enter the diameter and the degree to radian conversion (6.28318531).
(oh, and the vector to scalar uses X channel.... still can't review what u've got going on.... no nodal motion plug. :o )

joseba
07-09-2013, 12:43 PM
Thank you very much XswampyX!
I was too busy this weekend, sorry for the delayed answer.
I will test your scene tonight.

joseba
07-10-2013, 04:26 PM
Awesome!
It works like a charm, it is a perfect solution for wheels.
It is many times faster than relativity (and screamernet capable too),
Thank you very much!

XswampyX
07-10-2013, 05:47 PM
No problem joseba. Glad you found it useful.
Cheers!