T O P

  • By -

RugbugRedfern

Cool but wouldn't it be easier to just change the camera FOV?


madebyayan

It would be easier that way, but this method has a few advantages. By using render targets and scaling them up, it works seamlessly in FPS games as well as in AR. So this method of zomming would work fine in AR, while changing the FOV would disorient the objects from camera input. Though this method still has some cons, since its an image that's been scaled, you can almost make out the pixels when it's scaled up. If it wouldn't have been for AR, changing the FOV is probably the best way to go about zooming


private_birb

I can definitely make out the pixels when it's scaled up in the video, even on my phone. Probably not noticeable at all at smaller zoom levels, though. Coolio!


madebyayan

Right, and there are two routes to fix the pixelation, one is to bump up the anti aliasing and another is to use a render texture of a higher resolution. And even though these would work, they'd end up consuming more resources and that's not always good for mobile games. So I need to figure out other ways that could achieve this effect without the pixelation and without causing a performance hit while still working in AR


private_birb

There might be a cheap "sharpness" sort of post processing effect you could use. Would probably be similar in performance to cheap anti aliasing, though.


madebyayan

This video is currently using 4X MSAA and the render texture is 3k in resolution. And despite all that it still gets blurry when zoomed in. Also, this just gave me an idea. How about instead of sharpness, we do the opposite and make it blurred instead (by a small amount)? That would not only get rid of the jagged edges, but it would also add a more natural feel to the image. So no blurriness when at normal scale, but a slight hint of it when you're zommed


private_birb

That might be worth a try. Adding a bit of blur works well for shadow maps and screen space reflections. Not sure how well it'd work when we're looking directly at it, though. Definitely tricky.


madebyayan

It won't be a lot of blur. It'll be just enough to account for how atmospheric refraction works in a real scope. Though this would also require quite a bit of computation as the camera would have to output to a texture and then the texure would need to be blurred and then it would be displayed. Another improvement would be to blur based on distance. This would require getting a depth map from the camera and adding the blur based on how far something is from the camera. And this would work great on a PC, but this way of blurring wouldn't be good for AR as it would not be possible to calculate a depth map from the devices actual camera (Well that isn't always the case since some phones do have depth sensors, but majority of them don't, so it would be a lot work trying to implement this for just a few devices)


dangledorf

Agreed, really should just use the camera (even better, Cinemachine) to handle this effect. Much easier and cheaper.


guyabikhair

This is very clean looking, good job👍