3D Depth Map Based Stereoscopic Shader

More
4 years 10 months ago #261 by BlueSkyKnight
Replied by BlueSkyKnight on topic SidebySide 3D Depth Map Based Stereoscopic Shader

Just a quick note to say that I finally did a performance comparison between this and TriDef running my P3D profile. Performance with your shader is far better. I easily average +10fps (sometimes even better than that) using your shader as opposed to TriDef and the exact same scene. And that's not even a completely fair comparison since I'm using Shadow Boost, which is reducing the shadow draw distance when utilizing TriDef but not have to kick in at all using your shader. So without ShadowBoost it's possible you might be looking at a 15 or even 20fps performance increase over TriDef in exactly the same scene. Excellent performance. Your shader is ever so slightly "softer" than TriDef,, but increasing Lumasharpen corrects that as far as I can tell (I've turned your "blur" setting to 0 already).


Blur does not blur the image output. It blurs the Depth map. This is one of the things that reduces halos. I added this option to turn it off because some people got used to halos and it not bother to them.
The following user(s) said Thank You: mr_spongeworthy

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

More
4 years 10 months ago - 4 years 10 months ago #262 by BlueSkyKnight
Replied by BlueSkyKnight on topic SidebySide 3D Depth Map Based Stereoscopic Shader
Talk about Working depth maps 2Dto3D conversion. Things I have learn

HSV color conversion is very important it also has to be reinserted twice on at different points of the process. Took the clue from Sharps 2D to 3D conversion PowerPoint presentation.

Needs dominate Color detection so that color inversion happens automaticly, Also Presudo Depth-maps to assists needed aswell this would have to be based on the dominate shape in the scene. If some one can figure that out then maybe we can have a ok 2D to 3D converter.

I think we have Ok 2D to 3D coversion for movies.

Here a scene from Netflix show Stranger Things. Hallway

The DepthMap

//With a Presudo Depth overlay would help with that bright spot on the left and give the scene more even color.

The 3D image it Produces.

//Your Brain will correct for abnormality. Like the Black orbs in the middle of this image.

This Kind Of shader needs a lot of work.

I will upload it soon. This shader needs some one dedicated to this kind of work to get it going. If some one want to work on this as a project please do.
Last edit: 4 years 10 months ago by BlueSkyKnight.

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

More
4 years 10 months ago #263 by otherman
In theory, a picture (or a single frame) has not true 3d information. The best methods, also used in high professional 2Dto3D conversion for movies, use differences between frames to get it.
I think you need it, to some extend, to make a depth mask that makes any sense.

An exemple is what I said in my first post about speed: 2d tracking movements of main features in the picture between frames, give reasonable information on what is near and what is far the pov.

Sorry, my code skills stop to very basic HTML, I can't help you.

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

More
4 years 10 months ago - 4 years 10 months ago #264 by BlueSkyKnight
Replied by BlueSkyKnight on topic SidebySide 3D Depth Map Based Stereoscopic Shader

In theory, a picture (or a single frame) has not true 3d information. The best methods, also used in high professional 2Dto3D conversion for movies, use differences between frames to get it.
I think you need it, to some extend, to make a depth mask that makes any sense.

An exemple is what I said in my first post about speed: 2d tracking movements of main features in the picture between frames, give reasonable information on what is near and what is far the pov.

Sorry, my code skills stop to very basic HTML, I can't help you.


The thing is to do this with out delay is a lot harder. So I have to go by DOF effects and Color information from RGBtoHSV conversion. Ya that way your saying may not be possible to do as shader.

Depth from from motion can be done, but will break down once things stop moving.

If you have a video you can buffer it then play it. But, for a game......... well it can't be done the same way.

Also the depth maps I have here are inverted.

also the biggest problem is removing noise.... This is a very intensive process.
Last edit: 4 years 10 months ago by BlueSkyKnight.

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

More
4 years 10 months ago - 4 years 10 months ago #265 by mr_spongeworthy
Replied by mr_spongeworthy on topic SidebySide 3D Depth Map Based Stereoscopic Shader
OK, I see what you mean about the Blur function. I'll play with it a bit and see how it changes things. (As you can see I have not read all 14 pages of posts or I would have known that...)

Maybe you should just edit the initial post to include the common questions and answers you've been seeing throughout this thread, rather than having to answer them individually.

I'll be trying your shader in a few more games soon, things like The Witcher 3 where the TriDef profile doesn't work well (TONS of issues with lighting sources). I'll let you know how things look when I get a chance. I've also posted a few stereoscopic images on the Nexus forums (some done with TriDef, some with your SuperDepth3D). Here are a couple I am fairly sure were taken with your Shader (you can find more if you search for content from mr_spongeworthy on the nexus I expect):

staticdelivery.nexusmods.com/images/1151/979461-1472194493.jpg

staticdelivery.nexusmods.com/images/1151/979461-1472507759.jpg
Last edit: 4 years 10 months ago by mr_spongeworthy.

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

More
4 years 10 months ago - 4 years 10 months ago #266 by BlueSkyKnight
Replied by BlueSkyKnight on topic SidebySide 3D Depth Map Based Stereoscopic Shader

OK, I see what you mean about the Blur function. I'll play with it a bit and see how it changes things. (As you can see I have not read all 14 pages of posts or I would have known that...)

Maybe you should just edit the initial post to include the common questions and answers you've been seeing throughout this thread, rather than having to answer them individually.

I'll be trying your shader in a few more games soon, things like The Witcher 3 where the TriDef profile doesn't work well (TONS of issues with lighting sources). I'll let you know how things look when I get a chance. I've also posted a few stereoscopic images on the Nexus forums (some done with TriDef, some with your SuperDepth3D). Here are a couple I am fairly sure were taken with your Shader (you can find more if you search for content from mr_spongeworthy on the nexus I expect):

staticdelivery.nexusmods.com/images/1151/979461-1472194493.jpg

staticdelivery.nexusmods.com/images/1151/979461-1472507759.jpg


I am happy you are enjoying it. Keep in mind I am still working on this and looking for ways to make it look better. The Next step is to fix weapon depth.

Finding the weapon in the Depth buffer is one thing.

Adjusting for the depth map in this location is a other thing.

But, once found weapons can have there own depth maps.
Last edit: 4 years 10 months ago by BlueSkyKnight.

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

More
4 years 10 months ago #267 by Aelius Maximus
Replied by Aelius Maximus on topic SidebySide 3D Depth Map Based Stereoscopic Shader

I really should have left notes. As you can see it was a rushed job.

I'm sorry about that.

maybe if you change rgb to just r since the rest of the colors are not necessary.

Also most of the problems come not using passes when passing information from one to the other.

convert them to void and create a pass to a texture. Then Pass that texture over. This way you may get a performance boost. maybe not. also reshade will stop yelling at you..

you can also remove

DepthL = min(DepthL,1 - (tex2D(PseudoDofSamplerC,float2(texcoord.x+uv.x*pix.x, texcoord.y)).r)-tex2D(SamplerCC,float2(texcoord.x, texcoord.y)).rgb);

DepthR = min(DepthR,1 - (tex2D(PseudoDofSamplerC,float2(texcoord.x-uv.x*pix.x, texcoord.y)).r)-tex2D(SamplerCC,float2(texcoord.x, texcoord.y)).rgb);

PseudoDofSamplerC is not that good.



This worked like a charm, thanks, even managed to get it to compile in ReShade 1.1

Injected into various 2d applications, Media Players, Google Earth, Street View, Various 2D emulators, and it works as the WIP shader that it is. Could be very awesome once you figure out a good 2D to 3D algorithm, :D

I really hope this shader comes along

I'm guessing the new 2dto3dconv shader is for dev's only as it shows a blank left and right when i activate it.

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

More
4 years 10 months ago - 4 years 10 months ago #268 by BlueSkyKnight
Replied by BlueSkyKnight on topic SidebySide 3D Depth Map Based Stereoscopic Shader

I really should have left notes. As you can see it was a rushed job.

I'm sorry about that.

maybe if you change rgb to just r since the rest of the colors are not necessary.

Also most of the problems come not using passes when passing information from one to the other.

convert them to void and create a pass to a texture. Then Pass that texture over. This way you may get a performance boost. maybe not. also reshade will stop yelling at you..

you can also remove

DepthL = min(DepthL,1 - (tex2D(PseudoDofSamplerC,float2(texcoord.x+uv.x*pix.x, texcoord.y)).r)-tex2D(SamplerCC,float2(texcoord.x, texcoord.y)).rgb);

DepthR = min(DepthR,1 - (tex2D(PseudoDofSamplerC,float2(texcoord.x-uv.x*pix.x, texcoord.y)).r)-tex2D(SamplerCC,float2(texcoord.x, texcoord.y)).rgb);

PseudoDofSamplerC is not that good.



This worked like a charm, thanks, even managed to get it to compile in ReShade 1.1

Injected into various 2d applications, Media Players, Google Earth, Street View, Various 2D emulators, and it works as the WIP shader that it is. Could be very awesome once you figure out a good 2D to 3D algorithm, :D

I really hope this shader comes along

I'm guessing the new 2dto3dconv shader is for dev's only as it shows a blank left and right when i activate it.



Ya it's really Hard to do It also takes up a lot of time.

I have also found this.

www.flickr.com/groups/gmic/discuss/72157626154386744/

This Gimp programmer made 2D to 3D converter

The code for it is here.
pastebin.com/82LKJvGp

The problem here is that I don't understand the Gimp scripting structure.

Also looking at the video conversions he has they are a lot better. Then what I have. Watching the out put with my old red and blue glasses. It works a lot better then mine
.

The video has a lot of wiggling. But, I think It's works really really well....

Now if we have any one here that understand gimp programming. ^_^ then we can have OK 2d to 3D conversions.
Last edit: 4 years 10 months ago by BlueSkyKnight.
The following user(s) said Thank You: Aelius Maximus

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

More
4 years 10 months ago - 4 years 10 months ago #269 by BlueSkyKnight
Replied by BlueSkyKnight on topic SidebySide 3D Depth Map Based Stereoscopic Shader
Shader update v1.8.4

Small update to the blur code. Don't think it made the shader any slower or any faster. But, The reason I am still working on the blur code is to combat the harsh separation effect that makes it look like you have break in the picture.

Blurring The depth map lowers that harsh separation make it more pleasing to the eye and the brain. To my understanding subtle warping. Here are images Referencing the differences.
Shader Blur 1.8.3 Blur setting at Default 7.5


Shader Blur 1.8.4 Blur setting at Default 0.050


You can always lower the Blur if it's eating too much of the Depth Information.
In GTA 5 I notice a setting of 0.025 on the new shader is ok.

You can still turn off the Blur effect by just setting it to Zero. This will give a sharper Image. But, will bring back that strong Halo effect.

I am still working on weapon depth This turned out to be harder then expected for some games.
Last edit: 4 years 10 months ago by BlueSkyKnight.
The following user(s) said Thank You: Aelius Maximus

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

More
4 years 10 months ago - 4 years 10 months ago #270 by Aelius Maximus
Replied by Aelius Maximus on topic SidebySide 3D Depth Map Based Stereoscopic Shader

Ya it's really Hard to do It also takes up a lot of time.

I have also found this.

www.flickr.com/groups/gmic/discuss/72157626154386744/

This Gimp programmer made 2D to 3D converter

The code for it is here.
pastebin.com/82LKJvGp

The problem here is that I don't understand the Gimp scripting structure.

Also looking at the video conversions he has they are a lot better. Then what I have. Watching the out put with my old red and blue glasses. It works a lot better then mine
.
The video has a lot of wiggling. But, I think It's works really really well....

Now if we have any one here that understand gimp programming. ^_^ then we can have OK 2d to 3D conversions.


Damn, theres gotta be someone on here who can translate it to HLSL

Not to mention, you would then have to remove the anaglyph and make it compatible with SBS :(

It's a conundrum
Last edit: 4 years 10 months ago by Aelius Maximus.

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

More
4 years 10 months ago #271 by BlueSkyKnight
Replied by BlueSkyKnight on topic SidebySide 3D Depth Map Based Stereoscopic Shader

Ya it's really Hard to do It also takes up a lot of time.

I have also found this.

www.flickr.com/groups/gmic/discuss/72157626154386744/

This Gimp programmer made 2D to 3D converter

The code for it is here.
pastebin.com/82LKJvGp

The problem here is that I don't understand the Gimp scripting structure.

Also looking at the video conversions he has they are a lot better. Then what I have. Watching the out put with my old red and blue glasses. It works a lot better then mine
.
The video has a lot of wiggling. But, I think It's works really really well....

Now if we have any one here that understand gimp programming. ^_^ then we can have OK 2d to 3D conversions.


Damn, theres gotta be someone on here who can translate it to HLSL

Not to mention, you would then have to remove the anaglyph and make it compatible with SBS :(

It's a conundrum


The easy part would be adding side by side.

The hard part is translating it in the first place. Hey want to learn Gimp script programing? :lol:

But, really some could ask him if he can translate it to HLSL or GLSL.

That or make a request here on the request forum here.

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

More
4 years 10 months ago #272 by Aelius Maximus
Replied by Aelius Maximus on topic SidebySide 3D Depth Map Based Stereoscopic Shader

The easy part would be adding side by side.

The hard part is translating it in the first place. Hey want to learn Gimp script programing? :lol:

But, really some could ask him if he can translate it to HLSL or GLSL.

That or make a request here on the request forum here.


Do you know any fellow coders that know gimp programming language

We should ask around on here? :D

What about the laplachian HLSL code that i found, is that still of some use?

Is the current 2dto3d converter shader still development only?

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

More
4 years 10 months ago - 4 years 10 months ago #273 by BlueSkyKnight
Replied by BlueSkyKnight on topic SidebySide 3D Depth Map Based Stereoscopic Shader

The easy part would be adding side by side.

The hard part is translating it in the first place. Hey want to learn Gimp script programing? :lol:

But, really some could ask him if he can translate it to HLSL or GLSL.

That or make a request here on the request forum here.


Do you know any fellow coders that know gimp programming language

We should ask around on here? :D

What about the laplachian HLSL code that i found, is that still of some use?

Is the current 2dto3d converter shader still development only?


I tried it out and it works. But, produces holes that the median filter is finding hard to fill.

But, I found use for the radial blur. I rewrote it to work not as Radial but as a single axis filter.

Thank you. with this I was able to make the shader we have now look a little bit sharper.

I don't know any one that programs for gimp. My not hurt to ask Thomas Keil himself. He the one that wrote it.

Also, I think we should be able to ask around gmic.eu/ community for some help with the converting the code over to HLSL or GLSL.

*G'MIC* plug in is really really nice for Gimp. It became a must have for photo editing. I recommend it.
Last edit: 4 years 10 months ago by BlueSkyKnight.
The following user(s) said Thank You: Aelius Maximus

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

More
4 years 10 months ago - 4 years 10 months ago #274 by Aelius Maximus
Replied by Aelius Maximus on topic SidebySide 3D Depth Map Based Stereoscopic Shader

I tried it out and it works. But, produces holes that the median filter is finding hard to fill.

But, I found use for the radial blur. I rewrote it to work not as Radial but as a single axis filter.

Thank you. with this I was able to make the shader we have now look a little bit sharper.

I don't know any one that programs for gimp. My not hurt to ask Thomas Keil himself. He the one that wrote it.

Also, I think we should be able to ask around gmic.eu/ community for some help with the converting the code over to HLSL or GLSL.

*G'MIC* plug in is really really nice for Gimp. It became a must have for photo editing. I recommend it.


So the Laplace code worked? :cheer:

And the Radial Blur has been reworked and used as a replacement for the Median Filter if i am not mistaken?

You say the current shader we have, meaning 2dto3dconv.fx?


Currently still messing around with the WIP version from 1 week ago, and noticing an awesome side effect of the light based depth, seen here in this texture from cave in Unreal Tournament 2004, a 12 year old game with very flat textures. yet light based 2d to-3d brings it to life and gives surface of cave wall awesome 3d effect dark areas look deep and light areas stand out. focus on image below in SBS mode(kind of look similar to parrallax mapping) en.wikipedia.org/wiki/Parallax_mapping

i.imgur.com/Sg51aSC.jpg
Last edit: 4 years 10 months ago by Aelius Maximus.

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

More
4 years 10 months ago #275 by BlueSkyKnight
Replied by BlueSkyKnight on topic SidebySide 3D Depth Map Based Stereoscopic Shader

So the Laplace code worked? :cheer:

And the Radial Blur has been reworked and used as a replacement for the Median Filter if i am not mistaken?

You say the current shader we have, meaning 2dto3dconv.fx?


Currently still messing around with the WIP version from 1 week ago, and noticing an awesome side effect of the light based depth, seen here in this texture from cave in Unreal Tournament 2004, a 12 year old game with very flat textures. yet light based 2d to-3d brings it to life and gives surface of cave wall awesome 3d effect dark areas look deep and light areas stand out. focus on image below in SBS mode(kind of look similar to parrallax mapping) en.wikipedia.org/wiki/Parallax_mapping

i.imgur.com/Sg51aSC.jpg


The radial blur was used to replace my blur I had before.

Median Filter is used for hole filling.

Parrallax mapping was one of my ideas of working on once I am comfortable with the shader I have now.

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

More
4 years 10 months ago - 4 years 10 months ago #276 by Aelius Maximus
Replied by Aelius Maximus on topic SidebySide 3D Depth Map Based Stereoscopic Shader

So the Laplace code worked? :cheer:

And the Radial Blur has been reworked and used as a replacement for the Median Filter if i am not mistaken?

You say the current shader we have, meaning 2dto3dconv.fx?


Currently still messing around with the WIP version from 1 week ago, and noticing an awesome side effect of the light based depth, seen here in this texture from cave in Unreal Tournament 2004, a 12 year old game with very flat textures. yet light based 2d to-3d brings it to life and gives surface of cave wall awesome 3d effect dark areas look deep and light areas stand out. focus on image below in SBS mode(kind of look similar to parrallax mapping) en.wikipedia.org/wiki/Parallax_mapping

i.imgur.com/Sg51aSC.jpg


The radial blur was used to replace my blur I had before.

Median Filter is used for hole filling.

Parrallax mapping was one of my ideas of working on once I am comfortable with the shader I have now.


In a way, you have already kind of have something similar to it with light based 2d-3d

If the 2d-3d shader also had a good full scene 3d effect, rather than just looking good on textures, it would be one hell of shader. :D

Last edit: 4 years 10 months ago by Aelius Maximus.
The following user(s) said Thank You: BlueSkyKnight

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

More
4 years 10 months ago - 4 years 10 months ago #277 by BlueSkyKnight
Replied by BlueSkyKnight on topic SidebySide 3D Depth Map Based Stereoscopic Shader
Update 1.8.5 Cross Cusor Update......

So I added a Cross cusor based on the code listed here.
github.com/crosire/reshade-shaders/blob/...ders/MouseOverlay.fx

Changed it to a Cross pointer from the square one in this code.
I did keep the settings for Cursor Color and Cursor Size
This is to solve the problem of hard to use/click in game menus.

To use it press ` The same key as ~

Here a example game where in game menu navigation was a pain.
Borderlands 2

Green cusor not too big

Deus Ex: Mankind Divided.

Gold color a bit bigger.

Yes I know Deus Ex: Mankind Divided has a built in Side By Side 3D. But, My head Hurts when I play that game with there built in 3D. It's to hard on me :(..... Let me know if you want me to share m profile for this game.

The reason you can't see my windows cusor is because I use a very small one as a pointer. I made a Game profile in windows to make my cusor small.

you can get mini cusors here.
www.rw-designer.com/cursor-set/mini-mousepointer
Last edit: 4 years 10 months ago by BlueSkyKnight.
The following user(s) said Thank You: Aelius Maximus

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

More
4 years 10 months ago - 4 years 10 months ago #278 by Sh1nRa358
@BlueSkyKnight: Do you have a version of these that work with reshade 1.1.0f1? I don't want to switch from that yet because I have a couple of other shaders I like that doesn't work correctly with anything above it. I haven't tried yet but would I need to change anything to make this work or will it work right out the box for that reshade version?
Last edit: 4 years 10 months ago by Sh1nRa358.

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

More
4 years 10 months ago - 4 years 10 months ago #279 by BlueSkyKnight
Replied by BlueSkyKnight on topic SidebySide 3D Depth Map Based Stereoscopic Shader

@BlueSkyKnight: Do you have a version of these that work with reshade 1.1.0f1? I don't want to switch from that yet because I have a couple of other shaders I like that doesn't work correctly with anything above it. I haven't tried yet but would I need to change anything to make this work or will it work right out the box for that reshade version?


I will port the new one to 2.0 then you can port it over to 1.1. I do this when I get back from the eye doctor to day.
Last edit: 4 years 10 months ago by BlueSkyKnight.
The following user(s) said Thank You: Sh1nRa358, Aelius Maximus

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

More
4 years 10 months ago - 4 years 10 months ago #280 by Aelius Maximus
Replied by Aelius Maximus on topic SidebySide 3D Depth Map Based Stereoscopic Shader
Is a usable version of 2dto3dconv being uploaded at some point? The one you tested with "Stranger Things" perhaps? :side:

The current one still show blank SBS image :D
Last edit: 4 years 10 months ago by Aelius Maximus.

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