OldUnreal / UnrealTournamentPatches

Other
1.01k stars 29 forks source link

[UEd] Add functionality to quickly resize brushes to exact dimensions using a modal popup #222

Open dizzy-egg opened 3 years ago

dizzy-egg commented 3 years ago

When building architecture in UEd it is often necessary to create brushes with exact dimensions. This could be because you're trying to match the size of an existing brush; trying to ensure your brushes are alinged to the grid; or just know the exact dimensions of what you want to build.

To that end it would be extremely useful to be able to quickly transform/resize brushes on-the-fly without having to edit their Properties or use the transform tool.

Having a small modal popup which appears when a brush is selected and which allows you to see and change the dimension(s) of the brush would be ideal.

A great example of this is on TinkerCad which has this exact functionality for each side of a brush:

SeriousBuggie commented 2 years ago

There is fundamental problems - UnrealEd not store info about shapes. After you apply builder to brush it is not more then bunch of points (vertexes) and planes (group of vertexes). So not clear what you exactly want to do with this points.

In fact all what can you do is vertex dragging. You can select one or few vertex and drag it. it is very dangerous operation. All responsibility for proper conditions for this vertexes goes to mapper. You can easily blow up everything. Even simple and clean drag can make surface not coplanar or brush not closed. Also UnrealEd able crash if something goes wrong.

Best way what can be done - addition for vertex editing mode. Like in Figma, when you move object or even move cursor there appear rules show distance to some closed objects. Same here, possible draw distance from selected vertexes to another closest vertex in same brush. And show above this line editable distance, So if you click here and enter number, vertex moved appropriately.

dizzy-egg commented 2 months ago

@SeriousBuggie Re-visiting this issue again. I understand your point about brushes being a bunch of vertexes.

I think your proposed solution is exactly what I want. Click on the edge of a brush (the line between two vertexes) and the distance between the line's two vertexes appears: image

This would obviously become complicated if the shape is more complex or has multiple intersecting faces:

image

But perhaps you could multi-select several lines and get an overall measurement if the lines are on the same plane?

image

If the lines are not on the same plane or the shape is irregular, then it becomes a bigger problem:

image

But these problems are not insurmountable and it would be a great feature even if it was only available on regular shaped brushes at first.

dizzy-egg commented 2 months ago

TinkerCAD handles this nicely btw.

In 3D view with a regular shape, selecting vertexes on the horizontal plane:

image

And the vertical plane:

image

In 2D (orthogonal) view:

image

For irregular shapes it lets you resize the overall dimensions:

image

SeriousBuggie commented 2 months ago

In CAD system sizes important. In mapping important match pieces. So your good numbers fast turn into fractional with bad precision. And you start map off-grid. Which make hard get stable BSP. Only you out of cubes, you will get fractional values, which be impossible to edit by human. And if you make them integer you easy ruin map. Make non-coplanar surfaces and gaps.

Important be on grid. Not make beauty integer distance between vertices. It is not CAD. You not need blueprint for them.

dizzy-egg commented 2 months ago

In CAD system sizes important. In mapping important match pieces. So your good numbers fast turn into fractional with bad precision. And you start map off-grid. Which make hard get stable BSP. Only you out of cubes, you will get fractional values, which be impossible to edit by human. And if you make them integer you easy ruin map. Make non-coplanar surfaces and gaps.

Important be on grid. Not make beauty integer distance between vertices. It is not CAD. You not need blueprint for them.

It sounds like the problems you describe would be the fault of the mapper, not the fault of the tool itself. Mappers can already break maps using vertex editing or dragging brushes around or a million other ways.

Even the default brush builder lets you type in numbers. So I don't see why a "resize by numbers" tool like I suggest shouldn't exist just because it could break maps.

Also it could be limited to cuboids. That would still be super useful.

SeriousBuggie commented 2 months ago

That just show very narrow scope of real usage of such tool.

dizzy-egg commented 2 months ago

That just show very narrow scope of real usage of such tool.

Maybe, but it would be a natural complement to the new Measure size or distance via Box Selection feature. After you've measured the size of something, you need a way to re-size it too, no? Otherwise you're just measuring for no reason. 😃

SeriousBuggie commented 2 months ago

You can measure for different goals. For example - ensure path node not far enough. Or use this values for insert new brush, where you can input numbers. Instead of guessing and scale after.