Imgur Loading Gif in 3d

So, Alex Otten posed a question about this animated version of the Imgur logo. I decided to try my hand at it using curves to deform a cylinder. So here’s roughly what we’ll be making:

RingSpinFinal

 

So, clear a fresh scene and we’ll get started.

First step is to go to front ortho view and then add a circle curve: (Shift+A Curve->Circle)
Steps1

Make sure you tick the ‘Align to View’ box if you want easy numbers as we go forward. There’s a small point to be made here about the radius of the circle, which I’ll come back to in a moment. For now, leave it at 1, but just keep it in mind for the future.

Now, add a basic circle mesh (we’re going to make it cylinder in a moment): (Shift+A Mesh->Circle)

Steps2

The settings I’m using are for 16 verts and a radius of 0.1 (I want this cylinder to be very thin and long.) You won’t be able to see the circle, because it’s flat from front view, so alter your view slightly and then tab into edit mode.

In edit mode, duplicate the vertices (Shift+D and right click to commit) then grab and move them up 1 unit on the z axis (G, Z, numpad 1 and Enter to commit.) Now we have two circles of vertices, 1 Blender Unit away from each other. Select all the verts (Ax2) and then bridge the loops (Ctrl+E, L).

Steps3

This is the point where we’ll pick the resolution of our curve. To illustrate what I mean, go ahead and add a modifier to your cylinder so that it runs the course of the circle: Curve mod, Object is the BezierCurve, Deformation Axis is Y.
Steps4

You’ll notice That our cylinder is on the circle the way we want it, but isn’t deforming and isn’t covering the whole thing. We fix the deforming by giving it more geometry to work with. Create loops in the cylinder until you are happy with how many you have for the resolution. For this example I’m going with 63 loops (creating 64 vertical pieces.) Tab in to edit mode, mouse over the center of the cylinder and then push Ctrl+R and scroll up on the mouse wheel. You can look at the bottom left to see how many cuts you are up to. Left click then right click to accept and place evenly. Tab back out of edit mode and you should see a difference in the way it curves around the circle. (if you haven’t yet, change the shading on the cylinder to smooth.) But there’s a problem.

Steps5

This problem (the cylinder not going around the whole circle,) is exactly what we are going to use to properly animate the ring as it goes around the track. Remember back to my comments about the radius of the circle initially, we left it set at one, so now we need to set the size of the cylinder to match the circumference of the circle. Fortunately, we can animate this!

Steps6Bring up your right panel with the N key (if you haven’t already) and look at the cylinder’s Z size. It should be set at 1 if you haven’t done anything to it. Change it now to 6.283. It fills the whole circle because 2πr is the circumference of the circle, and since we left the radius at 1, that means the circumference is 2 times π. So the length of our cylinder needs to be 2π or 6.283. Use this value to animate the cylinder by setting 3 key frames, first frame, middle frame, and last frame.

Set the first frame to the full circle (6.283 in this case), the middle frame to 0, and the last frame to the opposite of the first. (-6.283 in this case.) simply mouse over the Z value in the right panel after you’ve set it, and push ‘i’ to set a key frame. You may get a squashed image in the middle frame, and there are a couple of ways to tease this out. The easiest is post processing the middle frame out of the compiled gif. The more complicated way is to set a key frame immediately to either side of the center frame after you’ve already keyed the middle frame, and then key the x and y values on the middle frame to zero as well.Steps7

Steps8

At this point, we’ll want to make all the circles, and the best thing to do is clear all the key frames (right click on whatever frames you’ve keyed and then select ‘clear keyframes’) so that there isn’t any confusion. To get a smaller circle inside this one, we’ll simply duplicate the bezier curve and then scale it to half its size. (S, .5) It’s important to pick your end caps at this point for the cylinder, as we’ll just be duplicating it. If you want, you can just grid fill it, though I recommend extruding in a couple of times before you do this and then beveling the edges.

Now that the end caps are established, go ahead and duplicate the cylinder from Object mode. You should see no change, but now you can go in to the modifiers and change the object influencing the curve to the other curve you just duplicated. You’ll notice it is already filled with the cylinder, but something isn’t right. Check the settings, and you notice that the size of the cylinder is off (should be 6.283) change this to 3.142 and you’ll have it set to the appropriate circle size. Go ahead and duplicate another version of the cylinder, remove the modifier and then hide it so that we can use it as our ‘blank’ for any future circles. Obviously the easiest values to work with are going to be direct multiples, but just remember, 2πr for the z size of the cylinders and you’ll be fine. If you get lost on how big your circle is, just look at the z dimension when it is selected and divide that by half to get the radius. If you want the cylinder to get thicker as the circles get bigger, just apply the modified circle size to the curve with Shift + A while you are in object mode.

Add a sphere to the center, smooth shaded, 0.1 size, 16 and 16 on the rings and segments. If the cylinders aren’t moving to your liking, you can simply rotate the curves (which can also be animated for a very cool effect.) Now, for materials, I just set a light blue emission at 5. I set the background to pure black, and then did some post before exporting the animation.

After you render a single frame, go to the Compositor and set up the following:

Steps9

for a light glow effect. Play around with the settings to taste. Then render the animation and load it up as a gif.

Keep in mind that all the circles are running in time in this tutorial. To get closer to Alex’s challenge, you’ll have to play around with the key frames a bit. This should be a pretty solid start though!

Advertisements

3 thoughts on “Imgur Loading Gif in 3d

  1. Alex Otten

    Just want to say how much I appreciate you putting in the time to make this write-up. I found out that people were making these really cool spinners in Blender and wanted to know how it was accomplished. This is really insightful.

    Thank you.

    Reply
    1. sanjurjot Post author

      No problem. It was fun, I’m actually going to use some of the stuff from here to try and animate a tail on one of the models I’ve been working on!

      Reply
  2. Pingback: Glowing Electric Material Without Compositing | Prismata Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s