bo3b / 3Dmigoto

Chiri's DX11 wrapper to enable fixing broken stereoscopic effects.
Other
758 stars 118 forks source link

New user or 3Dmigoto, could someone help me? #121

Closed elektokat closed 4 years ago

elektokat commented 4 years ago

Hello

I love to game without any or little HUD so I was thrilled when I heard about 3Dmigoto and that is it possible to hide the HUD with it. I also downloaded some "profiles" from other people and put them in game folders and it worked like a charm. I want to create my own HUD toggle "mods" with 3Dmigoto though and tried to follow a tutorial, but I got stuck right away. Not sure if the game I am trying it on is incompatible (if there are incompatible games?) or if I am just doing something wrong. I must say that I am not very tech savvy.. :/

Could someone please help me understand how to use 3Dmigoto and come around my problems?

The game I tried to make it work on was Zombi and I just downloaded 3dmigoto-1.3.8 and put the content of the x64 folder into the game folder where the .exe is. I tried to start the game that way and look for the green text that I read about in tutorial should appear if things are working but non appeared. I also tried to place the loader.exe in the same directory and put the target etc values in the d3dx.ini in such a way that the loader was happy and gave me the "3DMigoto ready - Now run the game" message, but still after starting the game nothing happens :/

Could someone please help me with this? :)

bo3b commented 4 years ago

Sorry, that's not going to work on Zombi, it looks like that game uses DX9. 3Dmigoto is strictly DX11 at present.

You can use HelixMod instead, which is DX9 based, but is harder to use. For disabling shaders it should be fine though. Start with this tutorial: http://wiki.bo3b.net/index.php which will fill in a lot of gaps for you, and show you how to disable shaders.

elektokat commented 4 years ago

Sorry, that's not going to work on Zombi, it looks like that game uses DX9. 3Dmigoto is strictly DX11 at present.

You can use HelixMod instead, which is DX9 based, but is harder to use. For disabling shaders it should be fine though. Start with this tutorial: http://wiki.bo3b.net/index.php which will fill in a lot of gaps for you, and show you how to disable shaders.

Thank you! I wil try out Helix!

elektokat commented 4 years ago

Sorry, that's not going to work on Zombi, it looks like that game uses DX9. 3Dmigoto is strictly DX11 at present.

You can use HelixMod instead, which is DX9 based, but is harder to use. For disabling shaders it should be fine though. Start with this tutorial: http://wiki.bo3b.net/index.php which will fill in a lot of gaps for you, and show you how to disable shaders.

Btw, is DX10 compatible? There was a download for a dxgi.dll on the download page that had the description on it: "This loader can be used if dxgi is required earlier than d3d11, like ShadowOfWar. Works for both Win7 and Win10, but is x64 only. This is not the same as the 3DMigoto Loader.exe shipped with 3DMigoto 1.3.15+ and is used in different circumstances."

Is that one for DX10 then?

Is DX12 compatible?

bo3b commented 4 years ago

Not really DX10 compatible, although we have a prototype that was working years ago. Current state pretty much unknown. Mostly games bypassed DX10, so there has only been one game I recall seeing that was DX10 only. Typically they let you fall back to DX9 which would be the better choice.

The dxgi.dll is just a loader, and doesn't do anything other than to call into d3d11.dll to get it started. That loader is sometimes necessary depending upon the game. In Prey for example, they would call out to DXGI first, and bypass our hooks. The loader solves that problem. Rarely used.

The 3DMigotoLoader.exe is for Windows Store apps/games, to allow us to hook them. It works, but the Win store is truly terrible and shouldn't be avoided. Testing a couple of games shows this works, but it's buggy and a bad experience. Not something we can fix- Windows is blocking the nvidia driver workarounds for multi-threaded code. Avoid.

We have no DX12 at present. Not impossible to make one, but so far low incentive because only a handful of games have required it. Too much work for too little payoff. That might change if next gen consoles are DX12 only.

elektokat commented 4 years ago

Not really DX10 compatible, although we have a prototype that was working years ago. Current state pretty much unknown. Mostly games bypassed DX10, so there has only been one game I recall seeing that was DX10 only. Typically they let you fall back to DX9 which would be the better choice.

The dxgi.dll is just a loader, and doesn't do anything other than to call into d3d11.dll to get it started. That loader is sometimes necessary depending upon the game. In Prey for example, they would call out to DXGI first, and bypass our hooks. The loader solves that problem. Rarely used.

The 3DMigotoLoader.exe is for Windows Store apps/games, to allow us to hook them. It works, but the Win store is truly terrible and shouldn't be avoided. Testing a couple of games shows this works, but it's buggy and a bad experience. Not something we can fix- Windows is blocking the nvidia driver workarounds for multi-threaded code. Avoid.

We have no DX12 at present. Not impossible to make one, but so far low incentive because only a handful of games have required it. Too much work for too little payoff. That might change if next gen consoles are DX12 only.

Thank you for clearing this up!

I am going through your tutorial on learning HelixMod and while I am still struggling to wrap my head around it all have managed to make a script in Zombi where I can toggle an effect off and on like the bloom effect in The Ball.

However in some of the shaders when I open them in notepad they don't seem to have any constant so I ended up just removing everything in them and pasting in the "ps_3_0" to have the effect off. But is it possible to just use ps_3_0 and still have a toggle for having the effect on or off?

Also is it possible to use Reshade while at the same time using HelixMod?

elektokat commented 4 years ago

For example this shader, it has no def c or numbers that I can replace what I see so I just end up using ps_3_0..

// // Generated by Microsoft (R) HLSL Shader Compiler 9.29.952.3111 // // Parameters: // // struct // { // float4 colorTransformAdd; // // } PS_ElemConst; //
// sampler2D samp_Texture; // // // Registers: // // Name Reg Size // ------------ ----- ---- // PS_ElemConst c0 1 // samp_Texture s0 1 //

ps_3_0
dcl_texcoord v0.xy
dcl_texcoord1_pp v1
dcl_2d s0
texld_pp r0, v0, s0
mul r1, r0.w, c0
mad_pp oC0, v1, r0, r1

// approximately 3 instruction slots used (1 texture, 2 arithmetic)

bo3b commented 4 years ago

However in some of the shaders when I open them in notepad they don't seem to have any constant so I ended up just removing everything in them and pasting in the "ps_3_0" to have the effect off. But is it possible to just use ps_3_0 and still have a toggle for having the effect on or off?

You can just use ps_3_0 only, but that is strictly for disabling the shader and effect. When you remove the code that generates the output, then no output is created, leaving the pixels blank. The output in this shader is oC0, which is the color of the final pixel.

In order to create a toggle, it will be more complicated than that, because you need some logic to handle the two cases of on and off. Best bet is to look at some examples of DX9 fixes that people have created, and see how that works. Or look at the Lesson 3, which shows how to do this. It doesn't matter if the shader does not already have any cXX sections, you can simply add the c220 used for key presses. Add it before the dcl_* declarations.

You'll need to experiment with this to get a feel for it. It can be a lot of trial and error, because things don't always work exactly like we expect.

Also is it possible to use Reshade while at the same time using HelixMod?

I'm not sure, but I think this is likely to work fine with HelixMod at the same time. You'll need to use an alternate loading technique though, because both will want to be d3d9.dll. Only do this after you have something working and understand the basics, because every piece of added software adds complexity and it can be hella hard to get it all working together.

elektokat commented 4 years ago

Hi again Bob!

Thank you! Just a curious short question, is 3D vision dead, or is it still being used today and have a fanbase still that makes tweaks etc? I have a pair somewhere and is thinking of digging them up, but unsure if the drivers will even work with my new 2080 ti card since Nvidia dropped support for the goggles and drivers if I understand correctly?

Best /Daniel

On Sun, Jan 26, 2020 at 10:46 AM Bo3b Johnson notifications@github.com wrote:

However in some of the shaders when I open them in notepad they don't seem to have any constant so I ended up just removing everything in them and pasting in the "ps_3_0" to have the effect off. But is it possible to just use ps_3_0 and still have a toggle for having the effect on or off?

You can just use ps_3_0 only, but that is strictly for disabling the shader and effect. When you remove the code that generates the output, then no output is created, leaving the pixels blank. The output in this shader is oC0, which is the color of the final pixel.

In order to create a toggle, it will be more complicated than that, because you need some logic to handle the two cases of on and off. Best bet is to look at some examples of DX9 fixes that people have created, and see how that works. Or look at the Lesson 3, which shows how to do this. It doesn't matter if the shader does not already have any cXX sections, you can simply add the c220 used for key presses. Add it before the dcl_* declarations.

You'll need to experiment with this to get a feel for it. It can be a lot of trial and error, because things don't always work exactly like we expect.

Also is it possible to use Reshade while at the same time using HelixMod?

I'm not sure, but I think this is likely to work fine with HelixMod at the same time. You'll need to use an alternate loading technique though, because both will want to be d3d9.dll.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bo3b/3Dmigoto/issues/121?email_source=notifications&email_token=AG7SRTH2HKMQSMP73IQ5X6LQ7VLWHA5CNFSM4KKMJGGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ5P6DI#issuecomment-578486029, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG7SRTDXI3PQNOL6LQRUFD3Q7VLWHANCNFSM4KKMJGGA .

elektokat commented 4 years ago

Also is there any such good tutorial you had for HelixMod, but for 3Dmigoto?

bo3b commented 4 years ago

3D Vision is on life support, but not quite dead. In theory it is still supported by NVidia until March 2020, but in practice their 'support' means nothing. They have done nothing to support 3D Vision in the last five years anyway.

But, the big change as of 03/2019 was that they stopped shipping the 3D Vision Driver with the regular driver updates. Again with the let's pretend it's supported. Effectively canceled as of last year. Last driver with 3D Vision was 425.31.

Your 2080ti is the very last card made that supports that driver and thus you can still use 3D Vision indefinitely as long as you don't switch drivers. There are some hacks that our group have worked out to make 3D work on later drivers, but anything past about 430 is getting sketchy, requiring binary edit of the driver. If you don't care about newer drivers though, 425.31 is working fine even on Win 10 1909.

Also is there any such good tutorial you had for HelixMod, but for 3Dmigoto?

Not so far. I've been wanting to make one, and a couple of other people have looked at it, but it's pretty hard to put together stuff like that. Time consuming. Lots of help can be found in the nvidia forums, although they it's been wrecked now and will be tedious. You can find some good blog posts on HelixModBlog that have links that have all been destroyed by NVidia, but can give you some good background.

You can also ask questions on mtbs3d.com where we moved after NVidia killed the forums, and also on the Discord channel for HelixMod.

elektokat commented 4 years ago

Thank you! The HelixMod tutorial was great and you are an excellent tutor. I am still learning about modyfing shaders, and my main target with learning is not in fact 3D vision but to be able to modify the HUD as I can't stand the cluttered HUD in most games and think it ruins the look and immersion of games. Best case scenario is to be able to toggle on the elements I want to see, when I want to see them. I have noticed though that in the few games I have looked at it seems when I toggle between shaders to find the HUD elements it is often the case that several HUD elements is on one shader (if that is the right term). For example I am trying to figure out how to toggle the HUD in Dead Rising 3 right now, but one of the shaders I have found that targets several HUD elements at once also taragets the text, I assume it is not possible to just disable or affect some elements in a shader and not others? For example just one of the HUD elements in the shader, but not the other and the text. It is an all or nothing deal?

Just so I understand though about support for 3D vision, cards after 2080ti will not work with 3D vision so if I upgrade to a new card in the future I can' play 3D vision anymore? Would have to keep this card in that case as a backup.. that sucks since that means that card will be to weak to play new games in the future in 3D vision if I want to :/

On Thu, Jan 30, 2020 at 6:53 AM Bo3b Johnson notifications@github.com wrote:

3D Vision is on life support, but not quite dead. In theory it is still supported by NVidia until March 2020, but in practice their 'support' means nothing. They have done nothing to support 3D Vision in the last five years anyway.

But, the big change as of 03/2019 was that they stopped shipping the 3D Vision Driver with the regular driver updates. Again with the let's pretend it's supported. Effectively canceled as of last year. Last driver with 3D Vision was 425.31.

Your 2080ti is the very last card made that supports that driver and thus you can still use 3D Vision indefinitely as long as you don't switch drivers. There are some hacks that our group have worked out to make 3D work on later drivers, but anything past about 430 is getting sketchy, requiring binary edit of the driver. If you don't care about newer drivers though, 425.31 is working fine even on Win 10 1909.

Also is there any such good tutorial you had for HelixMod, but for 3Dmigoto?

Not so far. I've been wanting to make one, and a couple of other people have looked at it, but it's pretty hard to put together stuff like that. Time consuming. Lots of help can be found in the nvidia forums, although they it's been wrecked now and will be tedious. You can find some good blog posts on HelixModBlog that have links that have all been destroyed by NVidia, but can give you some good background.

You can also ask questions on mtbs3d.com where we moved after NVidia killed the forums, and also on the Discord channel for HelixMod.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bo3b/3Dmigoto/issues/121?email_source=notifications&email_token=AG7SRTGMML4P34F5WCY7KH3RAJTL3A5CNFSM4KKMJGGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKJYXTI#issuecomment-580094925, or unsubscribe https://github.com/notifications/unsubscribe-auth/AG7SRTBZDBU7XSI64S534GLRAJTL3ANCNFSM4KKMJGGA .

bo3b commented 4 years ago

Yes, the shaders can often be multi purposed in a game. Sometimes they even affect items in the game itself, where the HUD is shared with in-game objects. There are ways to separate out these parts in the shader, but it gets fairly complicated.

The simplest way we use is to use an active box to show/notshow a given shader. So for example, set up a rect that surrounds the piece you want to kill, and anything outside of it is allowed to draw. There is also texture filtering, where the shader looks for specific textures to draw/notdraw.

This is beyond the scope of what I can offer in a few comments. If you want to do this sort of thing, best bet will be to experiment with a running example, and see how it all works. There are hundreds of examples, and if you dig enough you can find info on texture filtering in both HelixMod and 3Dmigoto. IIRC some people used 3Dmigoto to modify the HUD in WatchDogs. You can also ask deeper and more specific questions on the forums and Discord.

It's definitely possible to do this sort of filtering, but be aware that it's non-trivial to get it all working. If you like a good puzzle, you will enjoy figuring it out.

Just so I understand though about support for 3D vision, cards after 2080ti will not work with 3D vision so if I upgrade to a new card in the future I can' play 3D vision anymore?

We pretty much have to assume that next gen cards aren't going to work, but the reality is no one knows. The architecture will not be any different, so it's not impossible that we can hack something together to keep it working.

elektokat commented 4 years ago

Thank you! Btw, maybe a little unrelated to all this, but you seem very tech knowledgeable so I want to take the opportunity to ask something I have wanting to do a long time but never found a solution to and if you know.

I normally game on a screen with a recommended resolution of 3840x2160. I can also set the resolution up to 4096x2160 but then the screen looks a little stretched vertically. Now the problem is that I use Nvidias control panel to set up DSR factor resolutions to be able to game in higher resolutions. The problem is though that all these higher resolutions I get makes the screen look stretched in the same way as 4096x2160 so I don't know if they are "based" on that resolution and not 3840x2160 format. I wonder if you know any way to "tweak" these DSR factor resolutions to get the same format as I have for 3840x2160 where the image does not look stretched?

I found some video that showed that one could do it by editing values in the registry: https://www.youtube.com/watch?v=Xi6XwMVyiPo

However in the comments people say that this no longer work: "It seems NVidia changed how the registry options work, and this method (replacing the values) doesn't work anymore. Do you maybe know how to get around this?"

bo3b commented 4 years ago

I'm not sure about the use of higher resolutions. 3Dmigoto has an upscaling feature that might be helpful here, but I've not used it and don't know how well it works. I'm fairly sure that DSR requires the same aspect ratio, as the starting size, but have also not spent much time with it.

However, you can possibly make your own resolutions that work. If you go into Change Resolution in the control panel, you can Customize, and add a custom resolution. The trick is to set the Timing to Manual, and leave it at whatever your test resolution starts at. You can then set the Horiz/Vert pixels to what you want, and the video card will stretch or fit to that using the timings from the starting resolution.

I do this on projector for example, by making a 1600x900 resolution for a 720p projector. The game sees it as 1600x900, and the video card downsamples to the native 720p, but it looks better. Similar to DSR, maybe more flexible.

elektokat commented 4 years ago

I'm not sure about the use of higher resolutions. 3Dmigoto has an upscaling feature that might be helpful here, but I've not used it and don't know how well it works. I'm fairly sure that DSR requires the same aspect ratio, as the starting size, but have also not spent much time with it.

However, you can possibly make your own resolutions that work. If you go into Change Resolution in the control panel, you can Customize, and add a custom resolution. The trick is to set the Timing to Manual, and leave it at whatever your test resolution starts at. You can then set the Horiz/Vert pixels to what you want, and the video card will stretch or fit to that using the timings from the starting resolution.

I do this on projector for example, by making a 1600x900 resolution for a 720p projector. The game sees it as 1600x900, and the video card downsamples to the native 720p, but it looks better. Similar to DSR, maybe more flexible.

Thank you!

Another newbie question also about 3Dmigoto; is it possible to just disable a shader like in HelixMod by just deleting everything and pasting in something like ps_3_0 in shader file?

I tried ps_3_0, ps_4_0 , ps_5_0, but none of these worked for me in 3Dmigoto

bo3b commented 4 years ago

It's actually much easier with anything that is px_4_0 or above. You can use the 'discard' instruction, and it will skip the shader. If you add it at the top, it will not draw anything.

It's OK to delete all the content, but that's not actually the best way to handle these. The best way is to return a zero result for the shader. Deleting the content relies upon vague and unclear defaults for the shaders.

In 3Dmigoto, it's quite a lot easier than that, you can just specify the shader hash in the d3dx.ini with the 'skip' parameter to have it not be drawn.

This is not a very good spot to ask this sort of question. You would be better served by using the mtbs3d.com forums where more people can help, or the Discord channel.

elektokat commented 4 years ago

It's actually much easier with anything that is px_4_0 or above. You can use the 'discard' instruction, and it will skip the shader. If you add it at the top, it will not draw anything.

It's OK to delete all the content, but that's not actually the best way to handle these. The best way is to return a zero result for the shader. Deleting the content relies upon vague and unclear defaults for the shaders.

In 3Dmigoto, it's quite a lot easier than that, you can just specify the shader hash in the d3dx.ini with the 'skip' parameter to have it not be drawn.

This is not a very good spot to ask this sort of question. You would be better served by using the mtbs3d.com forums where more people can help, or the Discord channel.

Thank you! What is the 3Dmigoto Discord address?

bo3b commented 4 years ago

I'm not sure if copying the address works or not, so best to go to: http://helixmod.blogspot.com/

And in the middle navbar there is a link for the Discord and also for the mtbs3d.com forums.