Contemporary experiments often involve special factors known as branching factors. The levels of such factors determine the presence of some certain factors, referred to as nested factors. The design criteria for investigating the goodness of such designs are rarely developed. Furthermore, the existing criteria for such designs pay less attention to the space-filling property of low-dimensional projections of the design. The efficiencies of designs yielded by such criteria can markedly decrease when only a few factors are significant. To address this issue, this paper proposes a novel space-filling criterion based on the maximum projection criterion to evaluate the performance of the designs with branching and nested factors. A framework to construct optimal designs under the proposed criterion is also provided. Compared with the existing works, the resulting designs have better space-filling properties in all possible low-dimensional projections. Moreover, our strategy imposes no constraints on run size, level, and type of any factor, demonstrating its broad applicability.