Jump to content
  • Advertisement
Sign in to follow this  
yfmain

How to Change FOV of existing games?

This topic is 5399 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Would anyone how to force a existing game running under custom FOV condition? some games support this by using config file or command line, but most of games donot.

Share this post


Link to post
Share on other sites
Advertisement
If the game engine do not support custom FOV, the only way to change it is accessing the D3D device. If the game supports modding, you probably can gain access to it, just study the sources. If you have no sources or anything, it's going to be a really hard thing - try searching for "API Hooking".

Share this post


Link to post
Share on other sites
Perform an API hook for example with the Microsoft Detours library and hook the SetTransform Method of the D3D interface. There you can intercept the D3DTS_PROJECTION parameter and the corresponding matrix and thus edit the projection matrix.
The problem with this method is tough, that you dont have access to the real frustum of the game, resulting in visual artifacts when the game uses a different frustum for frustumculling than for the real rendering.

Share this post


Link to post
Share on other sites
Thanks

can i hook functions like D3DXMatrixPerspectiveFovLH, and change the FOV as it's parameter?

Do you mean the game image will be distorted after changing the projection matrix?

Share this post


Link to post
Share on other sites
you should try to intercept SetTransform(), not D3DX functions, because the game is probably using its own classes for matrix transformations. But SetTransform() is only for the fixed function pipeline; if the game uses shaders you will have to intercept SetVertexShaderConstant() calls, and you will probably have an hard time trying to get the matrix you need..

--
He means that you are going to change the projection matrix passed to D3D, but internally the game will still be using its own, unmodified projection matrix, and so it could, for example, not draw some objects because it considers them "out of view", while they actually are in view with your proj matrix.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I understand it now, thanks.

But is there any method can change the FOV without possibly losing some object in the game? There is no point to hook settransfrom in this way if the game will have rendering problem.

is that possible somehow to tell the game that i 'm goint to change FOV, and ask games to response for it. I guess games would store the constant value their own FOV somewhere, which i can change dynamically and game will know about it.

Share this post


Link to post
Share on other sites
The problem is that the general method for finding where the fov is stored can also be used to find where everything else is stored (and thus, can be used extremely easily for hacking). You won't be able to change the fov of a game that doesn't allow it without changing the game code [edit: executable], and this is something best not done without the consent of the game creators (in which case, you could even ask them where the fov is stored).

[Edited by - ToohrVyk on October 5, 2004 1:10:25 PM]

Share this post


Link to post
Share on other sites
You might be able to find the fov in the game for some games, but I wouldn't bet on it. Still its quite tedious and alot of work and i'd really rethink if you really want to do that ;)

Which game are you referring to anyway?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!