---------------------------

Passa a Pro

WWW.GAMEDEVELOPER.COM
Deep Dive: Lushful Photography Sim's emotive, mathematical long-exposure photography system
Game Developer Deep Dives are an ongoing series with the goal of shedding light on specific design, art, or technical features within a video game in order to show how seemingly simple, fundamental design decisions aren’t really that simple at all.Earlier installments cover topics such as cover topics such as the sound design of Avatar: Frontiers of Pandora, how camera effects, sound FX, and VFX created a smooth and high octane movement system in Echo Point Nova, and the technical process behind bringing The Cycle: Frontier to Unreal Editor for Fortnite.Hey everyone, my name is Matt, I'm the solo dev behind Lushfoil Photography Sim, the newly released tranquil photography game. For this project I wanted to create a realistically simulated DSLR camera, for the satisfaction of photographers and to hopefully let newcomers learn more about camera settings.Most of the camera's standard effects like depth of field, focal length, exposure and noise are all very easily simulated in Unreal Engine. The one effect that was missing however, was the ability to recreate long exposure, a standard feature of high grade cameras that allows you to leave the shutter open and capture an entire range of motion in one image. I hadn't seen this being done in a game engine before, so I wanted to give it my best shot.Related:Final in-game effect:Image via Matt Newell/Annapurna Interactive.Image via Matt Newell/Annapurna Interactive.The approach I made to this was purely based on math. Real cameras don't work in "frames" or "ticks," so the in-engine solution for this would be to sequentially take images over time and compile them on top of one another. Combining all these images would end up being way too bright of course, so I created various methods of adjusting the exposure and appearance until I landed on the right outcome. I’ll try and describe the approach I took in each attempt, what went wrong, and how I found the correct solution.First attempt:If I were to take images over a long exposure period of one second, I would have 30 images. My first idea was to add these 30 images all together at once, and divide the final result by 30. This was what it looked like:Image via Matt Newell/Annapurna Interactive.Image via Matt Newell/Annapurna Interactive.We had a correct blur effect going on, but there were some obvious problems. Initially combining all 30 images together resulted in some really high values that must’ve been clamped, before the division by 30 happened.Second Attempt:Next, I tried halving the brightness every time subsequent frames were added. I figured if you add 1+1, then divide by 2, you’ll get the correct exposure of 1.Image via Matt Newell/Annapurna Interactive.Image via Matt Newell/Annapurna Interactive.The problem with this was, the images that were taken last would have a stronger weight than the images taken first. This resulted in a prominent last image, with the whites and darks out of proportion.Related:Third Attempt (winning combination):The solution was to use the same method as the previous attempt, but instead of dividing by 2, I would divide by the total number of images in the sequence. The second frame would be divided by 2, the 12th frame would be divided by 12, giving each frame the proper weight.Image via Matt Newell/Annapurna Interactive.Image via Matt Newell/Annapurna Interactive.I then increased the number of captures to 30 frames per second to get an accurate smear without being too taxing on performance.After getting these output shots in-engine, I was thrilled. There's something far more lifelike about an imperfect image, filled with blur and motion, that made these shots feel so real. I added some extra layers of implementation so that the player could control how long the shutter would be left open, and that it would be fully compatible with 'M' manual mode, and correctly influence the other camera settings.I wasn’t sure I’d be able to achieve this effect at all, but I’m really glad I spent the time doing experimentation, and was able to get lucky. I hope all enthusiast photographers will appreciate being able to do this effect in-game.Related:Image via Matt Newell/Annapurna Interactive.Image via Matt Newell/Annapurna Interactive.Image via Matt Newell/Annapurna Interactive.Please consider checking out Lushfoil Photography Sim on Steam, Epic, Playstation and Xbox! You can find my social media accounts here.
·31 Views