Realistic scope effect
-
|HBD|Bad_santa12345
- Posts: 23
- Joined: 2011-11-30 11:35
Realistic scope effect
Utilizing techniques normally used for evil ( cheating ) to make something awesome.
Last edited by |HBD|Bad_santa12345 on 2014-10-27 09:59, edited 1 time in total.
-
Strepto
- Posts: 55
- Joined: 2011-03-13 21:49
Re: Realistic scope effect
Cool stuff as always. Nice to see you back. 
-
EA_SUCKS
- Posts: 84
- Joined: 2014-10-08 12:53
Re: Realistic scope effect
Yes! DEVs, implement this please
-
|HBD|Bad_santa12345
- Posts: 23
- Joined: 2011-11-30 11:35
Re: Realistic scope effect
Haven't tested but i see no reason why it wouldn't work. I'm only modifying client sided stuff. There might be some problems with punkbuster tho.Antol wrote:Can you run it online?
-
Raphavenger
- Posts: 637
- Joined: 2014-04-05 19:11
Re: Realistic scope effect
Looks awesome!
How does it perform? It looks like it takes quite some resources, something that would make PR even more demanding...
But still great job!
How does it perform? It looks like it takes quite some resources, something that would make PR even more demanding...
But still great job!
- Mineral
- Retired PR Developer
- Posts: 8534
- Joined: 2012-01-02 12:37
- Location: Belgium
Re: Realistic scope effect
The shadow effect looks pretty bad tbh. I rather have our 3d scopes 
Given that many already suffer from bad performance I wouldn't want to see this in PR. If possible the best way to do it is to make it only available to the highest graphic settings which I doubt is possible.
Given that many already suffer from bad performance I wouldn't want to see this in PR. If possible the best way to do it is to make it only available to the highest graphic settings which I doubt is possible.
-
Rhino
- Retired PR Developer
- Posts: 47909
- Joined: 2005-12-13 20:00
Re: Realistic scope effect
Nice work but afaik you do this by having your gfx card do two renders, one zoomed in and one zoomed out, correct?
If so, to those of you who don't know what this would mean, it basically means you would have 1/2 the FPS you currently get when scoped in, since instead of your card drawing one level of zoom, it has to process two, which is twice the load and as such, 1/2 the FPS.
With many players having performance problems as it is, we simply can't afford to do this as 30fps would turn into 15fps as soon as you scope in, making it unplayable.
If so, to those of you who don't know what this would mean, it basically means you would have 1/2 the FPS you currently get when scoped in, since instead of your card drawing one level of zoom, it has to process two, which is twice the load and as such, 1/2 the FPS.
With many players having performance problems as it is, we simply can't afford to do this as 30fps would turn into 15fps as soon as you scope in, making it unplayable.
-
|HBD|Bad_santa12345
- Posts: 23
- Joined: 2011-11-30 11:35
Re: Realistic scope effect
@Mineral:
What is wrong with the shadow? I have never looked through a real scope so i don't know how it should look. It is made in a shader effect so it is easily modified.
@Rhino:
It is done by rendering every other frame at low fov onto a texture and every other frame is rendered at normal fov with this texture and some effects applied to the scope mesh. Technically the fps and the responsivenes of the game is almost unchanged but the view on the scope is only updated every other frame.
The effect can be made a user togglable option in the PR launcher or possibly even ingame menu. So that those who have a pc that can handle it can use it if they wish.
What is wrong with the shadow? I have never looked through a real scope so i don't know how it should look. It is made in a shader effect so it is easily modified.
@Rhino:
It is done by rendering every other frame at low fov onto a texture and every other frame is rendered at normal fov with this texture and some effects applied to the scope mesh. Technically the fps and the responsivenes of the game is almost unchanged but the view on the scope is only updated every other frame.
The effect can be made a user togglable option in the PR launcher or possibly even ingame menu. So that those who have a pc that can handle it can use it if they wish.
- Mats391
- PR:BF2 Lead Developer
- Posts: 7643
- Joined: 2010-08-06 18:06
Re: Realistic scope effect
How hard is this to implement? Would like to give it a try on a PR weapon and see how it looks FPS wise on a map like fallujah.
-
|HBD|Bad_santa12345
- Posts: 23
- Joined: 2011-11-30 11:35
Re: Realistic scope effect
At the moment most of it is hard coded to only work with alpha project m24 but i already have a system for adding custom console/.con/.tweak commands which i will use to make an easy to implement and mod version.[R-CON]Mats391 wrote:How hard is this to implement? Would like to give it a try on a PR weapon and see how it looks FPS wise on a map like fallujah.
It does involve a modified BF2.exe. I'm not sure if that will cause problems in PR
- Mineral
- Retired PR Developer
- Posts: 8534
- Joined: 2012-01-02 12:37
- Location: Belgium
Re: Realistic scope effect
Well a scope is usually a hollow cylinder object, meaning depending on the angle you simply see the inside of a scope, the sides. PR has actually modeled those insides(hence 3D scopes) which is more realistic and visually pleasing then a black shadow effect.|HBD|Bad_santa12345 wrote:@Mineral:
What is wrong with the shadow? I have never looked through a real scope so i don't know how it should look. It is made in a shader effect so it is easily modified.
But yeah, as said, if we can do it so it's toggable in the launcher, then I'm all up for it. Just need to monitor and test performance. I think we don't mod our BF2.exe though, only the server executables? Not so sure. But given that EA stopped giving a damn, who cares IMO.
One question though, do you actually render to a texture? Like a on a texture map?? Or is it a overlay over the screen?
Last edited by Mineral on 2014-10-26 18:56, edited 1 time in total.
-
EA_SUCKS
- Posts: 84
- Joined: 2014-10-08 12:53
Re: Realistic scope effect
my pc can handle anything! give it to me
-
|HBD|Bad_santa12345
- Posts: 23
- Joined: 2011-11-30 11:35
Re: Realistic scope effect
If the inside of a scope is actually modelled i could of course use that instead of the shadow. I used the shadow because vBF2 scopes don't have the inside modelled.
I do actually render to a texture ( more specifically IDirect3DSurface9 of a IDirect3DTexture9 )[R-DEV]Mineral wrote: One question though, do you actually render to a texture? Like a on a texture map?? Or is it a overlay over the screen?
Last edited by |HBD|Bad_santa12345 on 2014-10-26 19:33, edited 2 times in total.
- Mats391
- PR:BF2 Lead Developer
- Posts: 7643
- Joined: 2010-08-06 18:06
Re: Realistic scope effect
We already do edit the pr.exe, e.g. to get the right squad numbers. So editing it more should be no problem. Also punkbuster should not be a problem either as i think the 100p servers cant use it anyway.
It all comes down to performance.
It all comes down to performance.
-
Arab
- PR:BF2 Developer
- Posts: 2898
- Joined: 2012-05-18 03:37
Re: Realistic scope effect
This is actually awesome! Well done 
-
KaB
- Retired PR Developer
- Posts: 1016
- Joined: 2011-12-12 12:38
Re: Realistic scope effect
The frame rate goes insanely low when ADS in the video.
-
|HBD|Bad_santa12345
- Posts: 23
- Joined: 2011-11-30 11:35
Re: Realistic scope effect
The scope shadow in this video actually looks pretty close to the one on my system.


