wheel rotation script v0.63 (blender2.6x)

Hi,
here is a simple, easy to use script that computes the rotation of several moving wheels with different/variable diameters. main purpose is massive animation of cars wheels.

http://jerome.le.chat.free.fr/images/stories/scripts/rotations/0082.jpg

. animators just need to key location ipos on the wheel objects. the script cares about wheels spinning and steering
. documented, frenchy-english as usual.
. works fine on paths or with keyframes
. out of wheel mode
. zero config. but for sure you can edit some vars.
. pored to blender 2.63a by Gert De Roost ( http://www.ewocprojects.be/index.html )

I did this for roubal who cares about really nice vehicle automatic animation with tires deformations, steering, suspensions… driver animation… and without ANY code, only with empties…wow.
try his car autodrive file if you don’t know it :wink: :yes:
http://www.3d-synthesis.com/tutorialsenglish.html
you should keep an eye on this page :slight_smile:
the script is also used in open city engine for car animation, with the opensteer AI plugin

documentation

download

Very Nice!

littlenoe - wouldnt it be possible to make the changes needed in the wheel script by using an interface + some more scripting which to take the necessary params automatically? :wink:

Nice work though!

Regards,

hi abidos !
it could evolves like that :
. auto-link to scene
. maybe get rid of the empty thing ( I’ve to test but it should be possible. )
. auto diameter but as an option, one need to specify the diameter in some case (the wheels of a train, an axe with 2 gears with different diameters etc)
. naming convention option: 'apply to any object whose name begins with ‘nameOfMyWheels’
. ipo recording.
. rotate the wheels on global z / local x too, when not on a path, as an option.
. … any other needs ?

I’m a bit reluctant too make it evolves a lot (gui), because of the incoming 2.5 and all the changes…
so I think there won’t be a gui for the incoming options and just some more booleans in the EDIT section of the script.

WowO_O Really thx=D! I waited for this for years^^

updated :slight_smile:
thanks to report any issue.

. zero setup :
. save the script in your script folder then run it from the blender object menu.
. name your objects wheel, wheel.001, wheelBig etc… go to frame 1, it’s ready to run.
. no need for an additional object to determine the rotation direction.
. by default, if not attached to a curve, the wheel object will also turn ‘left’ or ‘right’ (RotateZ=True)
so you just need to key the wheel location, the script cares about the needed rotations, it’s a kind of follow path with no curve + a wheel rotation.:slight_smile:
. see options in the script for more control.

tested with 2.49 it should work without python.

a bug due to the euler flip thing… in fact : due to the antiflip thing I wrote for the euler flip limitation. :confused:
but it should be ok most of the time.

Made a UV Sphere, named it wheel, added key frame for location on frame 1 and 50. Linked script to run every frame change, played animation from frame 1 and the sphere moved but did not rotate :frowning: Im sure its something simple.

I am not in need of this script right now but it is EXTREMELY useful, im definitely keeping it in my collection of useful scripts.

Thanks for the script!

@dail :
maybe there’s a rotation key ?
also try a ctrl-A on the object.
the script should also link itself to the scene when loading. update the script menu then load it from the object menu.
use the link in the post, not the one on my site.
I use winXP, blender 2.49, (python 2.5 but I think it works without python)

for one wheel not attached to a path, frame 1, the console should say something like :


.wheel rotation script v0.0.38 - init
  auto-select :
  -------------
  found wheel

  wheel list :
  ------------
   wheel,diameter auto,rotateZ True

(if everything is ok.)
please let me know,

Thanks for sharing…this will be very helpful…

I got it to work, i had to hit Alt+P over the script to run it once manually, then the sphere would rotate…

it’s strange… anyway it works :slight_smile: at the occasion could you tell me if you always have to alt-p ?
… maybe you load it directly from the text window ‘open’ menu, and not from blender object menu. thanks if you have some time to give me details, I’m not used to menu integration.

I opened it up with the text editor, that was my problem apparently. Thanks for an excellent script.

made a similar script a few years ago.
The difference was that it didn’t require diameter etc other manually incerted data, instead used the location of two bones: center and ground.

you should try the last one (post 23-Jun-09 22:10) :wink:
I didn’t test yet when a wheel is parented to a bone but it should also work…

website updated (link and documentation)

Hi Jerôme !

Constraints applied on the wheel seem to lock it ! It worked in previous version.

edit line 38 :

angle=90

also line 171 replace :

				obd=pobd

by :

				obd +=180
				if obd>180:obd-=360

there’s still a bug sometimes, about rotation direction…

ok, yet another update (bug corrections + misc options)… v0.4 :slight_smile:

updated, dicumented, more options… see the first post, hope this can help

hi! this is an awesome script! but how do you manage to control the wheels rotation speed? i mean…like start off slow at first then speed up like crazy. i got it working except the wheels rotation speed.

cheers! i like this script! hehe thanks! :eyebrowlift: