Please or Register to create posts and topics.

Using source's Depth Of Field

Page 1 of 2Next

So recently I've been playing around with console commands to make Portal 2 "look better". Two of those are fairly simple and well known- color correction and bloom. A third, however, is possible, but only with manual adjustment of console commands, or at least from what I know. here is a screenshot of what I have done:
Image
Anyways, there are four main commands, each with a value (In units) that determine where the DOF occurs. There are four main points. We will label it as so:
[PLAYER]
|
1
|
2
|
3
|
4
Between the player and point one, everything is fully blurry. Between point one and point two there is a transition from blurry to in focus. From two to three it is in focus. From three to four it transitions from in focus back to blurry. Now, I was thinking that if there was a script that could tell how far the player is from the point they are looking at on an entity/brush, I could create a function to properly adjust the values of 1, 2, 3, and 4. Being me, I have no idea ho to script past scratch (AKA lies). If someone here would want to help out with getting this to work, that would be amazing. Also, if there is a simpler way, i'd love to try it. If it's true, why aren't any maps using it? It doesn't seem to cause any lag for me, even on highest game settings.

When life gives you lemons, make apple juice and have everyone wonder how you did it.
Musical website Moddb
Arachnaphob wrote:
[W]hy aren't any maps using it?

Maybe because it's not that well known? (This is the first time I heard of it, anyway. Which doesn't say much but there you go...)

Another problem may be, that it would be hard to decide what to focus on. Using the depth under the crosshair seems like an obvious choice, but the player may not be staring at the crosshair constantly (I certainly don't) and then the effect would not follow the player's expectations, which would be annoying.

One application where it would be awesome is in cutscenes:
"Fade in. Camera focuses and closes in on a lonely cube, which the player desperately needs for the puzzle in progress. Focus shifts to the background, to a row of turrets guarding the cube."

Sendificate series: Sendificate | A Beam Too Far | Airtime | 302
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic

I think the only thing i will be able to use that is on like a art therapy chamber, first because this has never been used before so people would consider it strange if I use on a normal chamber, second I would only use that to far things.

Which leads me to another question: can I "control" where that "thing" start?

sorry for double post!

I could not get it to work on my system, either with console commands or an env_dof_controller. Is there anything else you need to do to make it work? (Video settings etc)

(It may also be the case that my old-ish graphics card just can't do this.)

Sendificate series: Sendificate | A Beam Too Far | Airtime | 302
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic

You need to add '+mat_HDR_level 3' in launch options. I found out about it here:

https://m.reddit.com/r/Portal/comments/ ... _portal_2/

It talks about getting dof to work, however, the distance only changes when you use the commands:
Mat_dof_near_blur_distance [X]
Mat_dof_near_focus_distance [X]
Mat_dof_far_focus_distance [X]
Mat_dof_far_blur_distance [X]

DOF controllers never seem to work for me, maybe I'm using them wrong.

When life gives you lemons, make apple juice and have everyone wonder how you did it.
Musical website Moddb

Haha yeah, that looks super weird. It's a shame that it only works with that command-line parameter, otherwise it could be used for some cool cutscenes. (Setting it in the console while the game is already running doesn't seem to do anything.)

It's still nice for screenshots though.

Sendificate series: Sendificate | A Beam Too Far | Airtime | 302
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic

I'm sorry that my post may not help you with your problem, but just so you know, the screenshot looks spectacular :D
Combining it with well designed levels can lead to some amazing images :)
Great work!

HMW wrote:
Haha yeah, that looks super weird. It's a shame that it only works with that command-line parameter, otherwise it could be used for some cool cutscenes. (Setting it in the console while the game is already running doesn't seem to do anything.)

It's still nice for screenshots though.

Do you have any I can see it? Cause of... reasons

Nope! Sorry. I have not used this for screenshots myself yet. But you can look at the image at the top of this thread for an example and there are some more in the Reddit thread linked to by Arachnaphob.

Sendificate series: Sendificate | A Beam Too Far | Airtime | 302
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic
Page 1 of 2Next