I’m trying to figure out a way to create an obscuring effect outside of the red wall so the player cannot see when they are behind cover. I’m wondering if that’s even possible through raycasting then spawning particles around the area? In this image, the player is looking at the wall there. The ideal result would have everything obscured beside whats in the yellow box. However, obscuring the black area would be a good start as well.
Interesting… kind of like Gears Of War ducking behind a wall but you CAN’T see what’s beyond it to properly simulate having your head down?
Are there any games you have seen this? I’d be curious to see a video to think about it more… I guess you could put up some kind of bokeh / blur effect on a plane radiating out from whatever you’re behind, but the general case of figuring out that plane / planes is a bit of a brain-bender. Hm.
I haven’t seen it implemented in any game before but it’s a way to prevent the player from “cheesing” vision. The player isn’t doing any special action in this scenario they are just pointing the camera toward the wall
I think games don’t have it because it would be hard to implement
I wonder if you could do it with a final render pass something like the deferred lighting pass.
Basically the player’s object would cast “clarity” from his point and wherever there was no clarity, there would be “blurrity.”
For starts what I want to do is raycast from the center of the camera or at least to the center of the camera from the player model. If it hits something happens. Do you know what terms I should look up to achieve the effect I’m going for besides render passing?
I have no idea… I wonder if perhaps you rendered the geometry 3 times:
- the high resolution pass (normal)
- an extremely low resolution pass (like 48x32 pixels total)
- a black and white high resolution pass with a white intense light from your player that casts shadows on a fully white scene, with zero other lights (blackness)
Then for final compositing you would use the output of 3 to select between 1 and 2 on a pixel by pixel basis.