6

I want to create this animating torus in Blender. How can I make this?

Enter image description here

This is a photo of what I am talking about.

Duarte Farrajota Ramos
  • 59,425
  • 39
  • 130
  • 187
meknassi
  • 61
  • 2

4 Answers4

8

Edit: So it's not exactly what you want, as you want to keep parallelograms, but I leave my answer:

Stretch a cube (or hexagonal cylinder), subdivide it, hook its vertices to an empty, give it a Simple Deform modifier/ Twist mode, then a second Simple Deform modifier/ Bend mode:

enter image description here

Rotate the empty:

enter image description here

With an hexagonal cylinder, with a 360° twist:

enter image description here

enter image description here

Yours:

enter image description here

moonboots
  • 155,560
  • 7
  • 105
  • 171
  • First of all, thank you zo much for your answer. By twisting and bending you will never reach the result shown in the link. in the original work you see only Parallelograms and it is not easy to reach it. i tried to use curves in place of bending, and I used helix in place of the circle used in normal bending. the challenge is how to set the right position of camera. note it is an impossible torus! – meknassi Dec 29 '21 at 10:48
  • 1
    Are you sure it's an impossible shape? See my edit, it looks exactly like an hexagonal cylinder with a 360° twist – moonboots Dec 29 '21 at 11:01
  • When you compare your result with the original link you see that your result does not contain any parallelograms and that is the difference! By using normal bending the faces will shrink and the original parallelograms will lose their shapes. By using a helix with a curve modifier the original parallelograms will maintain their shapes. only the challenge is how to find the right position of the camera to reach the result shown in the link. By looking at the photo in the link you can realize that is a hexagonal cylinder in a helix curve! – meknassi Dec 29 '21 at 11:34
  • 1
    Oh ok I think I understand what you mean, perhaps you should specify that in your original question – moonboots Dec 29 '21 at 11:41
6

So as you've noticed, this is an impossible shape. A torus is (mostly) made out of trapezoids, not parallelograms. And there's no perspective that will turn all of those trapezoids into parallelograms.

But there's not really any such thing as an impossible shape. Impossible shapes are perfectly possible in 2D. They're only impossible because they mislead us about the 3D shape they represent. Your shape is no torus. It is a collection of six circular rings, viewed from an orthographic perspective:

enter image description here

One set of those rings is demonstrated on right. When you create six of them, you have the "wireframe" of the shape you're looking for. That's easy enough.

After that, the tricky part is getting the occlusion right. As you can see in the center, manipulating the Z-height to get the right faces occluded is pretty tricky. I just did this to eye, using vertex weight proximity and local space displace modifiers:

enter image description here

My implementation of the occlusion isn't quite perfect. This isn't a shape that was made to be created in a 3D program, it's a 2D shape. Manipulating the height to create the proper occlusion is a hacky workaround.

There's an armature at the top. Basically, each ring is moving around a slightly offcenter bone with "inherit rotation" disabled. The vertex groups to displace the faces in local Z are created from vertex weight proximity modifier, targeting empties that rotate about the center with the rotation of the main bone.

These vertex weight proximity modifiers aren't quite the right solution. You want every face ripped from each other, and you want every face to displace evenly. Vertex weight proximity instead creates per-vertex weights that are undesirable. Better would be to rip all faces, shrink each face to almost 0, and then RGB displace XY in direction of normal to restore the size of each face, so that each face could get proper weights. But that's more work than I felt like doing.

You'll want the file of course:

Nathan
  • 24,535
  • 1
  • 22
  • 68
  • As I mentioned earlier. it is an impossible torus. To avoid the shrinking of parallelograms by bending using a default circle, I tried to use an array of 16 hexagonal cylinders. After twisting I used the curve modifier with a helix as a curve object. The problem is how to position the camera to reach the best result. – meknassi Jan 01 '22 at 13:10
  • I think your method is the best one to achieve the result. It is for me difficult to position the bones. I will appreciate it if you can make the same project only for one ring to understand how it works. Thank you so much for your time. – meknassi Jan 10 '22 at 14:53
  • @meknassi The problem is that one ring doesn't show anything. The tricky thing here is the occlusion, because this isn't really built for 3D; it's the "wrong" occlusion that makes the shape impossible. – Nathan Jan 10 '22 at 17:17
5

This is using geometry nodes - I'm still a bit of a noob at it, but the advantage is you can dynamically change the resolution of the torus profile shape and circumference, and even add more twists if you need to.

Animating torus using Geometry Nodes

The method is simply to create a circle path and have another circle (of 6 sides, say) as the path profile. Then you rotate the path using 'Set Curve Tilt'.

Geometry nodes setup

I realise this does not address the 'impossible shape' problem, but it looks close enough so I thought I'd share.

Edit: I can get the material looking similar by connecting the Random Per Island through a ColorRamp set to constant, but it only works in Cycles, not Eevee:

Torus with material

enter image description here

Here's the file (created using 3.1 alpha, which you may need to grab if you're not already using it):

DaveHuman
  • 71
  • 3
  • As I mentioned earlier. it is an impossible torus. To avoid the shrinking of parallelograms by bending using a default circle, I tried to use an array of 16 hexagonal cylinders. After twisting I used the curve modifier with a helix as a curve object. The problem is how to position the camera to reach the best result. – meknassi Jan 01 '22 at 13:28
2

Working from moonboots' answer I got a bit closer, skewing the cylinder lengthwise before the modifiers and using an Orthographic camera:

enter image description here

enter image description here

KickAir8p
  • 2,352
  • 2
  • 8
  • 22
  • As I mentioned earlier. it is an impossible torus. To avoid the shrinking of parallelograms by bending using a default circle, I tried to use an array of 16 hexagonal cylinders. After twisting I used the curve modifier with a helix as a curve object. The problem is how to position the camera to reach the best result. – meknassi Jan 01 '22 at 13:27
  • Camera position (which I prominently included in the screenshot in my answer) is only one of the issues in achieving this illusion in a 3D space. Camera settings such as orthographic or perspective (and, if perspective, what focal length) would also be crucial. But if “The problem is how to position the camera to reach the best result” then “How do I position the camera to reach the best result?” should be in your question, not just in the comments. – KickAir8p Jan 01 '22 at 16:21