15
$\begingroup$

I need to to create a twisted tunnel. Example: picture

Though the stripes should have volume since the tunnel is the inner side of spiraled marshmallow tubes. Example:

I started adding a screw modifier to a plane which looked promising from from the tutorial, though not on the inside: picture

Any ideas or should I try to start with a bended cone, add a twisted color ramp & bump?

$\endgroup$
18
$\begingroup$

The hard way

But the way you can use to pour sugarlicious material on.

As usual we'll begin with a simple vertex. Easiest way is to add a cube, or plane, and go into edit mode, vertex select mode, select all with A then Right Click > Merge > At Center.

enter image description here

Add a Displace modifier set to X, lower the midlevel and increase the strength. Don't mind the vertex group, you don't need it.

enter image description here

Add a Screw modifier, increase the screw, iterations and steps (viewport and render)

enter image description here

Let's give it some thickness ! First add another screw, but set the steps to 1.

enter image description here

How to create a noodle. Don't worry about the wonky shading just yet.

enter image description here

Add a Bevel modifier set to angle and crank up the width. Add a Weld to remove the seam in the middle.

enter image description here

The tricky part. Add an empty, set it as the object offset in a new array modifier. Now we drive the empty rotation so that the result is always equally separated.

enter image description here

Set the array count to 10.

enter image description here

Add a Bezier curve, scale it. Add a Curve modifier to the other object, and set the curve as the target.

enter image description here

Let's shade this masterpiece ! (Easy part)

enter image description here

What the ?? Everything's white !

enter image description here

Let me show you the simplest magic trick in the book. Offset UV in the Array modifier.

enter image description here

Final result :

enter image description here

I'll let you play with the settings, not all the fun for me :)

$\endgroup$
3
  • 2
    $\begingroup$ Hmmm,,,, how did I know whose answer this was, way before I reached the bottom? $\endgroup$ – Robin Betts Feb 17 at 22:10
  • 3
    $\begingroup$ I'm probably breaking rules here, heck I don't care: Thank you, thank you, thank you so much @Gorgious $\endgroup$ – 412p9wej Feb 18 at 6:50
  • 1
    $\begingroup$ @412p9wej Sure by SE's rules you are technically not supposed to leave a comment like that (maybe). It very well might get deleted. But Gorgious has already seen it. The comment has served its purpose. I too have thanked the authors of particularity helpful answers. As long as you don't replace up voting with a thanks comment, I have no problem with saying thanks in a comment. $\endgroup$ – David Feb 19 at 3:15
10
$\begingroup$

In my opinion there is no need to create the actual geometry, since you may achieve the same effect (more or less) with normals and displacement (if you are using cycles microdisplacement will do the trick).

So I would start with a typical cylinder and I would use a seamless texture with stripes.

enter image description here

The trick is simply to rotate the texture, for few degrees enter image description here

Just keep always in mind that there must be always a proper ratio between the rotation (degrees) and the thickness or the count of the stripes.

enter image description here

$\endgroup$
4
  • 2
    $\begingroup$ How have you got the rotation there? Have you manipulated the UV map to rotate the faces? Also, please explain why the Checker Texture.... surely that will produce edges when it gets to the next row (or, presumably, the Scale settings are avoiding that, to a certain point. How do you calculate the angle to use to make it seamless or is it just 'by sight'? $\endgroup$ – Rich Sedman Feb 17 at 12:19
  • 1
    $\begingroup$ For the rotation/manipulation I am using the mapping node (there is no need to alter/edit the UVs of the object). Mapping node provides all the basic transformation you need to change a texture, which in this case is a checker. So what I did was to shrink as much as it was needed the Y scale and raise the X. I could probably use a gradient with a ramp if I was looking for smooth "edges" in my texture. Regarding the angle it is adjusted intuitively. Try to replicate it and play a bit so you can understand how it behaves. $\endgroup$ – cnisidis Feb 17 at 12:31
  • $\begingroup$ Oh, I see - because the Rotation applies before the Scale it's already rotated in relation to the 'straight' UV mapping and that's where the twist comes from. Nice solution (just need to be careful it doesn't get to far along the texture. $\endgroup$ – Rich Sedman Feb 17 at 12:59
  • $\begingroup$ cnisidis and @RichSedman I've been trying to automate this, and can't get the numbers to make any sense.You want to rotate or shear the rectangular UV space so the phase at Y=1 is the same as the phase at Y=0, and the rectangle can be rolled into a tube with the edges matching. Tried with a shear, too, but parameter that works is always slightly off the one I would expect.. it would be nice not to have to eyeball it. $\endgroup$ – Robin Betts Feb 18 at 8:07
9
$\begingroup$

I would use a Bezier Curve, it's typically easier to create tunnel-like objects.

In the Object data properties, add a bit of depth to create the tunnel. Increase the preview resolution (number of subdivisions between each control point) and the bevel resolution.

enter image description here

Add a material, go in to the Shader Editor. The curves come in auto-UV unwrapped so we will be using the UV coordinates. Add a wave texture, and tweak the settings as you see fit. I used a Bright / Contrast node to incrase the contrast, you can also use a Color Ramp. Next for the bumpiness, I added a Math node set to Ping-Pong, at half value, so the light will reflect on dark rings as well as on bright rings. I added a RGB Curves node and smoothed the values, and plugged that into a Bump node, and finally into the Normal input of the Principled BSDF.

A little bit of distortion in the Wave texture is nice, but it add a visible seam in the texture.

enter image description here

Result :

enter image description here

To get the twirly effect, we will have to play a bit with the coordinates. Thankfully it is not too hard since the UVs are nicely mapped to to body of the curve. We will use the Y coordinate to offset the wave, creating the twirl.

First change the wave texture to be along the Y axis. We will offset the Y coordinate by a multiple of the X coordinate. You can play with it. I recommend starting at a low multiple and working your way up, else you won't see much happening.

The nodes :

enter image description here

Result :

enter image description here

enter image description here

$\endgroup$
4
  • $\begingroup$ Thank you. If I may say, the black part should be one stripe instead of many rings. Is that possible? $\endgroup$ – 412p9wej Feb 17 at 15:51
  • 1
    $\begingroup$ @412p9wej I see, I edited the answer, is that what you are looking for ? $\endgroup$ – Gorgious Feb 17 at 16:36
  • 1
    $\begingroup$ Mesmerizingly good. $\endgroup$ – batFINGER Feb 17 at 16:47
  • $\begingroup$ @Gorgious Outstanding :) I'll pour liquid and put licorice into that tunnel. I will need geometry in order to have correct interplay between all objects don't I? If so, I will gladly edit my question and emphasize on geometry $\endgroup$ – 412p9wej Feb 17 at 17:06

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.