Recently in Tips/Tuts Category

Python-based planetary gears

| | Comments (0)



So, that's some pretty intense rolling right there. The concept is pretty simple, just use a custom constraint made in python to correctly map the rotations to the planet gears. Here's how it works.

Skills you will need:
-Basic knowledge of blender interface
-some coding experience
-fundamental trigonometry knowledge
-ability to find stuff

Start by modeling the gears themselves. Try to use nice, easy numbers of teeth. Mine used 16 for the planets, 32 for the sun, and 64 for the outer gear.(Remember that teeth count increases linearly with radius.)
model.png















Next, open up a text window and find the constraint script template. You will need at least 2.46 for this to work.
window.png















Now, implement the following changes:

Change NUM_TARGETS to 2 instead of 1.
Add:   

    # Get the rotation for inner and outer gears.
     
    sunrot = targetmatrices[0].toEuler()
    outrot = targetmatrices[1].toEuler()

    # Get the position of the gear itself.
     
    localrot = obrot.z
         
    offsetx = (0 - obloc.x)
    offsety = (0 - obloc.y)
     
    globalrot = 0
     
    offset = math.sqrt((offsetx * offsetx) + (offsety * offsety))
     
    # Apply sun movement to temp values.
     
    globalrot += sunrot.z
     
    localrot += (1 - (sunrot.z * 3))
     
    # Apply outer movement to temp values.
     
    globalrot += outrot.z
     
    localrot += (outrot.z * 3)
     
    # Apply temp values to owner.
     
    obloc.y = (offset * math.sin((globalrot/180) * math.pi))
    obloc.x = (offset * math.cos((globalrot/180) * math.pi))
     
    obrot.z = localrot


After the "Do stuff here" comment. This will work for the first gear only, you will need to change the trig function maths for each individual gear. My actual file has four different pyconstraints.
Add two circles and a plane. Delete the faces on the circles and plane. Make the circles children of the plane, and lock their location, scale, and x and y rotation. Give the outer and sun gears transform constraints to rotate them the right number of times to line them up with the planets. You'll need to experiment with this one.
Finally, add a script constraint to each gear and select the correct script for the gear. Set all "spaces" to local, enter the circle which is controlling the sun as the first target, and the circle for the outer gear as the second target.

That's all! If you didn't get anything, feel free to comment or lay down a post at the blenderartists thread.

Being Contorsioned

| | Comments (0)

In my current animation project, I've noticed extreme floatieness and/or poppieness. Here's a tip that I have not mastered, but does help when I learn more about it.


Okay, say we have two poses.


 
breakdown_base.JPG



Two basic poses.

Now, we could do this:

breakdown_linear.JPG
but that would be very boring and slow. Now, if we made tiny little adjustments with breakdowns, and then tried to make a very broad arc in polish, we get a very poppy movement.

Or, we could do an interesting and bizarre breakdown very early on:
breakdown_first.JPG
Ahh.. now the inbetweens will already start working out their differences. Let's continue with this train of thought.

The hips move up, creating an interesting arc. They also favor the second pose, making this action very snappy. The head actually favors the first pose, giving it intense overlap, and an opposite action.
breakdown_second.JPG
I now give full favor to those hips! Okay, I added an anticipation down on the hips, as well as a favor. At the end of the shot, the hips land and overshoot rotation wise. The upper body drags extremely much, and then overshoots extremo mucho.
breakdown_third.JPG
Now things are gettin' spicy! The first breakdown has wave in the body, creating even more overlap. The second breakdown favors into the last pose, and drags slightly.

I hope you've learned something, and comments are always welcome.
Hi! And while the movie is now officially off, we've got some rich eyecandy for you! An explosion.

This explosion was brought to you by: Macke, Rhysy 2, and Me!




I will be helpful and produce a tutorial on how to build your own explosion.



Pages