Frictional Games Forum (read-only)
[LVL ED] Black&White screen effect possible? - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods - Development (https://www.frictionalgames.com/forum/forum-38.html)
+---- Forum: Development Support (https://www.frictionalgames.com/forum/forum-39.html)
+---- Thread: [LVL ED] Black&White screen effect possible? (/thread-19743.html)

Pages: 1 2 3 4 5 6


RE: Black&White screen effect possible? - Romulator - 04-11-2013

Hey mate, I wanted to do a FC CS in grayscale using one of your effects, and I cannot seem to get it working..

I have done all you said here:
(01-02-2013, 08:33 PM)TheGreatCthulhu Wrote: The archive modified_posteffect_color_conv_tex_frag.zip contains the modified shader program. Go to redist\core\shaders, and create a backup of posteffect_color_conv_tex_frag.glsl, then extract the corresponding file from the archive to the same folder, replacing the original.

Now go to redist\textures\effects, and backup the colorconv_sepia.tga file. Download modified_colorconv_sepia.zip, and extract the image file to replace the original one.

That's it.

The effects.zip archive contains colorconv tga-s I used to create the screenshots above. Create some separate folder and extract them. To use one as an effect, you must rename it to colorconv_sepia.tga, and make sure that your full conversion loads it before anything else (by specifying its path as the first entry in the FC's resources.cfg).

Then run the main game or a custom story and invoke the sepia effect (say by calling the FadeSepiaColorTo() script function), to see the new effect.

And still cannot get it to work smoothly. In my <mapname>.hps file, the player begins inside of a script block which calls the FadeSepiaColorTo() script like this:

Code:
FadeSepiaColorTo(1.0, 0.001f);

Am I missing something? If needed I can jump on something like TeamViewer or Skype to share screens so you can assist Smile


RE: Black&White screen effect possible? - TheGreatCthulhu - 04-11-2013

First, please take note of this; if your custom story uses these effects, than that means that, in order for it to be the same on a different computer, it must replace the two files which come with the original game on that computer (namely, the gradient image, and the shader program). Make sure you provide a way for the players to restore the game to it's normal state if something gets accidentally messed up!

Now, I've set it up so that when the game is started normally, nothing changes, but when the custom story is started, a different colorconv_sepia.tga file gets loaded (the one in your FC), so you get a different effect for the full conversion.

In order for this to happen, in its resources.cfg file, the FC should specify the path to its own colorconv_sepia.tga in a line that comes before the path to the original file (the one in redist\textures\effects - but you can't simply remove the old path, because, IIRC, there are other files there that need to be loaded for other purposes).
Did you do this? Could that be the problem?

Since this has really nothing to do with scripting, the problem most likely isn't in the script file? What happens when you call FadeSepiaColorTo()? Does it fade normally, or something else?

One way to test if this works at all is to temporarily copy the changed effect file from your FC to the redist\textures\effects (replacing the modified "standard sepia" colorconv_sepia.tga file), thus temporarily affecting the whole game (including the original), and then running the game and checking out the effect. If it is different than normal, then you've setup the shader correctly, which means that you need to focus on the resources.cfg (of the FC).

Now, between the Amnesia versions, there are some differences between how it handles resources, and resources.cfg files, so something could be causing a problem there as well; but I don't know the details, I would have to do some research first. I'll get back to you on that.

In the mean time, I think YourComputer wrote somewhere something about how resources are handled in different versions, with regard to CSs and FCs, so you could search the forums/wiki, or maybe ask him. And there's probably a log-page of changes made between the versions by frictional games, which could possibly list this.


RE: Black&White screen effect possible? - Romulator - 04-12-2013

May it actually be caused by the FC not loading the modified file in the core/shaders/ ?
I'll try the above and see if I can get back to that.

EDIT:
Code:
FadeSepiaColorTo(100.0f, 3.0f);
Had to make the numbers float, and I made the timer extend so it happens at the beginning during a fade out. I had originally used the gray1 effect, but its too bright, so I lowered to the gray effect (replacement) and it looks marvelous, but its stil not in GrayScale, which means it cannot get to the core/shaders/ file I believe :/

I've added it to my FC's resources as /myconversion/core/shaders/
I'll see what happens when I make it load with the effect in that folder.

EDIT2:
Nope, nothing Sad


RE: Black&White screen effect possible? - TheGreatCthulhu - 04-12-2013

The shader file (the program in core/shaders/) should replace the one that came with the game (because that's the only place the game will load it from), there shouldn't be a separate copy in the FC folder.

(04-12-2013, 12:12 AM)ROMul8r Wrote: so I lowered to the gray effect (replacement) and it looks marvelous, but its stil not in GrayScale

Does this mean it's different than normal, just not grayscale, or?
If it is different, maybe you could post a screenshot, it could help figure things out.

Also, if you played around with the files a lot, make sure there wasn't a mixup. The gray replacement gradient effect should have the whole right side completely white. This is especially important for the gray effects, because as the right side gets darker and darker, the shader should revert more and more to the old (original) implementation, where a uniform gray gradient does nothing (so for gray values on the right side, you'd get a mix of the normal image and the grayscale image).
If you by any chance use an image editor (like Photoshop) to maybe darken the gradient, make sure only the left side is changed - for reasons I just mentioned.


RE: Black&White screen effect possible? - Romulator - 04-12-2013

Actually, I have found the issue Smile I named the modified file as the backup.
Man do I feel silly :o
+rep for all your help, now I KNOW I can finish my FC Big Grin


RE: Black&White screen effect possible? - Statyk - 04-12-2013

Kickass work TheGreatCthulu. =] I always wanted to try something like that ages ago, but I'm not a programmer, so I didn't know how to do so. And it can work for Full Conversions on its own without ever touching the redist shaders, so long as the FC has similar folder/file paths and the FC's resources.cfg list that shader directory before the core ones. Whatever is higher up in a resources.cfg will be read FIRST before any similar directories under it. Not quite sure why there's all this talk of replacing things and making backups.


RE: Black&White screen effect possible? - VeNoMzTeamHysterical - 04-14-2013

(01-01-2013, 06:25 PM)TheGreatCthulhu Wrote: Did some tests with the gradient map as well (redist\textures\effects\colorconv_sepia.tga); because of the way the (original) shader was written, the gradient map can only be used for color tinting (and in a somewhat unpredictable way at that...), but not for saturation. Using a grayscale gradient acts similar to the "Levels" photoshop filter (brightness affected, color hues same).

[Image: 8333321007_d7343df69a_b.jpg]

Larger image here.
.


RE: Black&White screen effect possible? - TheGreatCthulhu - 04-15-2013

The problem is that the original shader that came with the game cannot be overriden in a FC, and that it cannot achieve things like grayscale (it can only tint things and adjust levels a bit) - this is why I wrote another one to replace it. The new one can do what the old one could, but it can also do grayscale, or a similar effect. Also, it can combine (blend) between the two. Now, it was important to be able to choose between one or the other, and the only way to do that is to encode that information into the effect image itself. Since the old image couldn't really account for that, it also had to be replaced. This is also what enables the main game to remain unchanged.


RE: Black&White screen effect possible? - DnALANGE - 09-13-2014

BUMP!*!*!
Anyone already have made this to work extually???
I try to make it work in a Isolation FC...
But it doesnt seem to load anything..
IS is it so, that it NEED to be in the core (redist)
OR is it possible to make it load from any FC so people do NOT have to overwrite the original ones.
I can not get it to work yet...
IF anyone wants to try...
Thanks guys!


RE: Black&White screen effect possible? - DnALANGE - 09-15-2014

(04-12-2013, 04:31 PM)Statyk Wrote: Kickass work TheGreatCthulu. =] I always wanted to try something like that ages ago, but I'm not a programmer, so I didn't know how to do so. And it can work for Full Conversions on its own without ever touching the redist shaders, so long as the FC has similar folder/file paths and the FC's resources.cfg list that shader directory before the core ones. Whatever is higher up in a resources.cfg will be read FIRST before any similar directories under it. Not quite sure why there's all this talk of replacing things and making backups.
Have you tries this Statyk or just i THINKING?...
Show us please.. or explane..
I really want to use this feature!