How to create curved tunnel

Any aspects of level design for the Source engine.

How to create curved tunnel

Postby skulz87 on Thu Nov 14, 2013 2:32 am

Hello, im creating a tunnel but i want it to turn 90 degree curved.
Can anyone teach me detailed if possible?

Here is what i mean:
Image

Also i accidentally closed the undo/redo bar how do i bring it back?

Thanks so much.
skulz87
Member
Member
 
Joined: Fri Nov 08, 2013 1:12 am

Re: How to create curved tunnel

Postby Smurftyours on Thu Nov 14, 2013 4:52 am

ctrl - z
ctrl - y

DONT USE THE BUTTONS ITS SLOWER
jangalomph wrote:Wise words from a wise man. ^
User avatar
Smurftyours
Senior Member
Senior Member
 
Joined: Tue Aug 04, 2009 6:11 pm
Location: California, US.

Re: How to create curved tunnel

Postby Armageddon on Thu Nov 14, 2013 5:28 am

Torus primitive.
User avatar
Armageddon
Forum Goer Elite™
Forum Goer Elite™
 
Joined: Sun Dec 14, 2008 5:53 am

Re: How to create curved tunnel

Postby wereMole on Thu Nov 14, 2013 7:28 am

The torus tool is the best way to get this: I have one of these curved tunnel systems in my map with a tot diameter of 96 units and its large enough to make the player pass without any issues. These are the two tubes I want to connect with a 90 degrees curved section:

Image

I doubled the space in the XY view that the curved tube is going to occupy to get a smooth turn: it's 192x192 (double of the tube's diameter).

Now creating the Torus - I usually create a donut shape and then remove 3/4 of the donut to obtain the part I want. Trying to directly produce that corner with the Torus tool usually results in a part that's compressed in a direction and doesn't fit the straight tubes at all. So the donut is double the size of the corner in both the X and Y direction: 384 by 384. In the z-direction the torus size should fit the tubes: 96 units.

Image

Now select Torus and press create object. You'll get a preview where you can select a number of options for your torus tube.

Wall width: The thickness of the walls of the torus. Logically the should be equal to those of the straight tubes. In my case 4 units.
Numbers of sides: also equal to the number of sides of your straight tube. In my case 12.
Arc: This is the rotation in the cross-section view. When you create the torus it will be "lying down" with the ring laying on the XY plane and the Z-axis pointing through the middle of the donut. The Arc indicates the rotation (0 to 360 degrees) of the tube in the XZ/YZ plane. Setting this at 180 would result in a 'half' a tube with for example the bottom half intact in the top half gone. You need a full tube so set it to 'circle' or 360.
Start angle: where the Arc starts, since you have a full tube it's irrelevant.
Cross-section radius: This one is a bit difficult to explain but it's the distance of the outer wall of the tube in the XY plane to the middle of the tube in the XY plane. Since the tube is 96 units wide this value should be put at 48 to exactly fit the straight tubes. Alter this value a bit and you can see how it affects the radius of the tube in the XY plane (top view).
Rotation sides: how many segments your donut consists of. I want my corner to consist out of 4 segments (that's already 4x12 = 48 brushes!) so the total donut should have 4x4 = 16 sides.
Rotation arc: if you put this on 90 degrees you get a 90 degree corner in the top view. If you put this at 360 you get the full donut.
Rotation start angle is where your corner starts (irrelevant for a donut).

Create object - and voila:

Image

Then clip away the unnecessary parts and you have a perfect fitting 90 degrees twist with the torus.

Image

And an ingame screenshot of the inside of the one I used in my map:

Image
User avatar
wereMole
Regular
Regular
 
Joined: Tue Jun 13, 2006 10:55 am
Location: Netherlands

Re: How to create curved tunnel

Postby wereMole on Thu Nov 14, 2013 7:40 am

In your case you could either change the Arc to 180 degrees and the start angle at 0 to obtain the tunnel shape you want (NOT the rotation arc and rotation start angle). You can also just create the full donut and then clip the bottom half away.
User avatar
wereMole
Regular
Regular
 
Joined: Tue Jun 13, 2006 10:55 am
Location: Netherlands

Re: How to create curved tunnel

Postby skulz87 on Thu Nov 14, 2013 4:08 pm

wereMole wrote:The torus tool is the best way to get this: I have one of these curved tunnel systems in my map with a tot diameter of 96 units and its large enough to make the player pass without any issues. These are the two tubes I want to connect with a 90 degrees curved section:

Image

I doubled the space in the XY view that the curved tube is going to occupy to get a smooth turn: it's 192x192 (double of the tube's diameter).

Now creating the Torus - I usually create a donut shape and then remove 3/4 of the donut to obtain the part I want. Trying to directly produce that corner with the Torus tool usually results in a part that's compressed in a direction and doesn't fit the straight tubes at all. So the donut is double the size of the corner in both the X and Y direction: 384 by 384. In the z-direction the torus size should fit the tubes: 96 units.

Image

Now select Torus and press create object. You'll get a preview where you can select a number of options for your torus tube.

Wall width: The thickness of the walls of the torus. Logically the should be equal to those of the straight tubes. In my case 4 units.
Numbers of sides: also equal to the number of sides of your straight tube. In my case 12.
Arc: This is the rotation in the cross-section view. When you create the torus it will be "lying down" with the ring laying on the XY plane and the Z-axis pointing through the middle of the donut. The Arc indicates the rotation (0 to 360 degrees) of the tube in the XZ/YZ plane. Setting this at 180 would result in a 'half' a tube with for example the bottom half intact in the top half gone. You need a full tube so set it to 'circle' or 360.
Start angle: where the Arc starts, since you have a full tube it's irrelevant.
Cross-section radius: This one is a bit difficult to explain but it's the distance of the outer wall of the tube in the XY plane to the middle of the tube in the XY plane. Since the tube is 96 units wide this value should be put at 48 to exactly fit the straight tubes. Alter this value a bit and you can see how it affects the radius of the tube in the XY plane (top view).
Rotation sides: how many segments your donut consists of. I want my corner to consist out of 4 segments (that's already 4x12 = 48 brushes!) so the total donut should have 4x4 = 16 sides.
Rotation arc: if you put this on 90 degrees you get a 90 degree corner in the top view. If you put this at 360 you get the full donut.
Rotation start angle is where your corner starts (irrelevant for a donut).

Create object - and voila:

Image

Then clip away the unnecessary parts and you have a perfect fitting 90 degrees twist with the torus.

Image

And an ingame screenshot of the inside of the one I used in my map:

Image


Oh great explanation, i will try to create on this, thanks for your time.
skulz87
Member
Member
 
Joined: Fri Nov 08, 2013 1:12 am

Return to Hammer Editor Help

Who is online

Users browsing this forum: Bing [Bot]