Closed themilkdrinker0 closed 2 years ago
@themilkdrinker0 What if you fiddle with the "Focus" brush setting slider?
1.0 Focus
0.1 Focus
Same brush size.
@themilkdrinker0 But what about more intermediate values for brush focus? .2, .3, .5, .7, .8?
(I agree the "Size" brush setting needs a higher maximum than 1.0.)
0.2 seems to give the best result, but could be more responsive, that's dragging all the way to the corner of the screen, it would be nice for it to deform closer to the mouse movement.
Here's the formula for how focus affects the strength of the move at a vertex whose distance from the pointer is "d":
sd = d / radius
strength = (1 - sd^2) * (1 - (sd / focus)^4)
where "radius" is the brush size and "focus" is the focus brush setting, 0<focus<=1.
I have no idea where this formula came from; it's from before I started working on Outfit Studio.
It looks like Zbrush and Softimage use completely different formulas and perhaps even completely different algorithms.
Zbrush also has a second circle inside the brush display circle to represent the focus, this could be helpful too.
Here's a graph of the brush strength as a function of d / radius for focus of .1, .4, and .8 (using the formula above, which is from the current Outfit Studio 5.5.2 source code):
To me, there are some problems evident in these curves:
Ack! The formula I gave above is for focus<.2 . A different formula is used for .2<focus<1 . So the graphs above are labeled wrong: those are for focus=.08, .02, and .16, not .4, .1, and .8 .
The formula used currently for .2<focus<1 is: x = 5 focus (1 - sd) - 1 strength = (1 - x^2) * (1 - x^4) if x < 0 strength = 1 if x >= 0
Here are the graphs:
Here's an updated graph combining both ranges for focus:
@themilkdrinker0 Could you post your nif file with the sphere that you used in your screenshots? I want to test some possibilities.
Looking at your screenshots, I can see why .2 would give the best result: it has the nicest-looking curve in the graph.
Here's a possibility that I'll name "the cubic option":
p = 6^(2 focus-1) x = sd^p strength = 2 x^3 - 3 * x^2 + 1
(I chose the number "6" in the formula to give reasonable extremes: the higher that number, the more pointy it is at 0 and the more flat it is at 1, with .5 staying the same. The other numbers in the formula are necessary for this function to work.)
Here's a graph:
Here's its effect on the sphere at focus=.5 (and maximum brush size):
Focus=0:
Focus=1:
Focus=.25:
Focus=.75:
@themilkdrinker0 What do you think? Is it significantly better? Is there room for improvement?
Looks good to me, just make the 0.5 the default value when opening OS.
@ousnius What do you think? May I replace the formula in TweakBrush::getFalloff with the new formula, get rid of the factor-of-5 scaling, and set the default to .5 for all brushes?
themilkdrinker0 also requested that the maximum brush size be increased. It looks like, internally, brush size is scaled by 3. May I increase the scaling to 10?
@sts1skj Yes, please do so I can play around with the new formula myself. Feel free to increase the scaling to 10, but make sure to adjust the default size (0.150 right now) accordingly to be the same size it is currently.
@themilkdrinker0 Ousnius and I have played with the new brush scale some, and we don't like 10, so we're going to keep the old brush scale of 3. But we're also increasing the maximum size of the value that can be input into the text field next to the slider from 1 to 10, so you'll be able to get a larger brush size by typing in the number you want. We're also increasing the precision of the text field from 3 to 4, so you can type in smaller brush sizes.
OS move brush feels weird, I don't know how the 3D softwares do it, but I took some screenshots as an exemple:
Zbrush | Softimage | OS
Also, that's the maximum radius brush size in OS, it would be nice to have it extended.