ousnius / BodySlide-and-Outfit-Studio

BodySlide and Outfit Studio, a tool to convert, create, and customize outfits and bodies for Bethesda games.
GNU General Public License v3.0
286 stars 63 forks source link

Mirror Brush Display #435

Closed themilkdrinker0 closed 2 years ago

themilkdrinker0 commented 2 years ago

As shown in the gif, you can see it through the mesh too.

Bodyslide-2022 02 18---19 40

sts1skj commented 2 years ago

When X-Mirror is on, the Move Vertex tool (which you probably haven't seen yet) already does this. For the Move Vertex tool, the highlighted mirror vertex is exactly the vertex that will be mirror-moved if you click. The mirror vertex is computed like this: the camera position is mirrored; the direction from the camera towards the surface is mirrored; these give a ray in space; the location on the surface that this ray hits is found; the nearest vertex on the surface to this mirror-ray-hit location is found; this is the mirror vertex.

But that's not how the brushes work. The center of the brush action (which is highlighted red) is the point on the surface directly under the mouse and not the nearest vertex (which is highlighted cyan). For the mirror of the brush action, the center is the mirror of the non-mirror center (the point you get if you replace the center's x coordinate with its negative). If the shape is not at all symmetrical, this mirror center is not necessarily on the surface at all. Regardless if the mirror center is on the surface, inside, or outside, all points within the brush radius of the mirror center are affected (if X-Mirror is on).

So I wonder if it might be more useful to display the mirror of the brush center and brush radius circle than the mirror vertex.

themilkdrinker0 commented 2 years ago

Well, that was just an idea, mirroring the brush circle would be just as useful.