Guy Creates Working Virtual ‘Film’ Camera Inside 3D Software Program

Marco Purich virtual camera inside Blender

Marco Purich, known as sirrandalot on YouTube, created a realistic virtual camera inside Blender using the software’s “Cycles” path tracing.

It is an incredible and complex project that took Purich months of work. He built a virtual camera that behaves like a film camera and captures “real” fake photos using simulated light rays that pass through a virtual lens that Purich designed based on real-world optics.

Purich even physically simulated lens distortions and aberrations and constructed a virtual facsimile of film emulsion based on real-world film rendering characteristics. The virtual camera simulates how different wavelengths of light pass through a lens and expose the “film,” resulting in images that go far beyond scenes rendered to “look” like photos. Purich’s virtual photographs are captured in a way that is about as close to shooting pictures in the real world as is currently possible.

Marco Purich virtual camera inside Blender
© Marco Purich

Purich conceived his virtual camera idea about a decade ago when Blender introduced Cycles, its physically-based path tracer designed for production rendering applications. However, Purich tells PetaPixel that while his virtual camera may have been technically possible then, it would have been significantly limited by available compute power and Purich’s experience level. As evidenced by Purich’s “chaotic” video above, the project remains highly complicated and challenging.

“Since I knew it should technically be possible given the unbiased nature of cycles’ path tracing, my motivation/inspiration was mostly to see if it would be viable and if I could make it look decent. Once I realized that it was, I started adding extra bits and challenging myself to see if I could emulate a sort of classic film look. The motivation for making the video was just to tell a fun story and show what’s possible (albeit totally unnecessary),” Purich explains to PetaPixel.

Marco Purich virtual camera inside Blender
© Marco Purich

While Purich’s computer is much more powerful than the gear he had when he first considered the virtual camera project, it still takes multiple days to render a single virtual photograph. He also notes that the images are noisy, an outcome that goes hand-in-hand with the rendering demands of the camera.

“The render takes a long time for several reasons, but it all boils down to having enough samples for the end result to not look too noisy. 3D path tracers, like Cycles, often work by sending out many rays from the camera (millions or even billions of them, often thousands per pixel of the final image). The rays then bounce around the scene, gathering information about how light would behave as it followed that path. The results are averaged for each pixel, giving you your final image,” says Purich.

Blender’s Cycles rendering engine approximates how light behaves in the physical world. The more samples that a user takes, the better the results. However, extra geometry and complexity result in significantly more demanding rendering loads.

“In this case, the light paths have to go from the camera to the screen, through three lenses before they can even hit anything in the scene, let alone a light source. Not to mention that most of the samples get lost inside the dark camera box (this is one of the things I’m looking to improve),” details Purich.

Marco Purich virtual camera inside Blender
© Marco Purich

Purich adds that the noise in his virtual images is not unique to his “edge case” project within Blender but an unavoidable consequence of how Cycles renders images. However, he explains that his specific usage is incredibly taxing on Blender and makes the inherent noise more visible.

As for Purich’s amazing and eerily realistic virtual photos, he says his favorite is the one of the tree. “I love the physically simulated bloom and distortion,” he explains, adding that his second-favorite image is the one of the monkey head because it shows off the shape of the aperture of his virtual lens.

Marco Purich virtual camera inside Blender
© Marco Purich

“Try this at your own risk,” Purich says of his project. While it proved challenging, the project is incredible. “Maybe I’ll have to come back in another 10 years in order to properly simulate diffraction and lens flare,” he adds.

More of Marco Purich’s work is available on YouTube and Twitter. Additional photos and high-res files captured by Purich’s virtual camera are featured on Imgur.


Image credits: All images © Marco Purich (sirrandalot)

Discussion