  The renormalized energy density of a massless scalar field defined in a
D-dimensional flat spacetime is computed in the presence of "soft" and
"semihard" boundaries, modeled by some smoothly increasing potential functions.
The sign of the renormalized energy densities for these different confining
situations is investigated. The dependence of this energy on $D$ for the cases
of "hard" and "soft/semihard" boundaries are compared.
