The article was possibly aimed at engineers or mathematicians so the author thought the benefits didn't need explaining.
A soft maximum might be useful if you want a differentiable function that closely approximates the max() function. By differentiable I mean you can work out the rate of change of the function at any point. With the hard maximum, the rate of change at the hard edge is not defined. Nicer to have one function to represent the RoC and not have to worry about special cases.
Yep, I do have a CS degree, and I realized that the crisp corners are not differentiable ... but a short paragraph about that and giving a few real world examples would have strongly improved the post.
As flipper points out, the problem is that the hard maximum is not differentiable; that is, the differential of max (x, y) is undefined when x == y. Most numerical approximation techniques require a smooth, differentiable function, so this is bad.
A related problem is that of bounding. Suppose I want to minimize the parameters in a set of nonlinear equations; I can numerically differentiate the equations to get the gradient and the Hamiltonian and then I can minimize that. But I may want to impose additional criteria, like x > 0. I could just say the function goes to some preposterously high number when x <= 0, but then we have this hard corner problem again. Instead if you use a continuous function like a logarithm to impose your bound, it affects the solution space minimally, makes for a solution that will not wander outside your bounds, and is differentiable.
These sorts of softened/smoothed functions are particularly useful in games and animation. I've personally used this function for animated sliding board game pieces in a 3D simulation. The piece launches from one square at full speed and then comes to a nice soft stop after some amount of time. Much more attractive.
Comments
The huge flaw with this article: explaining WHY I would ever want to use a soft maximum.
Yes, it "sands off the corners".
Why do I want that?
The article was possibly aimed at engineers or mathematicians so the author thought the benefits didn't need explaining.
A soft maximum might be useful if you want a differentiable function that closely approximates the max() function. By differentiable I mean you can work out the rate of change of the function at any point. With the hard maximum, the rate of change at the hard edge is not defined. Nicer to have one function to represent the RoC and not have to worry about special cases.
Yep, I do have a CS degree, and I realized that the crisp corners are not differentiable ... but a short paragraph about that and giving a few real world examples would have strongly improved the post.
As flipper points out, the problem is that the hard maximum is not differentiable; that is, the differential of max (x, y) is undefined when x == y. Most numerical approximation techniques require a smooth, differentiable function, so this is bad.
A related problem is that of bounding. Suppose I want to minimize the parameters in a set of nonlinear equations; I can numerically differentiate the equations to get the gradient and the Hamiltonian and then I can minimize that. But I may want to impose additional criteria, like x > 0. I could just say the function goes to some preposterously high number when x <= 0, but then we have this hard corner problem again. Instead if you use a continuous function like a logarithm to impose your bound, it affects the solution space minimally, makes for a solution that will not wander outside your bounds, and is differentiable.
These sorts of softened/smoothed functions are particularly useful in games and animation. I've personally used this function for animated sliding board game pieces in a 3D simulation. The piece launches from one square at full speed and then comes to a nice soft stop after some amount of time. Much more attractive.
For your googling: "easing function"