Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
hardcore_gamer

45 degree angle doors

Recommended Posts

How do you guys handle this? I never end up with the correct size of 128 or 64 when making doors that aren't either straight vertical or horizontal. It's driving me nuts.

Share this post


Link to post
Posted (edited)

You can build it on the grid and rotate it to make it fit. I think that's what most do.

Select the sector, the E to "edit selection" and use the corners of the selection to rotate.

Share this post


Link to post

Well just lower the grid value and move all of the door vertex untill you have the correct size, don't mind if you get some odd non 45 degree angles, it isn't going to be noticeable on the game

Share this post


Link to post
Posted (edited)

This is what I am talking about: https://ibb.co/dGDxPU

 

Simply rotating the doors won't make them fit on the grid. It's massive pain making anything at a 45 degree angle without messing up the proportions. And yes it does matter because if size dimensions are wrong then aligning textures becomes a pain.

Share this post


Link to post

Fun fact: Trying to solve this exact problem as a kid was how I learned about the pythagorean theorem!

 

For 45 degree angles, a diagonal line will be √2 times the length of a horizontal line of the same width, so it is impossible to get perfect texture alignment. A 64-unit line rotated diagonally would be 45.2548 units wide.

 

A triangle with length ratios of 3 4 and 5 can be made using whole number lengths, so you should be able to make one of those with perfect alignment.

 

Share this post


Link to post

A 64-unit-wide door is 4 grids on the 16-unit grid. I would make a line that is 3 grids diagonally That will be a reasonably close starting point. Then lower the grid size and fiddle with it until you have a satisfactory result.

Share this post


Link to post

It is possible to draw a 45 degree line that is ~64 units wide using a 1 unit grid. With a 2 unit grid, you can make a 45 degree line that is ~62 units wide.

  1. Draw a 45 degree line of any length.
  2. Turn the grid size down.
  3. Depending on where on the original linedef you want the door to be, add 1 or 2 vertices and move the vertices until a section of that linedef is ~62 or ~64 units wide.
  4. Make that 62 or 64 unit wide section inset to make your door.
  5. For a 62 unit wide linedef, change the x-offset of your texture to 1.

Personally, I like the look the ~62 unit wide 45 degree angle door more than the ~64 unit wide 45 degree angle door, but it's just personal preference.

 

You can follow the same general procedure for 45 degree doors close to 128 or 256 units wide, using appropriate offsets to center the texture.

 

Share this post


Link to post

A general observation here: If you deselect "Snap to Grid" you can get vertex control down to one unit. You can adjust your linedef length to be exactly 64 units at any even-numbered angle. For a 45 degree angle you'll be able to get a length of 63 units.

 

In-game, the difference between a 63-unit and 64-unit linedef is negligible. Likewise, for 44 degree and 45 degree angled linedefs. Your best bet is to use the method Pegleg and others suggest.

Share this post


Link to post

Are there any door textures that don't require a very specific length to look good? Why are we forcing ourselves to deal with these inconveniences?

Share this post


Link to post

Lately I've been thinking of how useful it would be to rotate and offset the grid in doom builder, in a way where every grid line intersection is at a valid integer coordinate. It would make building rooms that aren't axis-aligned boxes a lot easier if it came with the same snap-to-grid functionality. 

Share this post


Link to post
4 hours ago, meapineapple said:

Lately I've been thinking of how useful it would be to rotate and offset the grid in doom builder, in a way where every grid line intersection is at a valid integer coordinate. It would make building rooms that aren't axis-aligned boxes a lot easier if it came with the same snap-to-grid functionality. 

Clever idea. Although, I wonder at the coding difficulty of implementing it in a map editor.

 

I agree that working with non-orthogonal angles can sometimes be a pain. Mostly, however, I've found that working with 45 degree angles is manageable: You can generally stick to the primary vertices of the grid without having to zoom in too much, and can create linedef lengths that fit within the DooM texture scheme (8, 16, 32, 64, 128, etc.)

 

Working with non-orthogonal angles that are also not at 45 degrees is less convenient. I've given up on the idea of breaking up a linedef into multiple segments, inserting windows/doors, etc., while also maintaining the absolute straightness of the original line. Now, I just unsnap to grid and move the vertices around until the overall surface generally looks straight. I've found that, in-game, any "crookedness" of the linedef is imperceptible.

Share this post


Link to post
On 10/10/2018 at 2:23 PM, ReX said:

Working with non-orthogonal angles that are also not at 45 degrees is less convenient. I've given up on the idea of breaking up a linedef into multiple segments, inserting windows/doors, etc., while also maintaining the absolute straightness of the original line. Now, I just unsnap to grid and move the vertices around until the overall surface generally looks straight. I've found that, in-game, any "crookedness" of the linedef is imperceptible.

 

I'm working on a MAP11 replacement where I want the outside to be a huge circular staircase, but unfortunately I started work on an old version of Doom Builder, before it had tools to draw circles or ellipses, and I just couldn't quite get a perfect circle. Once I got GZ Doombuilder, I even experimented with merging all the stairs back into one section and trying to make a quarter circle and set the line arc to 90 degrees, but that still didn't look right. At that point, the only way to fix it would have been to tear apart even more of the level and rebuild it later, but I decided that the imperfect circle was close enough and went back to the old version before I started tearing it apart. In-game it looks pretty round.

Share this post


Link to post

When I want to stick to the grid, I usually split the door linedef to two or more parts, and then adjust the texture offsets of each part until it looks acceptable.

 

tmLxdqD.png

Share this post


Link to post

Can't you build everything on a 90 degree angle, then rotate the whole thing at the end? Won't that preserve the line lengths? Or am I missing the point?

Share this post


Link to post

No it won't. Doom vertices can only be aligned to at minimum a 1-mu (map unit/pixel) grid. When you draw orthogonal and rotate you wind up with vertices which have coordinates in-between the 1x grid, which are then approximated to their closest grid coordinate and snapped to it, which as you can imagine will change the lengths and angles of the rotated lines. While this doesn't make much of a difference for larger lines, smaller lines are affected more noticeably. It should also be noted that you likely cannot produce a perfect 45 degree angle this way, save for certain very specific line lengths, as the approximation will likely skew the starting shapes and destroy any little/acute detailing already done.

 

I should also note that orthogonality is somewhat relative; on a map view it may be clear what is orthogonal or not, but an orthogonal level merely turned 45° at the very end will still feel and look orthogonal to a player in-game, except that 45° spaces are deceptively more tight in Doom than spaces made with literally any other angle.

 

Although I am way late to this... comical thread, my 2 cents for the OP or anyone else with a similar question is to actually not be lazy and draw a line at a 45° angle, (it's not hard, 1 relative mu vertical for 1 equivalent mu horizontal) then do the line's length approximation yourself; this will preserve the "ooohhh perfect" 45° angle and textures can easily be chopped up and made to fit any length of surface if you just put your mind to the task and be a bit creative. Split the door texture/line into multiple parts and move the texture left/right to make a new texture of your desired length, much as Worst noted.

Share this post


Link to post
9 hours ago, Fonze said:

No it won't. Doom vertices can only be aligned to at minimum a 1-mu (map unit/pixel) grid. When you draw orthogonal and rotate you wind up with vertices which have coordinates in-between the 1x grid, which are then approximated to their closest grid coordinate and snapped to it, which as you can imagine will change the lengths and angles of the rotated lines.

Right, of course. Square root of 2 is a bitch! Actually, it is probably doable, for a specific set of lengths, and for specific angles, though probably not worth the effort, over just drawing at 45 degrees to begin with.

Share this post


Link to post

And here I was, thinking I am super clever by just creating a straight room and then rotating it, thus having a perfect 45° room along the grid. ;/

 

At least it makes the actual building more easy and comfortable. Moving vertexes and linedefs in a non straight room is anything but convenient. 

 

Thanks for all the posts in here, taught me a lot! 

Share this post


Link to post

The stairbuilder tool can help out with odd-angled doors. When you make sure the line that'll become the door sector is the appropriate length (128, 64, etc.), you can use the stairbuilder tool to just extrude one sector of your desired depth (16, 32, etc.). It won't be perfect in some cases, depending on the angle but I find it works quite well most of the time.

Share this post


Link to post
12 hours ago, Fonze said:

No it won't. Doom vertices can only be aligned to at minimum a 1-mu (map unit/pixel) grid. When you draw orthogonal and rotate you wind up with vertices which have coordinates in-between the 1x grid, which are then approximated to their closest grid coordinate and snapped to it, 

 

 

That depends on which editor you choose

 

8Av8DBC.png

 

Mapunits smaller than 1 mp were first available in GZDoomBuilder_r2772 by MaxED and then consequently later in GZDoomBuilder-Bugfix.

 

Rotating a sector (or linedefs) in Edit Mode makes 45 deg angles a snap.

Edited by Kappes Buur

Share this post


Link to post

Right, but <1 mu grid sizes aren't supported in Doom and Boom formats. This is a feature that is only available in UDMF format because of the format's greater precision and flexibility in vertex placement, among many other things.

Share this post


Link to post

Imo easiest way is to make a linedef at a 45° angle that is almost the same length as you'd have for 90° doors, and then spitting it to compensate for weird proportions if the texture allows for that. Alternatively you just add another texture to the sides of the door (split linedef again) to make the whole thing look "plausible" while also sidestepping the length issues with linedefs. Yes, it is more finnicky, but at least it works without having to use "less than 1mu grid sizes".

Share this post


Link to post

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×