I once saw a youtube video of a guy who first modeled a pinhole camera in something like Blender3D and then went on to design and simulate an entire SLR camera.
https://youtu.be/YE9rEQAGpLw
https://youtu.be/YE9rEQAGpLw