Hey, I just played through IRON BEAN by @RyCitrus (would appreciate if you can explain!) and after a while, I noticed the photo feature takes actual photos of the Roblox environment.
How is this possible? I doubt it’s a ViewportFrame because 1) There’s visible black fog and 2) One of the photos had a particle emitter.
I tested moving the vehicle around to see if the photo view rotated with the angle and… they did. Even taking several photos of an object with particles, the particles changed so I’m assuming it’s taking real photos of the environment somehow.
Is this some hack using the new Screenshots API, are DynamicImages involved in the process, how does this work??
Not sure if you are still in need of an answer, but yes, this likely uses the CaptureService:CaptureScreenshot method. This method returns a ContentID to use in ImageLabels.
When a photo is taken, the game copies the environment and loads it into a ViewportFrame. The camera is positioned to where the submarine would be.
The fog effect is just a few transparent black spheres layered together! This fog model centers at the camera’s position. The particles are also physical parts that displace themselves randomly every second to give the illusion per photo that they are moving particles.
And that’s about it! With the added “grain” above the ViewportFrame, it helps make all of these effects look more convincing too.