Chiblue Posted February 23, 2010 Share Posted February 23, 2010 I am using camera zoom and I have been playing around with the limits... there does not seem to be any... so does anyone have any suggestions on the relative ratios of each zoom setting... e.g. when I set the zoom to 10 say, does this equat to 2x, 5x 10x???? or is there a clean calculation to get this?? Quote If it's not Tactical realism then you are just playing.. Link to comment Share on other sites More sharing options...
Josh Posted February 23, 2010 Share Posted February 23, 2010 Default zoom is 1.0 which corresponds to an FOV of 90 degrees. There's a formula posted in a couple places to convert a zoom value and FOV. Do a search at http://forum.leadwerks.com to find it. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Rick Posted February 23, 2010 Share Posted February 23, 2010 Here is how you would change the FOV float FOV = 60; CameraZoom(camera, 1.0f / tan((FOV * (PI/180))/2.0f)); Quote Link to comment Share on other sites More sharing options...
Chiblue Posted February 23, 2010 Author Share Posted February 23, 2010 Only work I have done in magnification calculations is in Astronomy, but there I have focal length, lens magnification and main optics... So given a zoom value how would I calculate the magnification... I have a sniper scope overlay and the mouse wheel zooms in and out, but I want to display the actual magnification i.e. 1x 2x 16x 50x etc... Quote If it's not Tactical realism then you are just playing.. Link to comment Share on other sites More sharing options...
Blue Solitare Posted February 23, 2010 Share Posted February 23, 2010 There is a sniper zoom (camzoomsniper) attribute in GameLib. Have you looked at that yet? http://www.leadwerks.com/wiki/index.php?title=GameLib#camzoomsniper Quote Link to comment Share on other sites More sharing options...
Chiblue Posted February 23, 2010 Author Share Posted February 23, 2010 I am using Gamelib...And most of the existing properties for zoom, the gamelib property you mentioned allows for switching zoom levels I am already doing that using my own funtions but the issue is I want to show a scale on my sight textures showing a graphic representation on the zoom magnification the actual number is not that important per say, but the critical part I need is to establish a min and max zoom allong with reasonable increments within the graphic scale to show the player the actual or relative zoom they are at. So I guess the real question is, in a real world example if I set the zoom to say 20 what does this represent in comparison to 1,2,3,4.....19 is it simple 20x zoom level 1 or is there a more complex formula. Quote If it's not Tactical realism then you are just playing.. Link to comment Share on other sites More sharing options...
Canardia Posted February 23, 2010 Share Posted February 23, 2010 The CameraZoom(factor) function does the same as an optical zoom in real cameras. So CameraZoom(20.0) would be 20x optical zoom. Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Chiblue Posted February 23, 2010 Author Share Posted February 23, 2010 Thanks that was what I thought but the other responses are helpful especially the fov equation! Quote If it's not Tactical realism then you are just playing.. 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.