  Two-dimensional (2D) materials have attracted considerable attention due to
their unique physicochemical properties and significant potential in
energy-related applications. Polymeric carbon nitrides (PCNs) with 2D stacked
architecture show promise as photocatalysts for solar-to-fuel conversion and as
versatile 2D semiconductors. However, the lack of a clear definition of the
exact structural model of these materials limits our fundamental understanding
of their unique properties. Here, we investigate the structure-induced optical
properties of PCNs through \textit{ab initio} calculations. Our study on the
electronic and optical properties of PCNs highlights the significant influence
of structure on their behavior, especially near band edges. The analysis
reveals that the degree of condensation and corrugation influences the
electron/hole localization and the energy levels of $\pi$ electrons, which are
crucial for the optical behavior. In addition, the microstructures of 2D
configurations lead to divergent optical properties in 3D configurations, with
characteristic peaks identified at 350 nm and interlayer interactions ranging
from 400 to 500 nm, depending on the specific microstructures. Through
observations over 2D and 3D structures, we elucidate exciton photophysical
processes in PCN materials. This highlights the substantial differences in
optical properties between actual 2D and 3D structures, while also
demonstrating the potential for carrier and energy transport mechanisms to
occur perpendicular to the plane. Finally, our results provide deep insights
into the understanding of previously hidden microstructural, electronic, and
optical properties of PCNs, paving the way for further performance and property
enhancements in this class of materials.
