# ConditionalExpression[] in Plot3D[]

I have a simple example in the following code:

Clear[f, f1, f2, x, y, c, conditions, substitution]
f1 := x
f2 := y
f := f1 + f2 + c
conditions := f1 > 0 && f2 > 0 && f > 5
substitution := {c -> 0}
Plot3D[ConditionalExpression[f /. substitution,
conditions /. substitution], {x, -10, 10}, {y, -10, 10}]


Output for the code: Using ConditionalExpression[] and substitution for the constant, I can Plot3D[] the function and the plot is realised where the condition is true.

My goal is not to hide the plot where the condition is false, instead of this, I would like to use another value for the false function. For example, if f1>0 is false: f1=0, if f2>0 is false: f2=0, if f>5 is false: f=5.

I have tried to do something like this, but it doesn't seem to work properly:

conditionSubst := {f1 -> 0, f2 -> 0, c -> 0}
Plot3D[ConditionalExpression[f /. conditionSubst,
Not[conditions] /. substitution], {x, -10, 10}, {y, -10, 10}] If it worked fine, the surface would be at a constant z level, because I substituted f1 and f2 with a constant, thus f isn't a function of x and y anymore (or possibly I don't think about ./ properly).

When there's f->5 in conditionSubst too, it works fine, the surface has the constant z value 5.

But this is still not what I want, because for example when only the f1 condition is false, I would like to substitute only the f1 with 0, f2 should remain the same, function of y in this case, and f is computed with the definition. And so on for the other variables, f2 and f.

Hope you can help with a simple solution. :)

Plot3D[Max[Max[x, 0] + Max[y, 0], 5], {x, -10, 10}, {y, -10, 10}] 