3D Depth Map Based Stereoscopic Shader
- Devil Master
I noticed that Supermodel itself uses shaders (there's a shader available to increase compatibility with older GPUs). Unfortunately I don't know the first thing about shaders: I can see that those functions perform operations on arrays and variables, but I don't know what those variables represent, nor what they belong to (the OpenGL library? The program itself?) so I was wondering if BlueSkyKnight has the knowledge to attempt to write a shader for Supermodel (NOT for ReShade) that doesn't destroy 3D buffer data during the game.
Please Log in or Create an account to join the conversation.
- Devil Master
Please Log in or Create an account to join the conversation.
- mr_spongeworthy
The one thing I still have trouble with is "near-field" 3D effect, which I've mentioned before:
To see what I keep going on about, check out Tri-Def's Power 3D mode, or even the Pop3D reshade filter. In the case of Tri-Def, by default there is excellent 3D effect for items near the viewpoint (first person view); Walk up to a character, for example, and that character looks like they are 3D (sometimes too much so, as Tri-Def's auto-adjust will kick-in). Pop3D, on the other hand, offers an overall depth setting plus far-scene and near-scene adjustments (but lacks many advanced features, so I can't really make use of it - still, it remains a great example of what I'm talking about). This works very well and reminds me a little of when you had a "dual-depth-map" solution of some sort.
SuperDepth3D, however, renders anything close to the camera viewpoint as almost-flat. You have a number of tools that help to work-around this, but all of them cause one-form-or-another of distortion. Take ZPD; Push that setting way up and suddenly a reasonable amount of that near-field depth becomes apparent. But, there will also be a nearly-flat "field" of distortion that occurs as you approach an object or person close-up. Weapon-depth likewise can effect these areas of distortion. The final method is to dramatically reduce the overall depth map adjustment, like way down to 2 or even 1.5, and that can also lend some near-field depth, but flattens the rest of the scene dramatically, thus requiring a much higher overall depth-setting and causing a lot of distortion.
IMHO, if you conquer that last remaining issue SuperDepth 3D will be hands-down the best of the depth-map-based 3D methods.
And, as always, thanks for your hard work!
Please Log in or Create an account to join the conversation.
- BlueSkyKnight
- Topic Author
If you want it one way for "Near Depth," You lose depth at range.
If I use Dual Depth Buffers one for each eye. Set one for Near and one for Range.
This is bad too because it can cause issues with eye strain in some people. Not so much for me.
I ended up mixing the ZPD with Normal Depth to have an about 50/50 mix of Range and Pop Out. It can't excel at both.
The reason I pick this one is that no matter where you focus on the image It should give a reasonable Depth at range or close. without much eye strain.
ZPD not really Near depth. It's for out of screen pop out. This is why if set to high it causes distortions. It needs to be limited to 3%.
Even in the 3D Pop Shader this happens to Look at the Depth Buffers when adjusting both. Near Depth, as you call it is just a depth buffer that has nearly no information at the range.
If I set the shader to pure ZPD It will also cause Eye Strain. I also Have to Lock ZPD to Divergence and perspective needs to be adjusted.
Once you look into the distance it will cause eye strain. This is the biggest offender.
Open the images in order.
Dual DepthBuffers - Eye Strain Medium.
My Compromise - Eye Strain Low.
PureZPD - Eye Strain High.
Basically, the reason why I did this is to protect against eyestrain.
You know the funny thing...... I know what can solve this problem. Eye Tracking. If you can track where the eye is looking. You can set Balance in real time. If you look at distance it will focus at range and Vice-Versa. A lot Less Eye Strain.......
I uploaded a shader called SuperDepth3D_Auto_Balance.fx try it out. It will try it's best to adjust as you call it "Near Depth" on its own. It will also have the option to do it for one eye or both. You have to enable "ZPD Locked," So that it works.
Please Log in or Create an account to join the conversation.
- BlueSkyKnight
- Topic Author
Please Log in or Create an account to join the conversation.
- mr_spongeworthy
Anyway, it's certainly something to think about, as it really does seem to be the very last thing you could improve upon - everything else is really spot-on as far as I can tell. Many of the tools you've provided, like the weapon-depth-maps, are really effective and useful.
Looking forward to testing your Auto Balance version. I'll let you know how it works.
EDIT: This helped a LOT. There is is quite a bit more balance overall between distant and near-field 3D. Really a tremendous improvement in my eyes. The nice thing is that even though I guess it "auto-adjusts" in some way, it isn't doing what TriDef does in Power3D mode, which is a very obvious "morph" between the 3D effect when you are right up close to something (Walk up close to a set of Power Armor in F04 and then walk away from it. Then walk up to it. Repeat. That morphing is enough to make me fee queasy! Sure, it makes close-up 3D look amazing, especially for "fake" 3D, but I have a really hard time with that auto-depth transition TriDef uses.) I played with it for nearly and hour and overall think it's a huge step in the right direction.l
Please Log in or Create an account to join the conversation.
- BlueSkyKnight
- Topic Author
I know what you are talking about. I know about the limits of our depth perception. But, this does not take into account our focus. As we focus on an object getting closer to our eyes the image converge. This article should say Convergence is effective for distances less than 10 around meters. But, our depth perception is effective around the 100-200 ish meters range. Then depth cues greater since depth is Inferred. But, 100-200 ish meter Is not small. You can looks at this site to see how far 500 something feet really is. www.prisonpolicy.org/zones/thousand_feet.html
I am well aware of this. But, limiting depth to only 10 meters is also unnatural. This is why eye tracking would be good. Because of Max Convergence can be applied when you focus on something close to you and when you are not it sets itself to distance.
This is where Auto Balance tries to figure out where you are looking at and scale properly. It will try it's best to scale properly.
Also, It's not accurate to call it "Fake 3D" Since the Depth in the shader is based on real Depth that provided by the game.
Guessing all the shader can really do because the shader can't tell where your eyes are really focusing. This is why Eye Tracking is needed to fix this problem.
Please Log in or Create an account to join the conversation.
- BlueSkyKnight
- Topic Author
As always download them at my GitHub link in my profile.
Please Log in or Create an account to join the conversation.
- mr_spongeworthy
Please Log in or Create an account to join the conversation.
- mr_spongeworthy
I would suggest doing something like implementing a slider for "near field vs. distant field ratio" or something like that; a simple adjustment. Or maybe something like a better version of your old "pop" setting that used to exist.
Please Log in or Create an account to join the conversation.
- BlueSkyKnight
- Topic Author
mr_spongeworthy wrote: Played with the new release and currently using it in both FO4 and Skyrim SE. It's very good. My only comment is that it's still a bit confusing to get near-field depth, being a combination of Auto Balance, ZPD, etc. etc. It works pretty darn well, but it's not really a clear process.
I would suggest doing something like implementing a slider for "near field vs. distant field ratio" or something like that; a simple adjustment. Or maybe something like a better version of your old "pop" setting that used to exist.
I will not be doing this. Since in version 2.0.0 I will be extending Auto Balance functionality. Also Having a ZPD adjustment is your "near field adjustment." But like I told you since the depth buffer is shared you can't have one without the other. Also needed to do this because the old Auto Balance was kind of tacked on to 1.9.9 I am integrating it fully into 2.0.0
The issue is if I do use a step function to separate both Convergence Z-Buffer and Normal Z-Buffer as I do with the weapon hand there will be a giant line at the point of step function is adjusted to. This line is very very visible in 3D space. It sometimes even shows up in some of the weapon profile I have listed. But, I do try to hide it from the user. A near field vs. distant field ratio would destroy one or the other if you have it locked to a certain ratio. I tried this in my older shaders and it was called balance hence where the name came from. Also having Convergence Z-Buffer and Normal Z-Buffer added together throws out the near to far range and causes distortions/errors everywhere. Having Convergence Z-Buffer and Normal Z-Buffer averaged out does the same as having it lerped at 50% So no benefit.
Auto Balance is the best solution I have right not to try to give the best of both worlds. The process is not clear to you. Because you are trying to force it to do something it's not made for.
Really low z-buffer adjustment amounts will throw it off as well as really high adjustments would too. It works on an average distance depending on where the sample section of the depth buffer is.
pop will not work with this shader. It was using a totally different method to do this. It also caused errors and issues in the shader like Z-buffer banding.
Also, Auto Balance is a simple adjustment it's a toggle on and off.
What you want would be two sliders that will cause issues with the user. This is the entire reason why I made the z-buffer adjustment one slider. Since it's easy to explain and it also protects against strange adjustments values that will over distort the image. Also as I explain above having a near and far adjustment is useless because it does not do what you think it does. It's the Convergence Z-Buffer and Normal Z-Buffer that are in conflict.
A pure Convergence Z-Buffer will destroy range depth with really low depth values. And if you use a high depth buffer adjustment value, it will overcome the protection use keep the image in a viewable state.
The inverse is also as you expect.
So Auto Balance & soon to be Auto Balance Extended gives the best of both worlds.
Please Log in or Create an account to join the conversation.
- mr_spongeworthy
BlueSkyKnight wrote:
I will not be doing this. Since in version 2.0.0 I will be extending Auto Balance functionality. Also Having a ZPD adjustment is your "near field adjustment." But like I told you since the depth buffer is shared you can't have one without the other. Also needed to do this because the old Auto Balance was kind of tacked on to 1.9.9 I am integrating it fully into 2.0.0
The issue is if I do use a step function to separate both Convergence Z-Buffer and Normal Z-Buffer as I do with the weapon hand there will be a giant line at the point of step function is adjusted to. This line is very very visible in 3D space. It sometimes even shows up in some of the weapon profile I have listed. But, I do try to hide it from the user. A near field vs. distant field ratio would destroy one or the other if you have it locked to a certain ratio. I tried this in my older shaders and it was called balance hence where the name came from. Also having Convergence Z-Buffer and Normal Z-Buffer added together throws out the near to far range and causes distortions/errors everywhere. Having Convergence Z-Buffer and Normal Z-Buffer averaged out does the same as having it lerped at 50% So no benefit.
Auto Balance is the best solution I have right not to try to give the best of both worlds. The process is not clear to you. Because you are trying to force it to do something it's not made for.
So Auto Balance & soon to be Auto Balance Extended gives the best of both worlds.
OK, I understand and will stop trying to forced it to do things it isn't designed to do! Really, it's done nothing but gotten continuously better over the years, and I'm very much looking forward to seeing what's coming up in version 2. I did notice when you took care of the giant line issue, I haven't seen any of that with the latest release.
Please Log in or Create an account to join the conversation.
- Wicked Sick
Are you still working on that HDR and DLAA shaders? Why don't you put them with the official repo?
Please Log in or Create an account to join the conversation.
- BlueSkyKnight
- Topic Author
Wicked Sick wrote: @Blue Sky Defender
Are you still working on that HDR and DLAA shaders? Why don't you put them with the official repo?
The bug that allowed that HDR shader to work was fixed so no use. It can only tone map HDR down now. So I removed it. The DLAA shader was moved.
Please Log in or Create an account to join the conversation.
- mr_spongeworthy
After trying the latest experimental versions I actually went back to the one you posted briefly that was named "SuperDepth3D_Auto_Balance" because that one seems to be doing a good job without adding much, if any, additional distortion. The more recent experimental versions seem to add a bit more distortion.
This might be something useful for you: I was also playing with the "Depth Map Offset" feature, which I've never used before simply because I never saw a need for it and I realized something: I'm almost completely sure that is what TriDef does in their Power3D mode. It has exactly that same effect: In TriDef walk up to something close (a wall) so if fills your field of view and then immediately turn around to a wider-scene. You'll see that anything in the distance is completely flat for just a fraction of a second, then TriDef will quickly adjust the scene so that it looks OK again. Take a scene and adjust your "Depth Map Offset" manually and you'll see that you can produce the same result. Just mentioning it because if you are trying to auto-balance scenes that might be another setting you could try to have adjust manually. (Note that one of the problems with TriDef is that this feature can't be turned off in Power3D mode, nor can the speed or distance of adjustment be altered, and while it works pretty well it can also be pretty disorienting in scenes that are quickly changing.)
No depth-map in Fallout 76 in my initial tests. I know, that's ReShade itself and something you probably can't do anything about.
Finally, which service do you use for free image-hosting? I tend to avoid posting pics in forums that don't directly support the uploading of images simply because it's several extra pain-in-the-neck steps, but I keep making screen-shots I think might be useful and then not doing anything with them.
Please Log in or Create an account to join the conversation.
- BlueSkyKnight
- Topic Author
If used on a game that has a normal depth buffer it will eat up all and I mean all information at a certain point onward. Not usable for normal adjustments and will become a detriment. This not the same as TriDef. Also if you set it to high auto-balance will not work since there will be no information to work with.
But, With that said you can adjust it in veary veary small amounts 0.001-0.005 To adjust the depth map a little.
Use pasteboard.co/ It's fast and easy. But, I don't know if it will work for you.
Also, the newest Auto_Balance has more than one setting. Fallout 76 is a online game. Reshade dissables the Depth Buffer in online games. Thats on reshade side.
Please Log in or Create an account to join the conversation.
- mr_spongeworthy
Any way we can talk Crossire into giving us the option of NOT disabling depth-maps for online games? Seems like something that could be an end-user option.
Please Log in or Create an account to join the conversation.
- BlueSkyKnight
- Topic Author
mr_spongeworthy wrote: So here, I guess, is my question. Could you possibly use an auto-adjusting Depth Map Offset to achieve something similar to what TriDef does? Seems like that might be an option, if it's possible. I'm sure it's not technically exactly what TriDef does, but the results are nearly identical - SuperDepth just doesn't do it automatically. Plus, if you were able to implement something like that I expect you would give us control over it, unlike the fully automatic way it works in TriDef (it's way too aggressive in TriDef - so it's overly obvious and sometimes even disorienting).
Any way we can talk Crossire into giving us the option of NOT disabling depth-maps for online games? Seems like something that could be an end-user option.
The only way to get what you want is to have a limited Depth Buffer. I moved away from this because it will destroy the Weapon Hand Depth buffer scale. IT will also remove a lot of different things that protect against artefacts.
But, I can be done on the FlashBack 3D shader. But, it would come at a performance cost. I will add this option the FlashBack shader after I'm Done with the Main Shader update 2.0
Please note When I do this it will cause issues with functions.
As for the Depth Buffer for online games, that question was asked many times. I am sure if you ask it again you will get a no.
It could be an end-user option just not one he would be willing to do for the reasons he already listed on this forum.
Also before you ask nothing I can do about. ......
Please Log in or Create an account to join the conversation.
- mr_spongeworthy
p.s. I've never even tried the FlashBack 3D shader - I've typically been hopping back to download the latest release and then trying the current release and the current experimental release. Should I give the FlashBack 3D shader a try?
Please Log in or Create an account to join the conversation.
- BlueSkyKnight
- Topic Author
mr_spongeworthy wrote: No worries. When I noticed the similarity between the way TriDef auto-adjust scene depth in Power3D and the way scenes look when I manually adjust Depth Map Offset I thought you might be interested. If it isn't something that will bring any benefit then don't waste you time!
p.s. I've never even tried the FlashBack 3D shader - I've typically been hopping back to download the latest release and then trying the current release and the current experimental release. Should I give the FlashBack 3D shader a try?
Both Shaders have the same outcome a 3D image. They just do it in different ways.I can do something in Flash Back that I can't do in Normal one and Vice-Vesa. So your ideas may work in the 2nd shader. But, I have to work on one at a time. Since they became large shaders. I try to work on them one at a time I should say.
Please Log in or Create an account to join the conversation.