Custom Photogrammetry tiler


I would be interested in implementing a custom photogrammetry tiler to support Cesium 3d tiles in my application.

I know that photogrammetry softwares like Metashape or Reality Capture implement their own.

Is there an open source tiler or some clear examples to understand how to implement a tiler from scratch?

Thanks in advance