
Filippo Tarpini
@FilippoTarpini • 1,889 subscribers
HDR & Color Grading Specialist at Gamma Studios Ex Remedy Game programmer and modder (Luma-Framework, emulators, Unreal Engine) https://t.co/wTin1zp0uo
Shorts
Videos

Quick rendering math lesson (common trap): FoV in Unreal Engine isn't interpolated correctly when blending between two cameras The current code does: FoV = lerp(FoVA, FoVB, Weight) however, that's not how you interpolate FoV! To be "perceptually" linear and also correct under aspect ratio scaling, FoV needs to be lerped in tangent space: FoV = atan(lerp(tan(FoVA*0.5), tan(FoVB*0.5), Weight)) * 2 First video showcasing the problem. Blending between a 32:9 camera with 98.21° FoV and a 16:9 camera with 60° FoV. Viewport is 32:9. Due to FoV scaling being Hor+ by default in UE, at 32:9 they should look identical. But during blends, they don't (the FoV isn't stable)! The relationship between FoV and aspect ratio isn’t linear, because FoV is angular In practice, it also means camera interps aren't as smooth as they could be, second video shows that. PR to fix the problem: hopefully it gets merged!
Filippo Tarpini10,585 views • 3 months ago
No more content to load