randomguy7 Posted July 9, 2023 Posted July 9, 2023 (edited) I created a formula based on this link: https://forum.unity.com/threads/scale-object-to-match-specific-depth-from-camera.173082/ Here is a good place to find an arctan (or tan^-1): https://www.rapidtables.com/calc/math/Arctan_Calculator.html Place your fov in the Auto FOV box as HDEG RES Edited July 9, 2023 by randomguy7 DPI Wizard 1
RedX Posted July 27, 2023 Posted July 27, 2023 What value are we supposed to be inputting as a value for arctan? And what makes the result the perfect FOV?
Magico.- Posted July 29, 2023 Posted July 29, 2023 (edited) On 09/07/2023 at 14:36, randomguy7 said: Place your fov in the Auto FOV box as HDEG RES So I used ChatGPT to calculate this, I got a result of 134.22 Degrees. The only question I have is, if the given HDEG RES FOV is above the limit of the FOV of the game, do you use a setting like focal length in order to create the 'perfect FOV', and if so, which game or program would you convert this from, something like the Windows game selection? Any ideas @DPI Wizard? Edited July 29, 2023 by Magico.-
Skwuruhl Posted July 29, 2023 Posted July 29, 2023 42 minutes ago, Magico.- said: So I used ChatGPT to calculate this
Skwuruhl Posted July 29, 2023 Posted July 29, 2023 (edited) Re op: doing this sort of thing isn't really new, it's something racing game players have been doing for quite a while. e.g. https://dinex86.github.io/FOV-Calculator/ The reason that it doesn't really work for FPS games is that for a racing game you're trying to emulate a windshield and not a 1st person point of view in the FPS sense. Edited July 29, 2023 by Skwuruhl
randomguy7 Posted July 29, 2023 Author Posted July 29, 2023 (edited) nevermind ignore this post Edited July 30, 2023 by randomguy7 Skwuruhl 1
RedX Posted July 30, 2023 Posted July 30, 2023 (edited) 19 hours ago, Skwuruhl said: Re op: doing this sort of thing isn't really new, it's something racing game players have been doing for quite a while. e.g. https://dinex86.github.io/FOV-Calculator/ The reason that it doesn't really work for FPS games is that for a racing game you're trying to emulate a windshield and not a 1st person point of view in the FPS sense. thanks for the explanation. 19 hours ago, Magico.- said: So I used ChatGPT to calculate this ChatGPT is a predictive text model. It doesn't' have problem solving capabilities. And it doesn't understand math. Like if you what is 1 + 1 = ? If it gets the answer right, it's only because that's the most common text after 1 + 1. It often fails, while sounding very convincing. There are plugins for chatGPT, like wolfram alpha. But your basically using wolfram alpha at that point. Edited July 30, 2023 by RedX
Magico.- Posted July 30, 2023 Posted July 30, 2023 (edited) 11 hours ago, RedX said: Irrelevant of what software I used. I am interested in the concept you have provided, hence I just used this because it was challenging enough using basic scientific calculators. So would this be the correct calculation? And also I pose the question to you @randomguy7 since you may know, when you have your output for FOV in degrees format, how do I convert this into a game that say has a maximum Vertical FOV input of 90 degrees e.g. Rainbow Six Siege. Do i convert from a game that allows a HDEG RES FOV greater than the output that has been provided to me? Or how would I convert this into a game such as Rainbow Six Siege? Edited July 30, 2023 by Magico.-
Wizard DPI Wizard Posted July 31, 2023 Wizard Posted July 31, 2023 On 7/30/2023 at 2:40 PM, Magico.- said: So would this be the correct calculation? No, this is correct for that specific equation (137.02 degrees): https://www.wolframalpha.com/input?i=2*atan(2*20%2F15.748)+radians
Skwuruhl Posted July 31, 2023 Posted July 31, 2023 On 7/28/2023 at 11:10 PM, Skwuruhl said: Re op: doing this sort of thing isn't really new, it's something racing game players have been doing for quite a while. e.g. https://dinex86.github.io/FOV-Calculator/ The reason that it doesn't really work for FPS games is that for a racing game you're trying to emulate a windshield and not a 1st person point of view in the FPS sense. To clarify the differences in equations and what you might actually be trying to calculate: You are, presumably, trying to find the number of degrees in your vision that your monitor takes up. This truly is your most "realistic" FOV. To do this you need to use inverse trig functions, namely inverse tangent, as it uses the 2 legs of a right angle to calculate an angle. The first leg is from the center of your screen to the edge. It's important that it's just from the center and not edge to edge because we need the triangle we construct to be a right triangle. The second leg is from the center of your screen to your eyeballs. This forms a right triangle with the opposite leg being from center to edge of monitor, the adjacent leg being center of monitor to eyes, and the hypotenuse being edge of monitor to eyes. Finally we can plug in our values to an equation which will split out the angle from the center of our monitor to the edge, measured from our eyes. atan( 0.5 * Screen_Width / Viewing_Distance) Finally we can put a 2 in front to double the angle to our full monitor. And thus: https://www.wolframalpha.com/input?i=2*atan(0.5*20%2F15.748)+radians 64.83° horizontal degrees. Now obviously this is far too low to use as your FOV in a shooter, but that's just the nature of this method. This method works best for games where your "point of view" is actually your eyes, and your monitor is just a "window". Driving sim games are the prime example of this. In FPS games your "point of view" is actually the character you're playing as.
randomguy7 Posted August 1, 2023 Author Posted August 1, 2023 On 7/28/2023 at 11:10 PM, Skwuruhl said: Re op: doing this sort of thing isn't really new, it's something racing game players have been doing for quite a while. e.g. https://dinex86.github.io/FOV-Calculator/ The reason that it doesn't really work for FPS games is that for a racing game you're trying to emulate a windshield and not a 1st person point of view in the FPS sense. 7 hours ago, Skwuruhl said: To clarify the differences in equations and what you might actually be trying to calculate: You are, presumably, trying to find the number of degrees in your vision that your monitor takes up. This truly is your most "realistic" FOV. To do this you need to use inverse trig functions, namely inverse tangent, as it uses the 2 legs of a right angle to calculate an angle. The first leg is from the center of your screen to the edge. It's important that it's just from the center and not edge to edge because we need the triangle we construct to be a right triangle. The second leg is from the center of your screen to your eyeballs. This forms a right triangle with the opposite leg being from center to edge of monitor, the adjacent leg being center of monitor to eyes, and the hypotenuse being edge of monitor to eyes. Finally we can plug in our values to an equation which will split out the angle from the center of our monitor to the edge, measured from our eyes. atan( 0.5 * Screen_Width / Viewing_Distance) Finally we can put a 2 in front to double the angle to our full monitor. And thus: https://www.wolframalpha.com/input?i=2*atan(0.5*20%2F15.748)+radians 64.83° horizontal degrees. Now obviously this is far too low to use as your FOV in a shooter, but that's just the nature of this method. This method works best for games where your "point of view" is actually your eyes, and your monitor is just a "window". Driving sim games are the prime example of this. In FPS games your "point of view" is actually the character you're playing as. I'm actually using the modified valve formula I linked in the original post. It has to do with the size of onscreen objects.
RedX Posted August 1, 2023 Posted August 1, 2023 (edited) On 7/30/2023 at 5:40 AM, Magico.- said: Irrelevant of what software I used. chatGPT isn't reliable with math. Lawyer cites fake cases generated by ChatGPT in legal brief I'm not trying to give you a hard time, I'm just trying to warn you of it's limitations. It might be better with math with the wolfram alpha plugin. But something like this.. it still might not be able to figure out what equation to use.. @Skwuruhljust wondering but what is .5 represent in the equation? @DPI WizardWhat does 2 represent in the equation? Edited August 1, 2023 by RedX
Magico.- Posted August 1, 2023 Posted August 1, 2023 8 hours ago, RedX said: It might be better with math with the wolfram alpha plugin. Appreciate the tip for going forward.
Skwuruhl Posted August 11, 2023 Posted August 11, 2023 On 7/31/2023 at 10:59 PM, RedX said: @Skwuruhljust wondering but what is .5 represent in the equation? Ok apologies in advance for the bad MS Paint but (also I meant right triangles, not right angles) RedX 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now