3D Depth Map Based Stereoscopic Shader

  • Devil Master
More
5 years 7 months ago #1301 by Devil Master Replied by Devil Master on topic 3D Depth Map Based Stereoscopic Shader
Has anyone ever tried Supermodel (the Model 3 emulator) with ReShade and SuperDepth3D.fx? I tried Spikeout, Scud Race and Daytona USA 2: in all three cases, the attract mode is 3D and the depth map is correct, but the actual game isn't (and the depth map shows the scene on one plane, the HUD on another).

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
More
5 years 7 months ago #1302 by Devil Master Replied by Devil Master on topic 3D Depth Map Based Stereoscopic Shader
Linking to the latest version of Supermodel, its source code and a Supermodel shader through Pastebin, since the filters of this forum identify direct links as spam. pastebin.com/X7gtM8Jr

Please Log in or Create an account to join the conversation.

  • mr_spongeworthy
More
5 years 6 months ago #1303 by mr_spongeworthy Replied by mr_spongeworthy on topic 3D Depth Map Based Stereoscopic Shader
Hi again, Been playing with the latest version in Skyrim SE and it is working very well overall. In many ways I think it is the best of the depth-based 3D methods (Tri-Def, for example, uses automatic depth functions in Power 3D mode that can't be turned off and can really make my eyes go buggy in certain games, with SuperDepth3D I don't have to worry about that).

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
More
5 years 6 months ago - 5 years 6 months ago #1304 by BlueSkyKnight Replied by BlueSkyKnight on topic 3D Depth Map Based Stereoscopic Shader
There are problems.

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.
Last edit: 5 years 6 months ago by BlueSkyKnight.
The following user(s) said Thank You: mr_spongeworthy

Please Log in or Create an account to join the conversation.

  • BlueSkyKnight
  • Topic Author
More
5 years 6 months ago #1305 by BlueSkyKnight Replied by BlueSkyKnight on topic 3D Depth Map Based Stereoscopic Shader
The Auto Balance option worked better than expected. I ended adding it to the main shader. It's not Perfect. But, IT works well good enough for me.
The following user(s) said Thank You: mr_spongeworthy

Please Log in or Create an account to join the conversation.

  • mr_spongeworthy
More
5 years 6 months ago - 5 years 6 months ago #1306 by mr_spongeworthy Replied by mr_spongeworthy on topic 3D Depth Map Based Stereoscopic Shader
Thanks. I'll definitely give that a try. I'm not necessarily interested in "screen pop" caused by too-much depth or the overall perspective being pushed too far towards me, but in the overall ratio of 3D in a scene. To clearly see what I mean, take a location in Skyrim SE or FO4 and then just walk forwards slowly in the scene (I often use the main street in Whiterun for this, walking in from the main gates, when testing things). Compare how that looks in TriDef Power 3D - there is a relatively small amount of "distant scene" 3D, and as you approach people and objects they gradually become more 3D, rather that less so. SuperDepth3D, on the other hand, with your recommended settings, has the reverse effect - there is a lot of 3D in the more distant areas and as you approach things they gradually become flatter, eventually becoming very flat by the time they are right in front of you (such as when speaking with another character). I think this is the root of the issue - and my brain continually insists that is wrong: Because our eyes are relatively close together, our actual true stereoscopic range is relatively short, and it is more pronounced closer-in, trailing off in the distance. Googling it quickly I see that it is most effective only up to 18 feet ( scecinfo.usc.edu/geowall/stereohow.html ).

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
Last edit: 5 years 6 months ago by mr_spongeworthy.

Please Log in or Create an account to join the conversation.

  • BlueSkyKnight
  • Topic Author
More
5 years 6 months ago - 5 years 6 months ago #1307 by BlueSkyKnight Replied by BlueSkyKnight on topic 3D Depth Map Based Stereoscopic Shader
Ya, This done with auto Focusing. It Tried to simulate how our eyes work. We can't 100% Depth Near the cam all the time. It would cause eye strain. So it's limited.

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.
Last edit: 5 years 6 months ago by BlueSkyKnight.
The following user(s) said Thank You: mr_spongeworthy

Please Log in or Create an account to join the conversation.

  • BlueSkyKnight
  • Topic Author
More
5 years 6 months ago - 5 years 6 months ago #1308 by BlueSkyKnight Replied by BlueSkyKnight on topic 3D Depth Map Based Stereoscopic Shader
The New Updates I introduced Should make Auto Balance a little better now.

As always download them at my GitHub link in my profile.

Last edit: 5 years 6 months ago by BlueSkyKnight.
The following user(s) said Thank You: Aelius Maximus, WalterDasTrevas, mr_spongeworthy

Please Log in or Create an account to join the conversation.

  • mr_spongeworthy
More
5 years 6 months ago - 5 years 5 months ago #1309 by mr_spongeworthy Replied by mr_spongeworthy on topic 3D Depth Map Based Stereoscopic Shader
I haven't tried this very latest update yet, but I did play around with the one you posted a few days back in both Skyrim SE and FO4 a lot more and I've got to say I think you really nailed it this time around. All the problems I was having with near-field depth have been solved and by using relatively low depth-map adjustments (I've found that somewhere around 2 is looking pretty good in those 2 games) and relatively middle-of-the-road overall strength (in the 30-35 range), I'm able to get 3D scenes that look very natural - with a good amount of near-field depth that very gradually fades to lesser depth at longer-ranges, along with relatively low levels of haloing. Very, very good work!
Last edit: 5 years 5 months ago by mr_spongeworthy.

Please Log in or Create an account to join the conversation.

  • mr_spongeworthy
More
5 years 5 months ago #1310 by mr_spongeworthy Replied by mr_spongeworthy on topic 3D Depth Map Based Stereoscopic Shader
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.

Please Log in or Create an account to join the conversation.

  • BlueSkyKnight
  • Topic Author
More
5 years 5 months ago #1311 by BlueSkyKnight Replied by BlueSkyKnight on topic 3D Depth Map Based Stereoscopic Shader

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.
The following user(s) said Thank You: mr_spongeworthy

Please Log in or Create an account to join the conversation.

  • mr_spongeworthy
More
5 years 5 months ago #1312 by mr_spongeworthy Replied by mr_spongeworthy on topic 3D Depth Map Based Stereoscopic Shader

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
More
5 years 5 months ago #1313 by Wicked Sick Replied by Wicked Sick on topic 3D Depth Map Based Stereoscopic Shader
@Blue Sky Defender

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
More
5 years 5 months ago #1314 by BlueSkyKnight Replied by BlueSkyKnight on topic 3D Depth Map Based Stereoscopic Shader

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
More
5 years 5 months ago - 5 years 5 months ago #1315 by mr_spongeworthy Replied by mr_spongeworthy on topic 3D Depth Map Based Stereoscopic Shader
Just a few quick notes:

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.
Last edit: 5 years 5 months ago by mr_spongeworthy.

Please Log in or Create an account to join the conversation.

  • BlueSkyKnight
  • Topic Author
More
5 years 5 months ago - 5 years 5 months ago #1316 by BlueSkyKnight Replied by BlueSkyKnight on topic 3D Depth Map Based Stereoscopic Shader
Depth Map Offset is not what you think. This rescales the depth buffer. This used for problem games that have strange depth buffer ranges like FEZ.

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.
Last edit: 5 years 5 months ago by BlueSkyKnight.
The following user(s) said Thank You: mr_spongeworthy

Please Log in or Create an account to join the conversation.

  • mr_spongeworthy
More
5 years 5 months ago #1317 by mr_spongeworthy Replied by mr_spongeworthy on topic 3D Depth Map Based Stereoscopic Shader
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.

Please Log in or Create an account to join the conversation.

  • BlueSkyKnight
  • Topic Author
More
5 years 5 months ago #1318 by BlueSkyKnight Replied by BlueSkyKnight on topic 3D Depth Map Based Stereoscopic Shader

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. :P......

Please Log in or Create an account to join the conversation.

  • mr_spongeworthy
More
5 years 5 months ago #1319 by mr_spongeworthy Replied by mr_spongeworthy on topic 3D Depth Map Based Stereoscopic Shader
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?

Please Log in or Create an account to join the conversation.

  • BlueSkyKnight
  • Topic Author
More
5 years 5 months ago - 5 years 5 months ago #1320 by BlueSkyKnight Replied by BlueSkyKnight on topic 3D Depth Map Based Stereoscopic Shader

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.
Last edit: 5 years 5 months ago by BlueSkyKnight.

Please Log in or Create an account to join the conversation.

We use cookies
We use cookies on our website. Some of them are essential for the operation of the forum. You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.