0
$\begingroup$

I've been following this tutorial by GiantCowFilms How do I rig a BB-8 robot? and it works fine from a front and back direction starting in the centre of the grid, but when you move diagonally, it starts to rotate almost entirely on the Z axis. I'm not sure what I am doing wrong here. I've posted the .blend.

Here's a screenshot of the him moving properly:

enter image description here

And this is the issue moving diagonally:

enter image description here

EDIT: I found a workaround that utilizes the above method with another. I don't quite understand the math behind it but it works.

1. First, go to blenderartists.org and check out Rigging a Rolling Sphere (BB8) and download the file roller.blend (important: to actually make the sphere move in this file, I had to click "update dependencies" in the driver panel for each axis (W, X, Y, Z)

You should see a screen like this:

enter image description here

And this is where you would update dependencies:

enter image description here

2. There are a number of ways to do this I'm sure, but what I did was to copy the sphere (ctrl + c) to buffer and paste it into my file with BB-8.

enter image description here

3. Then copy the code in text editor and paste into your file or save it as a text document and open it in your new file. Now run the script (also make sure you have "auto-run python scripts" enabled under file in your user preferences) and update your dependencies. It's important to note this script can only work with one sphere at a time...you must manually make the settings of your BB8 body the same as the sphere you pasted in your BB-8 file. This will be outlined in the next step.

enter image description here

enter image description here

4. Now here comes the tedious part. To add the correct drivers to your BB8 body, you need to make sure you are using Quaternion rotation or else this won't work. Go into your rotation options in the Transform panel and change it to Quaternion. Click in each coordinate and type the # sign and enter. They should all be zero and purple.

Then in the drivers section of the graph editor go in to each axis (W, X, Y, Z) and add your scripted expression and variables exactly as shown. Also make sure that the variable type is set to the Transform Channel and that the object is your BB8 body, not the cube as is shown (that is your original sphere you copied from the roller.blend file). It's pretty complicated to explain every single step, but basically you just need to manually duplicate all the settings of the sphere (confusingly labeled cube) in the roller.blend file in your new file to your BB8 body. And don't forget to update dependencies when you are done!

enter image description here

5. If you followed GiantCowFilm's method like I did earlier, just parent the circle empty around the body of BB8 to the body itself. Everything should move properly now!

enter image description here

Again, if you have a hard time with the instructions, you can refer to the original forum posting I found this from Blenderartists Rigging a Rolling Sphere (BB8)

And for those of you who want to torture yourself with the math behind ezaacque's code:

"I am taking each change in position, and calculate the cross product with a vector straight up, to get the vector perpendicular to these two, to get the axis for a wheel, following that change in position. Also, from the distance the wheel rolls, I calculate the angle the wheel needs to turn, in radians. From axis and angle I create a Quaternion rotation, which is then fed into the rotation of the sphere. In fact, I add up all rotations of all changes in position."

$\endgroup$
  • 3
    $\begingroup$ To quote my original answer: After writing this, I did a couple tests, and I am now convinced that the above method of driving rotation produces incorrect results. I am still searching for a definitive answer to this, at least the above method has the benefit of producing reasonably convincing results, so it is being left in. You did nothing wrong, my method is flawed. Still not totally sure how to fix this :/ $\endgroup$ – GiantCowFilms Jan 29 '18 at 19:52
  • $\begingroup$ Ah I see. Too bad...it's a very cool method. Hopefully one of us will find an answer :) $\endgroup$ – lakerice Jan 29 '18 at 20:30
  • $\begingroup$ @GiantCowFilms I figured it out...see my edits above. $\endgroup$ – lakerice Jan 30 '18 at 16:51
  • 2
    $\begingroup$ @lakerice Shouldn't all that just be an answer to your own question, not an edit? $\endgroup$ – Scott Milner Jan 30 '18 at 16:52
  • $\begingroup$ @ScottMilner it should be, but for some reason I was criticized on this forum when I formally answered my own question so I edit now. $\endgroup$ – lakerice Jan 30 '18 at 17:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.