PDA

View Full Version : Expression to rotate a wheel


Hervé
08-11-2003, 03:34 AM
Expression to rotate a wheel as the car moves, well that's what I need.... I am a null in Math...

I have found a link here , but it does not work ...(illegal arithmethic on data type or something like this...

This is the link I tried...

http://www.geocities.com/kevman.geo/l6_exp2.htm

garg
08-11-2003, 04:30 AM
Can you show us as screengrab of your expression ? Just like that it's difficult to see your problem. The tutorial you taked should just work fine.

You may want to try also a new expression system (all visual):

http://www.rayserver.com/amelie

Alain Bertrand

trick
08-11-2003, 10:22 AM
Or you can check Reelmotion (http://www.reelmotion.com) (only interesting when animating lots of vehicles and getting lots of money for it...) or Worley's Polk Collection's Wheelie (http://www.worley.com/polk/polk_wheelie.html) for some general wheel rotating stuff...

riki
08-11-2003, 08:51 PM
{ Expression
1
"-360*B"
"-360*B"
Variable "A" "6.2832"
Variable "B" "Car.position(Time).x/A"
Variable "C" ""
Variable "D" ""
}




re: http://www.geocities.com/kevman.geo/l6_exp2.htm

How to Calculate the Circumference of a Circle
1.Find out the diameter of the circle. The diameter is the distance across the middle of a circle from one side to the other.

2.If only the radius (the distance from the center to the outside) of the circle is known, multiply it by 2 to determine the diameter.

3.Multiply the diameter by pi (3.1416) to find the circumference.

4.Alternatively, divide the diameter by 0.3183 to find the circumference.

Hervé
08-12-2003, 12:24 AM
LW'ers... you Roooccckkk !! thanks a lot.... hey Riki, super coolee... when I should have learned Maths, it was back then in early 70's, and in that period, too many things were happening for me to stay quiet and listen my teachers... he he..

Reel motion look really good, but out of range... (pricey)

now I know this kind of expression will not make the wheels "differenciating" the speed when the car turns, but that's another step I guess...


Thanks a lot .....

Hervé

riki
08-12-2003, 12:36 AM
haha that's okay, I do seem to recall a thread over at CG Talk awhile back, someone was wanting to make a car that could drive in any direction. Might be worth a search.

garg
08-12-2003, 12:43 AM
LW own expressions cannot handle the total distance traveled. But you may download the plugin (for free) from Richard Brak (RB MotionSum) which will just do that for you.

http://www.richardbrak.net/plugins/index.html

In order to let all wheels turn at a different rate you need to store 4 travel sums (on for each wheel)

Alain Bertrand

P.S. All those features are included inside Amelie :-)

Hervé
08-12-2003, 02:30 AM
He he" now we go somewhere... but I've found also RB_Steering to be a good one.....

Hervé
08-12-2003, 03:25 AM
Really lost....

But I succeded with steering.p

here is a screen capture...

garg
08-12-2003, 03:57 AM
whi the expression is -360/P instead of -360/B ????

Alain

Hervé
08-12-2003, 04:08 AM
houllaa la... B is for Banks and P for Pitch, No ?
coz it will tun on Pitch not Bank...

I am lost

garg
08-12-2003, 04:25 AM
Nono... the expression "P" here is looking for a variable P which doesn't exist... you need to put B because your code is on the "B" line :-)

Alain

Hervé
08-12-2003, 05:28 AM
Hey Alain, I feel so stupid.... off course B stands for variable B (as I was in the Bank channel already, I should have noticed it...!°)

but I am doing too much stuff at one time, that maybe why...

Thanks a lot...

Hervé

riki
08-12-2003, 08:13 AM
Here's my example scene

riki
08-12-2003, 08:16 AM
Plus a test Mov file (136k)

Hervé
08-13-2003, 03:17 AM
You're the man Riki, I am checking it right now..... really I would have stopped LW if this wonderful community didnot exist..!!

Later, Thanks so luch Riki !
Hervé

chris_lwgr
08-17-2003, 12:14 PM
Hello to all LightWavers.HERVE try the formula 360*Distance/2*pi*Radius
Distance=position x ,y or z

JDaniel
08-17-2003, 05:13 PM
Did you try Cyclist in motion modifiers yet?

riki
08-18-2003, 04:43 AM
Thanks Hervé how did you work out?

Hervé
08-18-2003, 08:38 AM
Hey it is working perfect, merci beaucoup Riki !!

I have not tried cyclist, coz I thought why bother if it works... but I might try it... (but not right now, as I am so busy with non related LW directly stuff....

Thanks again, cheers....