ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Clear Sky Forum » Mod discussion
Camera FOV

Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  23:25:53  7 February 2012
profilee-mailreply Message URLTo the Top
smoq2
Forklift operator
(Resident)

 

 
On forum: 09/08/2008
 

Message edited by:
smoq2
02/08/2012 0:43:10
Messages: 2433
Camera FOV

I know that the default device().fov returns the value of 67.5. What exactly is that value? Degrees? I don't think so, cause that's can't be one value for both camera vertical and horizontal angle. Does anyone know how can I get the those values? Max camera horizontal angle and max camera vertical angle?

[EDIT]

I'm trying to make an indicator that follows an NPC on screen, but since the screen is a flat X,Y axis and FOV has a spherical "surface" the indicator is more off the more I look away from the target and then becomes more aligned again once the target is at the edge of the screen:

(Look for a small red quadrangle near the stalker)

http://img860.imageshack.us/img860/7148/sswojtek020712233241esc.jpg
http://img818.imageshack.us/img818/1946/sswojtek020712233248esc.jpg
http://img688.imageshack.us/img688/1411/sswojtek020712233251esc.jpg

Now I need some formula that will correct the positing of the indicator by FOV angle.
Here is the current code:

http://pastebin.com/MfGS96GB
  09:36:59  8 February 2012
profilee-mailreply Message URLTo the Top
PhoenixHeart
Senior Resident
 

 
On forum: 10/22/2008
Messages: 1165
the 67.5 is almost certainly degrees, and I don't think it's a sphere, I think it's a cylinder, but I could be wrong. Which would allow a single value to be the FoV. This is just conjecture though, could be totally wrong, lol.
  10:07:40  8 February 2012
profilee-mailreply Message URLTo the Top
smoq2
Forklift operator
(Resident)

 

 
On forum: 09/08/2008
 

Message edited by:
smoq2
02/08/2012 10:33:31
Messages: 2433
Well, when I changed the moddifier ( "modif" in the script) to 45, I got really strange results:

At the edge of the screen the indicator is closer to the center of the screen:

http://img607.imageshack.us/img607/719/sswojtek020812085828esc.jpg

When I turn to look at the stalker it positions correctly:

http://img849.imageshack.us/img849/391/sswojtek020812085832esc.jpg

Then it's moving off towards the edge of the screen again as I turn the camera to face the stalker even more:

http://img19.imageshack.us/img19/2374/sswojtek020812085842esc.jpg

And of course, as I look straight at the stalker, it's positioned correctly:

http://img208.imageshack.us/img208/1442/sswojtek020812085845esc.jpg

I'm, almost there, but I'm still missing something. Please help me out here, I'm not physicist... :/

Also, it beats me why 45 seems to be the best value yet...

Also, even if we look left/right, the stalker "travels" in an arc, not straight line. The script doesn't include that, and I don't the formula that will correct this:

http://img196.imageshack.us/img196/8181/sswojtek020812092639esc.jpg

http://img69.imageshack.us/img69/5083/sswojtek020812092642esc.jpg

As you can see, the indicator is slightly above the stalker, cause the Y angle of the camera vector to the stalker's directional vector is still ~ 0. I need some formula that will increase Y position of the indicator accordingly to the X angle of the camera and the vector pointing to the stalker.
  17:29:23  8 February 2012
profilee-mailreply Message URLTo the Top
Cromm Cruac
Сделано в Чернобыле
(Resident)

 

 
On forum: 11/19/2009
Messages: 1143
Check stalker.pl: http://forum.stalker.pl/viewtopic.php?f=48&p=201566#p201566
 
Each word should be at least 3 characters long.
Search:    
Search conditions:    - spaces as AND    - spaces as OR   
 
Forum Index » S.T.A.L.K.E.R.: Clear Sky Forum » Mod discussion
 

All short dates are in Month-Day-Year format.


 

Copyright © 1995-2021 GSC Game World. All rights reserved.
This site is best viewed in Internet Explorer 4.xx and up and Javascript enabled. Webmaster.
Opera Software products are not supported.
If any problem concerning the site functioning under Opera Software appears apply
to Opera Software technical support service.