3D Depth Map Based Stereoscopic Shader
- guillerodriguezv
Thak you !!!
Please Log in or Create an account to join the conversation.
- Jesped
BTW, is there a way for the Depth Map View to display the depth map in SBS instead of OU/TB?
Please Log in or Create an account to join the conversation.
- WalterDasTrevas
I do not know if in the future it will be possible to develop a "DX8-DX9-DX10 to dxgi", it would be nice.
..
1st - copy the files "openvr_api.dll" and "ReShade64.dll" to the game root .
2nd - rename the file "ReShade64.dll" to "dxgi.dll".
when you run the game, ReShade will appear with no shader loaded. You need to point the "depth3d" folder.
In the "Settings" tab, at the end, you will find the "Virtual Reality" option.
When you turn on this option, "steam VR" will detect your HDM. You now have a "ReShade.ini" in Skyrim game root .
To achieve a "VR scale" ingame, you must use the "Polynomial_Barrel" shader.
Still does not detect the gyroscopes, it is apparently difficult to emulate this function.
I'm using "skse".
EDITED: If you add these lines in "Skyrim.ini", the HUD will be centered and visible on "VR Mode", even the "favorites" menu.
[Interface]
fSafeZoneX=300.0000
fSafeZoneY=150.0000
fSafeZoneXWide=300.0000
fSafeZoneYWide=150.0000
Please Log in or Create an account to join the conversation.
- BlueSkyKnight
- Topic Author
Added "Depth Plus"..... That Old setting that enhances Pop and Depth. I was able to bring this back Due to the new way the shader does the reprojection.
Removed a few Disocclusion_Adjust settings. Most where rendered unneeded with the new update. Radial Mask Normal Mask Normal Depth Mask are still there.
Disocclusion Power Adjust is now 1.250 from the old setting of 1.0
Balance now goes up to 6
The Setting for your games will have to be readjusted if you use Depth Plus. This is due to how it changes the Depth Map. You can just push Balance from 3 to 5 most of the times.
I will be making this the main shader soon. So test it and find any bugs if you can.
Please Log in or Create an account to join the conversation.
- WalterDasTrevas
I tested v1.98 with ReShade VR and Skyrim, I really enjoyed it! The mask seems to have become more subtle and efficient.
I achieved good depth with little distortion, the depth effect seems to have become more natural. It might be placebo, lol, I'll keep playing.
Thanks!
For information, I do not have VIVE or RIFT, I have a Pimax 4k, which is great for replacing the monitor, watching movies 180 and 360, and playing "non VR" games.
Please Log in or Create an account to join the conversation.
- BlueSkyKnight
- Topic Author
WalterDasTrevas wrote: Greetings!
I tested v1.98 with ReShade VR and Skyrim, I really enjoyed it! The mask seems to have become more subtle and efficient.
I achieved good depth with little distortion, the depth effect seems to have become more natural. It might be placebo, lol, I'll keep playing.
Thanks!
For information, I do not have VIVE or RIFT, I have a Pimax 4k, which is great for replacing the monitor, watching movies 180 and 360, and playing "non VR" games.
It's not a Placebo. I did change the way it outputs the image. Try Depth Plus. With these settings for Skyrim SE.
Divergence to what you want
Depth_Map_Adjust=6.875
Balance=4
ZPD=0.075
WDM=23
Disocclusion_Adjust=2
Disocclusion_Power_Adjust=1.25
DepthPlus turn it On
Please Log in or Create an account to join the conversation.
- WalterDasTrevas
Edited: I liked your setup, but I'm being a bit more aggressive in depth effect:
With this setting, cities, caves, mountains, everything gains an impressive depth. Distortion occurs, but it's worth it!
DMA: 4.000
DIVERGENCE: 20
ZPD: 0.259
BALANCE: 6
NORMAL DEPTH MASK
DPA: 2.005
PERSPECTIVE SLIDER: -82.000
WADM: -1.000 / 0.250 / -1.000
DEPTH PLUS: ON
_______________________________
POLYNOMIAL:
IPD: 80
lens distortion: -0.325
ZOOM: 0.685 ASPECT: 0.985
Please Log in or Create an account to join the conversation.
- zig11727
Please Log in or Create an account to join the conversation.
- BlueSkyKnight
- Topic Author
zig11727 wrote: I'm getting a double character image when using Polynomial_Barrel_Distortion_v1.2 what setting do I use to correct this I'm using a oculus rift.
The order is important with Polynomial_Barrel_Distortion. Make sure PBD is last in the list.
Please Log in or Create an account to join the conversation.
- WalterDasTrevas
Depending on the configuration, you may have dual image, but it is easy to fix in real time.
And the "Polynomial" must be below SuperDepth!
Please Log in or Create an account to join the conversation.
- N0NCREDIT
Can someone make to me a very quickly explanation of how I can get it?
What do I need to try to install GTA V and Depth3D? Do I need download "Reshade" and clone the folder by "BlueSkyKnight" from github? anything else?
I really want to try this game and this instalation but I am not sure what to do, I cant find any information about this, can some one help me?
I will wait for a answer, thank you so much, thank for your project!
Please Log in or Create an account to join the conversation.
- BlueSkyKnight
- Topic Author
N0NCREDIT wrote: Hi mates, I got windows 7 and I would like to know if I can play GTA V on HTC Vive using this. (Depth3D)
Can someone make to me a very quickly explanation of how I can get it?
What do I need to try to install GTA V and Depth3D? Do I need download "Reshade" and clone the folder by "BlueSkyKnight" from github? anything else?
I really want to try this game and this instalation but I am not sure what to do, I cant find any information about this, can some one help me?
I will wait for a answer, thank you so much, thank for your project!
You will also need Reshade and the newest version of my shader in that folder you downloaded.
You can use Bigscreen or Virtual Desktop.
Is still the easiest way to install it.
The newest one is 1.9.8.
Please Log in or Create an account to join the conversation.
- N0NCREDIT
BlueSkyKnight wrote: You can use Bigscreen or Virtual Desktop.
Thanks for answering.
I watched the video and started the process but I don't find the option to add GTA V in Bigscreen.
This method supports 360º headtracking/vive controllers or its just to play in a screen with keyboard and mouse? thanks.
Please Log in or Create an account to join the conversation.
- ksotar
I'm continuing my experiments to run Freespace 2 and mods (last time it was Diaspora, now it is Star Wars ), to run with this excellent shader.
Now I'm struggling with everything to run on my rather old notebook with Intel HD 3000 graphics. The game itself runs from 110fps down to 15fps based on mods/settings in that strange native resolution of my screen (lets assume it 720p). Something tells me that it will be poor experience to run 1920x1080p needed for my phone VR headset. And here is what I thought.
When I use shader with 1920x1080 resolution, I got two halves of the screen 960x1080, each scaled from FullHD. It uses more GPU than needed for 960x1080 rendering, reduces image quality on scaling, leaves black bars on the top and bottom of the screen (or ruins aspect ratio if I try to fill this useless area correcting zoom/aspect in PolBarrel shader).
Meanwhile, Freespace can perfectly run in 960x1080 resolution (Diaspora can't for now, but it can 1080x1080 - still very close) - the benefits of being an opensource project. Right now it has little sense - I can get perfect aspect ratio, but ruin horizontal resolution that becomes good old 480px. What if it worked backwards - Freespace runs 960x1080, giving me a performance boost and a perfect AR, leaving crisp picture (no image scaling here), and the shader just doubles picture, providing the needed 1080p?
Does it make any sense?
Please Log in or Create an account to join the conversation.
- BlueSkyKnight
- Topic Author
N0NCREDIT wrote:
BlueSkyKnight wrote: You can use Bigscreen or Virtual Desktop.
Thanks for answering.
I watched the video and started the process but I don't find the option to add GTA V in Bigscreen.
This method supports 360º headtracking/vive controllers or its just to play in a screen with keyboard and mouse? thanks.
This is just a shader. So no head tracking/vive controllers. This shader is used to just produce a stereoscopic image. You can use a Xbox one/Steam/PS4 controller.
Please Log in or Create an account to join the conversation.
- BlueSkyKnight
- Topic Author
ksotar wrote: Hello again.
I'm continuing my experiments to run Freespace 2 and mods (last time it was Diaspora, now it is Star Wars ), to run with this excellent shader.
Now I'm struggling with everything to run on my rather old notebook with Intel HD 3000 graphics. The game itself runs from 110fps down to 15fps based on mods/settings in that strange native resolution of my screen (lets assume it 720p). Something tells me that it will be poor experience to run 1920x1080p needed for my phone VR headset. And here is what I thought.
When I use shader with 1920x1080 resolution, I got two halves of the screen 960x1080, each scaled from FullHD. It uses more GPU than needed for 960x1080 rendering, reduces image quality on scaling, leaves black bars on the top and bottom of the screen (or ruins aspect ratio if I try to fill this useless area correcting zoom/aspect in PolBarrel shader).
Meanwhile, Freespace can perfectly run in 960x1080 resolution (Diaspora can't for now, but it can 1080x1080 - still very close) - the benefits of being an opensource project. Right now it has little sense - I can get perfect aspect ratio, but ruin horizontal resolution that becomes good old 480px. What if it worked backwards - Freespace runs 960x1080, giving me a performance boost and a perfect AR, leaving crisp picture (no image scaling here), and the shader just doubles picture, providing the needed 1080p?
Does it make any sense?
What starwars game? There are so many O_o.
Also, I have a hard time understanding you.
Are you asking? That if you split the image. Does it use more resources? Please tell me what shaders you are using so I can help you reduce the resources used. You can always come to the discord chat. So I can help you in real-time. If I am on at that time.
Please Log in or Create an account to join the conversation.
- ksotar
About Freespace.
Freespace 2 is an old space sim game (1999). What makes it outstanding is that it went open source soon and has developed pretty much since (trying to stay in shape in terms of 3D graphics), has a decent community around it. It also became a platform for a large number of mods to represent some other SciFi universes in space sim genre. Among them are Diaspora (Battle Star Galactica (new series) setting) and Star Wars Original Trilogy .
So we can say (with some minor nuances) that Freespace 2 Open is the engine used in those mods, and to test/try something about them it is enough to have just Freespace 2. The simplest way to obtain it is through here . The latest graphics improvements (they are called Freespace 2 Upgrade) for it can be obtained here . But you can see that installation process is becoming more and more complex, so I don't urge anyone to install any mods, as I said, simply Freespace 2 will be enough to test.
Diaspora is an exclusion here since it has a standalone installer, and it is much simpler to install, but it can have some minor differences in the engine itself.
I hope it clears something up BTW most of the names and references I used here are clickable URLs, IDK why they are not highlighted.
The part about my thoughts on the Depth3D will follow.
Please Log in or Create an account to join the conversation.
- ksotar
I'm using Depth3D to make SBS image on my PC and to translate it on my phone to use as VR Headset - its pretty obvious. My phone has 1920x1080 resolution (1080p or FullHD if you want). The same resolution I use for games. I have no problem running all that on my desktop PC, since it has NVidia GTX 750 in it, exept both images of SBS have large black stripes on top and bottom, that is expected to happen when you scale 1920x1080 image to fit 960x1080. I can use aspect\zoom settings in PolynomialDistortion shader to fill those stripes, but then, expectedly, image will be pretty much stretched. And that concludes my Problem #1.
And then I needed to run all of it on my old notebook with Intel HD 3000 inside (I want to have a more mobile system). It has 1360x768 resolution and I'm starting to have performance issues even with the game itself (Star Wars OT mod, or standalone Freespace 2 Upgrade), without any shaders. If I go up with resolution to 1920x1080 that is needed for my phone, it will get only worse, obviously. That's Problem #2.
And then I thought about how Depth3D works (correct me if I'm wrong, it may be only my wild guesses ) on my PC. It takes 1920x1080 rendering pipe, makes it produce two images of 1920x1080 with slightly altered depth buffer or something so they appears to be rendered with "different point of view", which process is much faster then to render two separate 1920x1080 images with the "true point of view". Anyways, game engine works with 1920x1080 resolution, and the resulting images are scaled to fit 960x1080 (half of a frame). What if (and that's my proposition) we will have game engine to work in 960x1080 resolution (it will perform better than with 1920x1080, helping with Prob.2) and then we don't need to scale anything, just place two images SBS (that will help with Prob. 1). Freespace 2 can be launched in 960x1080 resolution with zero problems, Diaspora can't, but it is capable of 1080x1080, that's pretty close.
Did I make myself clearer? Is this possible at all?
Please Log in or Create an account to join the conversation.
- BlueSkyKnight
- Topic Author
ksotar wrote: Now I'll try to explain my question concerned with the Depth3D itself.
I'm using Depth3D to make SBS image on my PC and to translate it on my phone to use as VR Headset - its pretty obvious. My phone has 1920x1080 resolution (1080p or FullHD if you want). The same resolution I use for games. I have no problem running all that on my desktop PC, since it has NVidia GTX 750 in it, exept both images of SBS have large black stripes on top and bottom, that is expected to happen when you scale 1920x1080 image to fit 960x1080. I can use aspect\zoom settings in PolynomialDistortion shader to fill those stripes, but then, expectedly, image will be pretty much stretched. And that concludes my Problem #1.
You don't need to fill the screen. But, if you do you need to zoom in. You will have to readjust IPD. Zooming in will make you lose information due to I am getting 3D from only one perspective.
ksotar wrote: And then I needed to run all of it on my old notebook with Intel HD 3000 inside (I want to have a more mobile system). It has 1360x768 resolution and I'm starting to have performance issues even with the game itself (Star Wars OT mod, or standalone Freespace 2 Upgrade), without any shaders. If I go up with resolution to 1920x1080 that is needed for my phone, it will get only worse, obviously. That's Problem #2.
For a bit of a performance boost try lowering the Z-buffer resolution. In the shader.
// Determines The resolution of the Depth Map. For 4k Use 1.75 or 1.5. For 1440p Use 1.5 or 1.25. For 1080p use 1. Too low of a resolution will remove too much.
Line 25 #define Depth_Map_Division 1.0
You can also use a lesser form of Dis-occlusion. Or turn it off. If you are using a really low "Depth_Map_Division," setting.
ksotar wrote: And then I thought about how Depth3D works (correct me if I'm wrong, it may be only my wild guesses ) on my PC. It takes 1920x1080 rendering pipe, makes it produce two images of 1920x1080 with slightly altered depth buffer or something so they appears to be rendered with "different point of view", which process is much faster then to render two separate 1920x1080 images with the "true point of view". Anyways, game engine works with 1920x1080 resolution, and the resulting images are scaled to fit 960x1080 (half of a frame). What if (and that's my proposition) we will have game engine to work in 960x1080 resolution (it will perform better than with 1920x1080, helping with Prob.2) and then we don't need to scale anything, just place two images SBS (that will help with Prob. 1). Freespace 2 can be launched in 960x1080 resolution with zero problems, Diaspora can't, but it is capable of 1080x1080, that's pretty close.
Yes, I am reprojecting the image back on to the screen from the original viewpoint. This is part of the reason why. So the 3D will Half.
Try running. The game in 16:9 since reshade does not like too many crazy resolutions.
ksotar wrote: Did I make myself clearer? Is this possible at all?
I do think so.
Please Log in or Create an account to join the conversation.
- ksotar
BlueSkyKnight wrote: You don't need to fill the screen.
Well, of course I do - or otherwise it will ruin whole VR experience I'll try to illustrate it with screenshots, I've also understood that I remembered some details wrong, so I'll fix it.
I start with 1920x1080. I use windowed mode because otherwise TrinusVR can't stream on my phone. Since resolution is the same with my phone, I'll provide screenshots from PC only. You can notice that Aspect Ratio (AR) is good by looking at the round shield image around my craft (down, right from the radar):
Then I activate Depth3D producing SBS image, notice that AR is broken:
Then I use Polinomial Barrel Distortion, and that fixes the AR, leaving large unused areas on top and bottom of the screen:
I can of course fill it back using AR correction, but it will break AR again:
As you say, I can zoom in, leaving the aspect ratio. But it is of little help, since I'm not only loosing the information on the sides (mainly HUD messages and screens), I'm also loosing pixel density (actual resolution), that is quite bad for VR headset:
An that's my whole point: there is little use to render game in 1920x1080 if we need to stretch or loose after. In fact we're rendering here in resolution that we can't use, and more over, it ruins the AR.
Thanks for the suggestions about perfomance tweaks, but I think I'll get to them later, then we'll deal with the main problem
Please Log in or Create an account to join the conversation.