Using source's Depth Of Field
Quote from Arachnaphob on July 9, 2015, 1:55 amSo 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:
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.
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:
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.
Musical website Moddb
Quote from HMW on July 10, 2015, 6:09 amArachnaphob 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."
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."
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic
Quote from SecretComing on July 10, 2015, 8:28 pmI 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?
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?
Quote from SecretComing on July 10, 2015, 8:34 pmsorry for double post!
sorry for double post!
Quote from HMW on July 12, 2015, 8:35 amI 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.)
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.)
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic
Quote from Arachnaphob on July 12, 2015, 6:31 pmYou 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.
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.
Musical website Moddb
Quote from HMW on July 14, 2015, 10:50 amHaha 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.
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.
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic
Quote from GameBurger on July 15, 2015, 3:13 amI'm sorry that my post may not help you with your problem, but just so you know, the screenshot looks spectacular
Combining it with well designed levels can lead to some amazing images
Great work!
I'm sorry that my post may not help you with your problem, but just so you know, the screenshot looks spectacular
Combining it with well designed levels can lead to some amazing images
Great work!
Quote from SecretComing on July 15, 2015, 2:55 pmHMW 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
It's still nice for screenshots though.
Do you have any I can see it? Cause of... reasons
Quote from HMW on July 17, 2015, 10:39 amNope! 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.
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.
Other Portal 2 maps: Medusa Glare
Portal 1 maps: Try Anything Twice | Manic Mechanic