ProjectsWhat's NewDownloadsCommunitySupportCompany
Forum Index » S.T.A.L.K.E.R.: Call of Pripyat Forum » Bugs & Tech support
Aiming/zooming through weapons scopes = bad frame rates

Posted by/on
Question/AnswerMake Newest Up Sort by Descending
  00:00:02  30 November 2013
profilee-mailreply Message URLTo the Top
Mac34
Senior Resident
 

 
On forum: 03/10/2013
Messages: 313
Aiming/zooming through weapons scopes = bad frame rates

Hi,

Anyone knows why aiming/zooming through weapons scopes in some cases cut the frame rate in half? This happens in both Clear Sky and Call of Pripyat (dx10, Nvidia 680MX 2gb, Windows 7). Now I'm playing the SGM 2.2 all-in-one mod, and fighting the bandits by the barn near the bridge in Cordon. Here the frame rate goes from 50-60 to 30fps when aiming. Is there any setting I can turn off to fix this issue?
Thanks!
  03:35:21  7 December 2013
profilee-mailreply Message URLTo the Top
Don Reba
Bishop and Councilor of War
(Moderator)

 

 
On forum: 12/04/2002
Messages: 11731
I would guess that the frame rate is halved, because you are rendering two locations: the one you see in the scope and the one where you are.
  11:43:50  7 December 2013
profilee-mailreply Message URLTo the Top
SetaKat
Ex modder, Zones only ferret and will someday release a game
(Resident)

 

 
On forum: 02/20/2010
Messages: 6342

---QUOTATION---
I would guess that the frame rate is halved, because you are rendering two locations: the one you see in the scope and the one where you are.
---END QUOTATION---


Oddly enough, the zoom parameter on weapons is actually a FOV value. When you set it to 90, there is no zoom. 45 gives halves the view, and moves the view forward a certain distance, giving 2x zoon. 22.5 gives 4x zoom, with 1/4 the original view, and 2x the forward amount of the 2x zoom, etc.
Also, Stalker should use view frustrum rendering. This determines what vertice triangles can be seen on the screen, and renders them. This is usually based off the camera's view frustrum object, which is essentially a large invisible trapezoid extending out to the max view distance, which can be used to tell if a vertex can be seen onscreen. If the game does dual render at the zoom location and at your location, then it would be using 2 cameras, and switching between them, which would be a no-no.


---QUOTATION---
Hi,

Anyone knows why aiming/zooming through weapons scopes in some cases cut the frame rate in half? This happens in both Clear Sky and Call of Pripyat (dx10, Nvidia 680MX 2gb, Windows 7). Now I'm playing the SGM 2.2 all-in-one mod, and fighting the bandits by the barn near the bridge in Cordon. Here the frame rate goes from 50-60 to 30fps when aiming. Is there any setting I can turn off to fix this issue?
Thanks!
---END QUOTATION---


I suspect the additional FPS hit you're seeing is due to additional view matrix multiplications to move the camera to the zoom point. If you look closely when zooming, the camera actually moves closer to the target at a fixed rate, rather than jumping straight there, indicating movement over time. Same is true when exiting zoom as well. This sliding translation matrix might have an effect on FPS, as it is an extra calculation step.
From my own game engine development experience, matrix multiplications in the wrong place can seriously impact performance. I haven't seen this FPS hit while zooming in CS or CoP, but the fact that you are playing in DX10, and I generally only use DX9 (can use 10, but the performance isn't very good), and given how DX10 was tacked onto CS (and has a pretty poor implementation to begin with), I suspect that GSC put the matrix multiplication code in the wrong place, or worse - they're calculating it multiple times per render cycle, which given the quality of the games LUA scripts, wouldn't surprise me.

tl;dr
Its probably an engine bug. Nothing we can do to fix it.
  12:05:26  7 December 2013
profilee-mailreply Message URLTo the Top
Don Reba
Bishop and Councilor of War
(Moderator)

 

 
On forum: 12/04/2002
 

Message edited by:
Don Reba
12/07/2013 12:37:24
Messages: 11731

---QUOTATION---
Oddly enough, the zoom parameter on weapons is actually a FOV value. When you set it to 90, there is no zoom. 45 gives halves the view, and moves the view forward a certain distance, giving 2x zoon. 22.5 gives 4x zoom, with 1/4 the original view, and 2x the forward amount of the 2x zoom, etc.
---END QUOTATION---


That's interesting. Whether you specify zoom as a multiplier or as degrees of FOV is just a matter of units. Something along the lines of:

zoom = 1 / tan(fov * π / 360)

It does not matter if you change the camera position or FOV, though — you still render two scenes every frame. Although, I have not played the game in a long time, so I could be completely wrong.


---QUOTATION---
Also, Stalker should use view frustrum rendering.
---END QUOTATION---


STALKER uses a fairly sophisticated culling algorithm. You can read about it here, if you want:
http://www.cs.princeton.edu/courses/archive/spring01/cs598b/papers/greene93.pdf
  16:36:55  7 December 2013
profilee-mailreply Message URLTo the Top
Mac34
Senior Resident
 

 
On forum: 03/10/2013
 

Message edited by:
Mac34
12/07/2013 17:40:16
Messages: 313
Thanks for giving some very interesting points. Yep, this is probably some bad coding or bug in the engine. I don't get the same kind of frame rate hit in other shooters. I tend to use the zoom/scope function a lot, as I don't use crosshair for better immersion.

I use dx10 in CoP. Dx11 lacks lightening effects like sun rays, and the frame rate starts to deteriorate after a while. There are quite a few bugged graphics features in CoP (HDAO, HBAO). Getting the most out of the graphics in CoP takes a lot of fiddling..lol.
 
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.: Call of Pripyat Forum » Bugs & Tech support
 

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


 

Copyright © 1995-2022 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.