SfM (structure from motion) photogrammetry is a technique developed in the field of computer vision that enables the generation of three-dimensional (3D) models from a set of overlapping images captured from disparate angles. The application of this technique in the field of cultural heritage, particularly in the context of megalithic monuments, is inherently challenging due to the spatial constraints of these environments and the usual limitations posed by their architectural design, which often results in poor lighting conditions. This article presents an accurate and cost-efficient methodology for the study and documentation of rock art, which has been applied to three megalithic monuments in the Iberian Peninsula: one in Spain and two in Portugal. The three working environments are complex, but the combination of techniques used and improvements such as rendering for the enhancement of engravings and the creation of 3D stop-motion models made it possible to integrate all the information in 3D formats that allow its universal dissemination. This not only preserves the heritage in graphic form but also makes it accessible to the public, both for study and for virtual visits.