Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gun position with higher fov #286

Closed
buvk opened this issue Mar 25, 2018 · 14 comments
Closed

gun position with higher fov #286

buvk opened this issue Mar 25, 2018 · 14 comments

Comments

@buvk
Copy link

buvk commented Mar 25, 2018

When you increase the FOV, the gun position does not automatically adjust. Models are cut off at higher FOVs.

I am not sure what the ideal gun_X values should be, however, I have included an example of what gun_z 6 looks like at FOV 120.

FOV 90 gun_z 0
fov90

FOV 120 gun_z 0
fov120

FOV 120 gun_z 6
fov120_gunz6

For reference, in Quake Champions, weapon size/position/scaling does not appear to change when changing FOV.

FOV 106
20180325113901_1

FOV 140
20180325113713_1

Here's what changing FOV in Quake Live does to weapon (seems similar to changing gun_z in Quake 2).

FOV 90
20180325113406_1

FOV 120
20180325113415_1

@maraakate
Copy link
Contributor

Gun_x, gun_y, gun_z are debugging cvars.

@buvk
Copy link
Author

buvk commented Mar 25, 2018

In vanilla Quake, weapon is not displayed if you use an FOV greater than 90. I only mentioned those cvars because it is the only way that I know of to mitigate the issue. I am hoping that a workaround can be implemented so that users do not need to mess around with those cvars when using an FOV greater than 90.

I have updated the original post with screenshots from Quake Champions and Quake Live to show how weapon size/position/scaling is handled in those games.

@maraakate
Copy link
Contributor

Also, for the record using the gun_z, etc. CVARs will screw up when you turn you can see the gun bob in odd ways. With that said, I don't know if quake champions is using ortho views for weapon models as opposed to projection. If that's the case, I tried an experiment with that in Daikatana and couldn't get it to work... But maybe someone else here knows a better way. If you just hack the viewangles and origin offsets it won't work.

@Yamagi
Copy link
Member

Yamagi commented Apr 10, 2018

I just had a look and I don't think that it's worth the effort to fix this. Quake II was build for 3:4 screens with a fixed FOV of 90, everything else was always a compromise. While YQ2 supports a bigger FOV it has always been a compromise between what's possible and what looks good. Especially in the extreme cases near 60 and 120 things get problematic.

A fix would require to communicate more data from the renderer to the client, that would need some changes to the renderer API. Such changes break compatibility with existing renderers. And YQ2 supports horplus (enabled by default9 so there's not a big need for extreme FOV settings,

@maraakate
Copy link
Contributor

Experimental hack: https://bitbucket.org/neozeed/q2dos/commits/5e01970b33a3835251d08668e602b2cb0c536b19

This seems to work fine for everything except the hyperblaster origin for the beams are offset too far into the world at crazy FOVs like 150.

@buvk
Copy link
Author

buvk commented Apr 21, 2018

Can you please provide a windows binary so I can test this?

@maraakate
Copy link
Contributor

I can give you a windows binary of q2dos for windows to test it. Give me a few minutes.

@maraakate
Copy link
Contributor

http://dk.toastednet.org/Q2DOS/q2dos_20180421_win32_fovtest.7z -- I tested this on all 3 original games seemed OK. Also connected to Whale's WoD server since they have a lot of crazy weapon models to test out.

@buvk
Copy link
Author

buvk commented Apr 21, 2018

Thanks. This seems to work quite well.

@maraakate
Copy link
Contributor

I saw your other problem about windows being uncentered, try vid_fullscreen 2. This is a borderless window mode that doesn't use SDL. It doesn't create black borders around it though.

@buvk
Copy link
Author

buvk commented Apr 21, 2018

I noticed that there are some graphical glitches with the extra portion of some weapons that are displayed because of widescreen.

quake2_001

@maraakate
Copy link
Contributor

maraakate commented Apr 21, 2018

I don't know what you mean, that soft spot is on the original weapon model. Try another engine and you will see. I already mentioned that the hyper blasters projectile origin will not be as close to the gun at very high (like around 150) fov. I personally play at 125 fov because I have bad depth perception and 90 fov feels like it's pressed against my face and gives me a headache. With that said, it works fine at my target fov.

If this is not about the soft spot on the barrel I don't know what else could be wrong. I just tested this on Q2DOS without the new code and that soft spot on the barrel on the hyperblaster is still there so it's a problem in the original model. Maybe you've just played it with high FOV for so long (like me) that you're noticing it for the first time.

@DanielGibson
Copy link
Member

DanielGibson commented Apr 21, 2018

I just pushed a commit that makes weapon FOV independent of the game FOV.
It's configurable with r_gunfov which defaults to 80; a value of 75 should be equivalent to FOV 90 with the classic code.

@buvk
Copy link
Author

buvk commented Apr 22, 2018

This is great. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants