Gilmer Posted August 12, 2010 Share Posted August 12, 2010 Hello, im with the following doubt, in editor, in main properties, i can set the camera fov. But when i make the program in c++, has none command that i can are setting the fov. I searched in wiki and in the forum, but i not found nothing. How i can make this? The same problem occurs with the fog, i dont found any commando for this.. Quote Link to comment Share on other sites More sharing options...
macklebee Posted August 12, 2010 Share Posted August 12, 2010 I believe camera FOV is just CameraZoom... not sure, would have to play around with it... and Fog is SetDistanceFog Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Gilmer Posted August 12, 2010 Author Share Posted August 12, 2010 Thanks Macklebee, The Fog is really what I was needing, but I think it would be to CameraRange the FOV, would not it? Quote Link to comment Share on other sites More sharing options...
Pixel Perfect Posted August 12, 2010 Share Posted August 12, 2010 No, FOV is set using CameraZoom Quote Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++ Link to comment Share on other sites More sharing options...
Gilmer Posted August 13, 2010 Author Share Posted August 13, 2010 i think is not, or i doing wrong..hehehe for sample, in editor, i set the FOV to "115", but if i use the CameraZoom, what value which i need set? I put "CameraZoom(camera,115)", it show a zoom very long, but if i put "CameraZoom(camera,-115)", the image is inverted. Quote Link to comment Share on other sites More sharing options...
macklebee Posted August 13, 2010 Share Posted August 13, 2010 i think is not, or i doing wrong..hehehe for sample, in editor, i set the FOV to "115", but if i use the CameraZoom, what value which i need set? I put "CameraZoom(camera,115)", it show a zoom very long, but if i put "CameraZoom(camera,-115)", the image is inverted. You are doing it wrong. According to Josh: The default FOV is 90 degrees, meaning you have a width of view that sees 90 degrees. Zoom zooms in, so zoom=2.4 should give a 45 degree FOV. Then the zoom for any FOV can be calculated as follows: zoom=1.0/Tan(fov/2.0) so a FOV of 115 would be CameraZoom(camera, 0.637) Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
Gilmer Posted August 13, 2010 Author Share Posted August 13, 2010 With some searches, i found in the old forum, the following formule: fov = 115; zoom = 1.0/tan(fov/2.0); but, no documentation wiki, dont have nothing talking about this...and is this which is working. I use this with the CameraZoom. Quote Link to comment Share on other sites More sharing options...
Gilmer Posted August 13, 2010 Author Share Posted August 13, 2010 hehe, i post in a minute after you but thanks all Quote Link to comment Share on other sites More sharing options...
T0X1N Posted August 16, 2010 Share Posted August 16, 2010 That is weird because I cannot get that formula that you both wrote to work. Instead, I found this formula work: flt zoom=0.0; flt fov=90; zoom = 1.0 / tan(fov*3.14159265/360); I tried this because I modified a formula I found here to work with the camera zoom. Like macklebee mentioned, the default FOV is 90 degrees. The other formula says 45 degrees is the default and multiplying that with PIE then dividing that with 180 will give 1.000. I basically took that and made 180=360 because 360/4=90 whereas 180/4=45. It makes sense there, but I cannot figure out why you guys are getting your formula to work and I cannot. Anyway, at least I found this formula to work. Quote Website | Twitter | Facebook | Steam Play Our Latest Game: Relic Rogue Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.