TokisanGames / Terrain3D

A high performance, editable terrain system for Godot 4.
MIT License
2.23k stars 133 forks source link

Implement Slope Sculpting Tool #96

Closed TokisanGames closed 9 months ago

TokisanGames commented 1 year ago

This issue is for sculpting a slope. This should be a tool. For painting textures by slope, see #282

Brush Slope does nothing and was hidden in 283767e1162e558f4f32bb1037014a08507406e8, merged in #91.

Implement it.

tcoxon commented 11 months ago

It's looking like I'll need this tool for my project. Do you have a particular idea in mind for how it would work? If our needs align, I could consider implementing & contributing it.

Something like the flatten tool, where you pick a starting height, then click and drag, with the difference being the further you drag from your starting point, the lower the height gets, according to an angle setting?

TokisanGames commented 11 months ago

I'll take PRs for slope sculpting. I'm thinking: Select starting point, Select ending point, and it automatically creates a grade between them in the general shape and size of the current brush.

Starting/ending elevations can be predefined with the other brushes.

I've found when brushing heights that I need a slope to connect between a higher area and a lower area. I don't think I've ever needed an arbitrary length brush. Have you found differently? Where you want to start making a grade without a destination in mind?

tcoxon commented 11 months ago

Have you found differently? Where you want to start making a grade without a destination in mind?

We're only just in the process of initially blocking out terrain. In our case, the destination doesn't matter too much because almost all space is unused. And it can be useful to guarantee a particular angle to the slope to ensure navigability. But I can see that if you've already got a lot of stuff on your terrain that you want to keep, it makes sense to need a particular end point.

Do you see slope height brush as being:

  1. Drag from starting point to ending point. Then when you release the mouse button, it modifies the terrain with a slope between them in a straight line from start to end.
  2. Or click starting point, click ending point, then click and drag out a potentially wavy line between the two, modifying terrain as the mouse moves?
TokisanGames commented 11 months ago

What I envision is a simple: Click start, click end, straight slope is created. No drag.

However, if you want to do # 2, click start, click end, then it becomes drawable with height auto adjusting depending on proximity to start or ending points, also using opacity. That's an interesting option.

Why don't you do both? Have a drawable checkbox. If it's not checked we get the instant straight slope. If checked it is drawable.

tcoxon commented 11 months ago

What would opacity do here?

TokisanGames commented 11 months ago

Try the height brush with low opacity and you'll see it fills in more gradually than when it is 100%.

TokisanGames commented 11 months ago

I have split sculpting a slope from slope painting into two separate issues. Let's keep the discussion on sculpting a slope here. Painting based on slope has been moved to #282.

TokisanGames commented 9 months ago

Fixed by #297