Dreamfall Chapters

Dreamfall Chapters

Ver estatísticas:
nVidia 3D Vision Support (Fix released!)
I've just released a Helix Mod fix for the stereoscopic rendering issues this game has with nVidia 3D Vision. Check out the blog post for 3D screenshots and to download the fix:

http://helixmod.blogspot.com.au/2014/11/dreamfall-chapters.html


This one was quite tricky due to the variable FOV messing with the shadows, but I managed to find a solution and now this game looks absolutely fantastic in 3D!
< >
Exibindo comentários 115 de 23
stepsbarto 15/nov./2014 às 6:17 
... thanks a lot to you and the others who helped you ... :-) !!
v00d00m4n 15/nov./2014 às 6:58 
I was going to use helix dll to trace and disable ugly post processing effects , we have real problem with them that forced me to start this thread
http://steamcommunity.com/app/237850/discussions/0/617319460809356048/?tscn=1416011289

But i have not found any d3d9 imports in game and found OpenGL so suspected its OpenGL i have not tried to use helix.

So, this game is actually d3d9 after all?

Also with another game - Monochroma, which uses unity as well, i encounter strange behavior when after every launch shaders actually has different order and crc than during previous launch (at same level, with same settings) and my overrides was not working, Dreamfall does not have this problem, isn it?

Man, can you explain me some things about helix dll? At the moment im simply dumping shader in another games and editing asm to tweak them, but i see other people use some keyboard button toggle some effects and stuff. I would like to do that with effects in Dreamfall and other games, bind some buttons to toggle effects or values from shaders that defines how stong this effects is and other things (just for example) - so how can i do that?
I have not found any detailed readme about all the advanced helix features.



Have you disabled lense flares, and other ugly overlay effects for 3d vision fix? And if you dont, since you already familiar with unity and dreamfall shader modification, can you help me to solve possible unity problems please?
Última edição por v00d00m4n; 15/nov./2014 às 7:10
DarkStarSword 15/nov./2014 às 8:06 
Great to hear you're interested in learning shaderhacking :)

bo3b recently started a school to teach fixing games with Helix mod, which I've found invaluable so far - I'd highly recommend checking out the lessons on his wiki and then heading over to the forums with any questions:

http://wiki.bo3b.net

https://forums.geforce.com/default/topic/766890/3d-vision/bo3bs-school-for-shaderhackers

Escrito originalmente por Voodooman:
I was going to use helix dll to trace and disable ugly post processing effects , we have real problem with them that forced me to start this thread
http://steamcommunity.com/app/237850/discussions/0/617319460809356048/?tscn=1416011289

...

Have you disabled lense flares, and other ugly overlay effects for 3d vision fix?

I haven't disabled any of the post processing effects in the fix, but you should have no trouble using Helix mod to disable them. I can probably release an updated fix with a button to toggle them on and off when I get a bit more time to work on it.

But i have not found any d3d9 imports in game and found OpenGL so suspected its OpenGL i have not tried to use helix.

So, this game is actually d3d9 after all?

Bo3b also noticed the OpenGL dependency, and we're not really sure why it's there. The game is definitely D3D9, so our best guess is that it's something to do with the way Unity works internally. One thing to be aware of with Unity games is that they have all started using borderless windowed mode (seems the default changed in Unity recently), which can prevent 3D vision from engaging. The ini in this fix selects a profile that allows windowed 3D to get around this.

Also with another game - Monochroma, which uses unity as well, i encounter strange behavior when after every launch shaders actually has different number and crc and my overrides was no working, Dreamfall does not have this problem, is not it?

I've heard of a few games with shaders that change CRC numbers. I haven't had to deal with that myself yet, but as I understand it there are two ways to handle it - first, try setting UseAlternateCRC=true in the DX9Settings.ini, which (I think) will stop the metadata from being used in the CRC calculation and might give you a more consistent result.

If that doesn't work, the other option is to write a LUA script that can do it's own matching and return the fixed shader. This is a bit harder since it involves programming, and I'm only aware of one LUA script that already does something like this (IIRC it's in some of the fixes for Unreal games), so hopefully you can get away with UseAlternateCRC. If you need more help with this (or any other advanced Helix Mod questions), the right place to ask is this thread:

https://forums.geforce.com/default/topic/513190/3d-vision/how-to-fix-disable-shaders-in-games-dll-guide-and-fixes-

Man, can you explain me some things about helix dll? At the moment im simply dumping shader in another games and editing asm to tweak them, but i see other people use some keyboard button toggle some effects and stuff. I would like to do that with effects in Dreamfall and other games, bind some buttons to toggle effects or values from shaders that defines how stong this effects is and other things (just for example) - so how can i do that?
I have not found any detailed readme about all the advanced helix features.

Yeah, the lack of documentation was a real sticking point for me learning Helix mod as well. bo3b's school has finally addressed that (and also I may have done a wee bit of reverse engineering on the DLL itself). As well as the school, we've been trying to document all the feature's here:

http://wiki.bo3b.net/index.php?title=HelixMod_Feature_List

Using the keyboard button to toggle effects is covered in lesson 3 of bo3b's school:

http://wiki.bo3b.net/index.php?title=Lesson_3_-_Const

If you take a look inside the DX9Settings.ini file in my Dreamfall fix, you can see I've got the whole number row set up to adjust one value that is used in the shaders to adjust the HUD depth, as well as U set up to cycle the light shafts between partial fix, no fix and disabled, and a couple of other buttons I use whenever I want to do a quick before and after comparison.
Última edição por DarkStarSword; 15/nov./2014 às 8:07
v00d00m4n 15/nov./2014 às 13:00 
Wow thatnks for this, gonna read. I was not aware Helix can do so many things.

As for OpenGL.dll imports i figured that out.

Since unity support OGL D39-D311 via single executable and without keeping 3 separated renderers in different dlls, to initialise successfully it uses OpenGL as its present in every OS, not like D39 which may be missing in default Win 7 installation and lead games to crash, and not like D3D10+ which is missing on XP and causing same thing.

So they use OpenGL as bulletproof api to avoid crashes due of lack of api on start. After this Unity switching to internally configured API which is called on demand, not during load time, so thats why D3D dll imports are missing.

Also i forgot that Unity allows to switch between any of API in any game by using command line arguments
-force-opengl
-force-d3d9
-force-d3d11

i played with it in monocrhoma.

Depending on how game was coded it may miss some shaders for some api it was not prepared for, but core renderer is actually working same in all 3 of them, usually default shaders works like sharm and custom shaders usually exist for one api, coz devs are lazy to them for all 3 of them.

I have not tried yet but im 100% sure we can launch Dreamfall chapters in OpenGL and D3D10+ modes, but results will probably be ugly.


A little bit of offtopic:
As i notticed everyone just use helix mod to fix 3d vision.
I starting to feel as lonely inventor because im using it to fix some broken or ugly shaders such as ugly postprocessing (fixed Dead Rising 2 ugly color grading, Deadly Premonition color grading and few more games) and also im using it to disable HUD elements, like all that annoying popups, minimaps, XP counters, pointers that tells you where to go and forced black bars in cut-scenes.

What i really want to master is how to separate one hud element from other if they are rendered with same vertex and pixel shader, and another thing i would really love to do is bind toggle to gamepad to avoid side effects like when i disable huds in gameplay it also disables menues, and i just wish to enable menues for a while after im pressing menu button an disable it again after i quit menu.

Can this be done with helix you think? Does its LUA engine allows to do dll calls from lua script, to poll xinput1_3.dll and get button presses? And how exaclty i can add lua scripts to helix? Im familiar with lua, but im not familiar with helix way of using lua.

Also is there any way to catch variable parameter passed to shader and change it in helix?

In Unreal Engine 3 games i was trying to fix a lot of shaders are chained and called with externally controlled parameters (parameter can be set in very different shader), when i dump shaders i dont know their values, i think i may redefine them in body of shader to override passed values, but its would be blind guess work because i dont know exact correct values it uses by default.
In such cases if i disable one shader, i break entire chain of shader that follows and gettin black or white or totally screwed output.

How do you solve this problem in helix?
Última edição por v00d00m4n; 15/nov./2014 às 13:29
v00d00m4n 15/nov./2014 às 16:52 
Ok i found and dumped shaders, this time Unity has constant crc.

With debug dll it works only at dumping stage, but when i put shaders with simple ps_2 to disable them in override folder, both debug and release dlls does not hook them, i ves seen few games before that behaved like this but i dont have any solution for this.

Can you give me some tip of what am i doing wrong?

Settings are same, crc are same, here my ini settings:

[General] UseRenderedShaders=true DumpAll=true bCalcTexCRCatStart = true InitMouse = false OverrideMethod = 2

And here list of annoying post effects i collected, without them games is much better.

36E4982D - Lense flares completely disabled 40b36338 - distance blue fog 3843ABCF - part of lense dirt disabled - lense flare bloom, makes regular bloom low res ON hot dog spot UMBRELLA, and DIRT STILL REMAINS only on this are 65AE2ABA - color grading fully disablable ot tweakable C8B774D1 - FXAA, textures sharpnes is better when this off 542A6884 - VIGNETTE BLUR, disables both and makes even center of screen less dimmed 0CC65BF0 - FXAA 2, textures sharpnes is better when this off but aliasing is very ugly BEA66683 - DOF FULLY DISABLED CD9D4BC9 - MAKES DISTANT DOF NOT SO BLURY B96BECD1 - MAKES DISTANT DOF EVEN LESS BLURY - GOOD TO KEEP SOME DOF AND NOT BLUR EVERYTHING AS ♥♥♥♥ 6BB12713 - lENSE DIRT TRANSPARENCY? WHEN DISABLED COVERS ENTIRE SCREEN BY LENSE DIRT, NEEDS TO BE FINE TUNED. Temoval of texld r0, t0, s0 should borbaly do the trick

Maybe you can make that work?
Última edição por v00d00m4n; 15/nov./2014 às 16:59
v00d00m4n 15/nov./2014 às 17:32 
It seems that helix ignores ps_2_0 shaders, once i change them to 3_0 it started to work but have weird effect when i have untexture world with normal maps applied (look like plastic uncoloured grey figures, lol).
I suppose i should use all dumped shaders and change 3_0 instead of 2, now that would be pain in ass.
Última edição por v00d00m4n; 19/nov./2014 às 14:09
DarkStarSword 15/nov./2014 às 19:30 
Escrito originalmente por Voodooman:
So they use OpenGL as bulletproof api to avoid crashes due of lack of api on start. After this Unity switching to internally configured API which is called on demand, not during load time, so thats why D3D dll imports are missing.

Also i forgot that Unity allows to switch between any of API in any game by using command line arguments
-force-opengl
-force-d3d9
-force-d3d11

That is really interesting information - thanks!

What i really want to master is how to separate one hud element from other if they are rendered with same vertex and pixel shader, and another thing i would really love to do is bind toggle to gamepad to avoid side effects like when i disable huds in gameplay it also disables menues, and i just wish to enable menues for a while after im pressing menu button an disable it again after i quit menu.

The way we usually handle this is to match the texture CRC being rendered. To find the texture CRC, set bCalcTexCRCatStart=true in the ini and you can cycle textures with Up/Down (you can also change PrexTexKey and NextTexKey if you need to use different keys), which will black out the textures in much the same way as shader hunting.

Then you define a section for whichever shader you are disabling similar to the following example from Dreamfall Chapters:

// Blacklist UI depth adjustment for certain effects. // // 0DA4BD7E, 7450232C: // Disable UI depth adjustment for inventory background. Alternatively I can // adjust the shaders for the objects in the inventory, but I'm concerned that // there might be a lot of them, and potentially missable ones. The inventory // is already pushed a short distance into the scene anyway. // // 9ED6D1D3: // Full-screen white texture used to fade in and out of cinematics. I'd love to // do the same to the all black texture when e.g. pausing the game, but it's // hard to track it down since it looks exactly the same when disabled [VS9F7BB09C] CheckTexCRC = true ValNotDefined = 0 ValForDefined = 1 TexCounterReg = 251 UseDefinedOnly = false DefinedTexturesVS = 0DA4BD7E;7450232C;9ED6D1D3;

Then inside the shader you can check the X component of the constant defined by TexCounterReg for ValForDefined or ValNotDefined and do different actions, e.g.:
// Somewhere in the shader declarations: def c220, 0, 1, 0.0625, 0.5 ... // Only one constant register can be used per instruction, so to compare two constant // registers we need to copy one into a temporary register first: mov r30.x, c251.x if_eq r30.x, c220.y // instructions to execute if the texture is in the list else // instructions to execute if the texture is not in the list endif

Can this be done with helix you think? Does its LUA engine allows to do dll calls from lua script, to poll xinput1_3.dll and get button presses? And how exaclty i can add lua scripts to helix? Im familiar with lua, but im not familiar with helix way of using lua.

I'm not sure how much is possible with the LUA engine - so far I've only seen it used to process shaders, but I haven't played with it myself yet. VScript.lua is called from CreateVertexShader() and PScript.lua is called from CreatePixelShader(), but I don't know if they stay resident or can do anything besides processing the shader assembly.

Also is there any way to catch variable parameter passed to shader and change it in helix?

Yeah, you can get a constant from one shader and pass it into another. Use GetConstNFromReg in the shader you want to get it from and SetConstNToReg in the shader you are passing it to, where N is a number from 1 to 3. You can also pass two whole matrices (or any four contiguous constant registers) around, which I had to do to fix the shadows in Dreamfall:

// Get MV and MVP matrices from the VS inputs [VS92E51A17] // get glstate_matrix_modelview0 from c0-c3 and invert it // We also place the inverted matrix back into c180 for use in this shader UseMatrix = true GetMatrixFromReg = 0 InverseMatrix = true MatrixReg = 180 // get glstate_matrix_mvp from c4-c7 UseMatrix1 = true GetMatrixFromReg1 = 4 InverseMatrix1 = false // Copy MVP and inverted MV matrices into the PS: [PSFD2FC596] // c180-c183 has the inverted MV matrix: UseMatrix = true MatrixReg = 180 // c190-c193 has the MVP matrix: UseMatrix1 = true MatrixReg1 = 190

You can also do something similar with sampler registers if you need to access a texture from another shader.

Another trick is to use presets to set constant registers that can be accessed from any shader. These profiles can be activated by keypress, or whenever a particular texture is active, or whenever a particular shader is active - this is sometimes used to detect when the game is in a menu or cutscene.
DarkStarSword 15/nov./2014 às 19:36 
Escrito originalmente por Voodooman:
It seems that helix ignores ps_2_0 shaders, once i change them to 3_0 it started to work but have weird effect when i have unxtures world with normal maps applies (look like plastic uncoloured grey figures, lol).
I suppose i should use all dumped shaders and change 3_0 instead of 2, now that would be paint in ass.
Yes, that's correct - you need to convert everything to shader model 3 for Helix to re-inject it. We have some tools that can automate this:
http://helixmod.blogspot.com.au/2013/05/vs11vs20-vs30-converter.html
https://github.com/DarkStarSword/3d-fixes/blob/master/shadertool.py

I'd suggest trying a few methods to disable shaders - rather than replacing them with a blank body, try setting their outputs to 0 or 1 (or sometimes even different values in different components). This is covered in lesson 2:
http://wiki.bo3b.net/index.php?title=Lesson_2_-_disable_effect
Saftle 26/nov./2015 às 12:25 
Aww looks like I missed trying it out, since the game got updated. Eitherway, I'm excited to try it out whenever it gets updated. Thanks so much for your work DarkStarSword.
DarkStarSword 26/nov./2015 às 16:09 
Yeah, it will take a little while to update the fix since I have to start over thanks to the Unity 5 update. Rest assured that I will have this done by the time the next chapter is and quite likely a lot sooner.
Saftle 27/nov./2015 às 2:21 
Escrito originalmente por DarkStarSword:
Yeah, it will take a little while to update the fix since I have to start over thanks to the Unity 5 update. Rest assured that I will have this done by the time the next chapter is and quite likely a lot sooner.

Awesome! Thank you again for all of your work. I'll distract myself with other games in my backlog until then :D
DarkStarSword 9/dez./2015 às 20:08 
The fix on the blog has been updated to fix the Unity 5 and Book 4 updates - it also includes a brand new auto HUD depth adjustment and a new technique for improving Unity reflections in stereo 3D.
Saftle 10/dez./2015 às 10:24 
Escrito originalmente por DarkStarSword:
The fix on the blog has been updated to fix the Unity 5 and Book 4 updates - it also includes a brand new auto HUD depth adjustment and a new technique for improving Unity reflections in stereo 3D.

I was checking every day on the github page watching your progress! Thank you very much. Do you have a donation link by the way?
SimonSaysAdebisi 12/dez./2015 às 10:12 
Fix is working great, game looks awesome with 3DV. Thank you very much DarkStarSword.
DarkStarSword 15/dez./2015 às 3:46 
Escrito originalmente por Saftle:
I was checking every day on the github page watching your progress! Thank you very much. Do you have a donation link by the way?
I've been thinking about setting up something like that for a while now, but I've always been concerned that people might see it as a way to pay me to fix their favorite game, or might mistakenly think I'm the only shaderhacker since my name is mentioned on the blog a lot when there is in fact a whole community of us, or that donating entitles them to more support than I give to anyone else.

But anyway, your comment prompted me to finally set one up to see what happens. I set it up on Patreon, since I know modders in other communities have started using it and it seems like a reasonable fit for what I do:

https://www.patreon.com/DarkStarSword
Última edição por DarkStarSword; 15/dez./2015 às 3:47
< >
Exibindo comentários 115 de 23
Por página: 1530 50

Publicado em: 15/nov./2014 às 0:38
Mensagens: 23