CGTalk > Software > Blender
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 10-08-2013, 01:03 AM   #1
pauljs75
WingsNut
 
pauljs75's Avatar
portfolio
Paul Jay Schrenker
Starving artist
Waukegan, USA
 
Join Date: Feb 2004
Posts: 276
Send a message via MSN to pauljs75
Talking Wheels rolling based on path

In my noobish learning of things Blender on this wonderful internet, I found various tutorials which have wheeled objects animating in Blender. And they achieve the turning of their wheels via use of transforms. However they neglect one important thing, wheeled objects often happen to change direction. Try having an object using transform controlled animated wheels change direction of 90. Get what I'm saying?

But I'm clever. And perhaps a bit stubborn. And despite my noobishness (not counting experience in Bryce or Carrara) regarding Blender, I figured there must be a better way.

The secret lies in using paths with animation drivers. However, being Blender, it's still not all perfect. (But I see improvement in the future. Developers are willing and ready to make progress these days. I trust that they wont drop the ball on that now that things are getting good, and they're more willing to listen to users.)

Sooo... Here's...
THE GOOD: The math involved is pretty easy. Shouldn't be any brain-hurt in this.
THE BAD: Animation using drivers takes a bit of setup. Can lead to hair pulling if you don't catch some things. Scripting (disabled for your protection) has to be turned on, origins set, scale/rotation/transform applied, etc. (Particularly if you import your models from elsewhere.)
THE UGLY: Blender, for whatever stupid reason, does not have a readily accessible internal path length property. (At least in the current 2.68a as of this post) To determine this value requires the use of a cube sized to the desired unit of precision with a manually adjusted array (to length) along the curve. Now that doesn't seem so hard, does it? But consider how many 0.1 blender unit cubes it takes to measure a path exceeding 100 units in length. To say it becomes unwieldy is a bit of an understatement. I wasn't kidding when I said it was ugly. For now, this seems to be the only way. But at least you can put this array on another layer reserved for its use.

So now for some videos...


When I made the above, I didn't get things exactly right. (Cancelled out a little more than needed as two values were coincidentally the same during division.) And my terminology might not be exact or clumsy. But hopefully it's good enough to help somebody head in the right direction.

The exact formula (if I don't screw it up somehow) is:
(path eval time) / (total path frames)* 2 * (path distance / wheel diameter)

Originally that formula also had pi in there. But the pi's cancel out. 2pi for the radian unit of an entire rotation of a unit circle, and pi * wheel diameter for the wheel circumference. Scripts also seem to be in radians regardless of how rotation is measured or displayed otherwise.

Of all those variables, path eval time is the only thing animated with keyframes. Everything else is pretty straight forward with plug n' chug handled by the drivers. Which is the entire point.

And a little noob-tastic animation test render of mine using the concept... Obviously not pretty, but I've gotta take simple steps first before trying something fancy.

 
Old 10-08-2013, 01:03 AM   #2
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,481
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 11:23 PM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.