-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
398: Prototype shape support for brush tool #4399
base: master
Are you sure you want to change the base?
Conversation
How well do you think this would work with multi-brush creation? After simple stuff like cylinders, I was planning to add support for hollow pipes/tubes, arches, etc., which is why I felt it might make more sense to be its own tool, but I guess if they're all sort of sub-tools, that could still work? Also wanted to add options for UV's and such so you could create seamless wrapping around cylinders. Another thing I'd like to be able to do is convert existing selected brushes to the shape/parameters. For example, say you made a simple blockout and wanted to replace all the pillars (just 4 sided blocks) with cylinders, or you placed some cylinders and wanted to just adjust the number of sides or radius without redoing them all. Maybe a simple "apply" button could work that's enabled when you have brushes selected. Not suggesting you do any of this stuff now. Just wanted to share stuff I wanted in the future to make sure it aligns with your design. |
That sounds like it should still work.
I don't see a problem with that either.
Yeah I have thought a bit about that and I'm not so convinced by this idea. There are parameters that you cannot detect easily (like the orientation of the cylinder you want to create). You would want this to be more flexible. What if your brush isn't oriented along a coordinate system axis? What if your brush isn't just a block? What if your brush is already a cylinder, but slightly slanted, and now you select it and choose a cylinder shape with more sides - wouldn't you expect the outcome to be still slanted? But the tool can't do that, because it doesn't know that the cylinder has been rotated or sheared or whatever. I think this will turn out to be more frustrating because in many cases it won't do what the user expects. |
94d3cd6
to
2138e34
Compare
I feel like just using the brush bonds and an axis selection would be sufficient and meet expectations. I don't think rotating cylinders at arbitrary angles is common practice. Don't the compilers sometimes freak out if you do that anyway? I think it'd quickly become obvious that the tool is just limited to the 3 axes. I don't think skipping out on functionality because it might not cover all cases is a good reason to avoid adding it all together. Personally, I find this kind of thing really useful in BSP where I can specify an exact radius -- especially if you're making a large room. Maybe I want to have something that has a radius of exactly 520 units. That'd be a pain to click and drag out, but if I could just place a brush in the center then set the radius and tweak the number of sides until it looked good, that'd be a much better workflow. |
TrenchBroom's UX is supposed to be simple, unsurprising and intuitive. That's why it's easy to use and easy to learn. So on the contrary, I think it's a very good reason to skip functionality if it doesn't fit these criteria.
Sure, there are always workflows that TB doesn't support well. But again, its UX is geared towards other principles. It's not workflow agnostic in that it supports everyone's workflows and ideas. Rather, TB is opinionated in that it is geared towards specific workflows. The idea is to make simple things simple, and difficult things possible. If we can make a difficult problem simple, that's great. But not at the price of overloading the UI with more and more options until a user can't tell what the intended workflow is. And the intended workflow in TB is drawing brushes with the mouse. That is why I often draw the line and decide not to support features that are only useful to a very specific way of working. I'm sorry about that, but it is more import to me to have a cohesive UX, even at the risk of making a wrong decision here and there. Also, if it turns out that there is a lot of demand to support a different workflow, we can always add things in the future. But the opposite is almost impossible - I can never take a feature away once it's in the editor. |
2138e34
to
35cf51a
Compare
I have cleaned up the code a bit and would propose this as a basis for adding more shapes and, later on, additional functionality. |
35cf51a
to
2c81cf6
Compare
I have added support for drawing brushes with a fixed aspect ratio in 2D and 3D:
|
@jitspoe Would you be interested to add more shapes on the basis of this PR? |
2c81cf6
to
ffd4ca9
Compare
@jitspoe any interest in working on this? |
Sorry, been busy lately and haven't had a chance to keep up with all the github stuff. What's left to do? Just more shapes? Can't promise when I'll have time to work on TB stuff again. Are you wanting me to work on this within a branch or is this in a state it could be merged into master and just have features added to it? |
No worries, we're all just hobbyists. I'd like to get a couple more shapes in before merging this, then we can add more shapes later on. I just want to ship this with more than two shapes. Let's compile a list of shapes that we think should be supported for a first iteration. Here's mine:
|
Oh, and I don't expect you to implement any of this if you don't have time right now. I can work on it, too. |
ffd4ca9
to
f30eb87
Compare
I did notice some differences in that last action build you made I didn't see mentioned. https://github.com/TrenchBroom/TrenchBroom/actions/runs/7267066845 The rotation tool setting had been removed. I assume it was intentional or due to being a WIP but just in case I thought I would comment. A prior build on the left with Rotation setting shown and your last primitive tool build on the right is lacking those. |
OK, after playing around with this a bit more it seems just the behavior changed slightly. Before you could select the brush, then activate rotation tool and the Rotation setting will just appear. Now after activating the Rotation tool you are required to make an extra click on the brush to make the settings appear. 2024-01-03.02-15-07.mp4 |
That's a bug, thanks for pointing it out! |
Even with just cube, cone, and cylinders the shape tool works pretty nice. |
f30eb87
to
8d05ac8
Compare
Your changes reminded me I had some WIP stuff to try to support hollow cylinders/tubes/pipes, but that meant making it so the brush tool could actually support an array of brushes. Not sure if I'm on the right track or not: a48deda |
8d05ac8
to
988ba06
Compare
988ba06
to
78959e6
Compare
Closes #398.
This is an alternative design for #4350 where the shapes are created with the
DrawBrushTool
. Additional shapes are added by implementing and registering a subclass ofDrawBrushToolExtension
.Also adds a few features for drawing brushes
Future ideas:
Todos: