Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Level Editor Help Black&White screen effect possible?
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#21
RE: Black&White screen effect possible?

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:

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

Discord: Romulator#0001
[Image: 3f6f01a904.png]
04-11-2013, 12:54 PM
Find
TheGreatCthulhu Offline
Member

Posts: 213
Threads: 10
Joined: Oct 2010
Reputation: 32
#22
RE: Black&White screen effect possible?

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.
(This post was last modified: 04-11-2013, 05:24 PM by TheGreatCthulhu.)
04-11-2013, 05:19 PM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#23
RE: Black&White screen effect possible?

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:
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

Discord: Romulator#0001
[Image: 3f6f01a904.png]
(This post was last modified: 04-12-2013, 01:20 AM by Romulator.)
04-12-2013, 12:12 AM
Find
TheGreatCthulhu Offline
Member

Posts: 213
Threads: 10
Joined: Oct 2010
Reputation: 32
#24
RE: Black&White screen effect possible?

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.
(This post was last modified: 04-12-2013, 01:26 AM by TheGreatCthulhu.)
04-12-2013, 01:25 AM
Find
Romulator Offline
Not Tech Support ;-)

Posts: 3,628
Threads: 63
Joined: Jan 2013
Reputation: 195
#25
RE: Black&White screen effect possible?

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

Discord: Romulator#0001
[Image: 3f6f01a904.png]
04-12-2013, 01:38 AM
Find
Statyk Offline
Schrödinger's Mod

Posts: 4,390
Threads: 72
Joined: Sep 2011
Reputation: 241
#26
RE: Black&White screen effect possible?

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.
(This post was last modified: 04-12-2013, 04:31 PM by Statyk.)
04-12-2013, 04:31 PM
Find
VeNoMzTeamHysterical Offline
Member

Posts: 240
Threads: 36
Joined: Dec 2012
Reputation: 3
#27
RE: Black&White screen effect possible?

(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.
.

http://www.frictionalgames.com/forum/thread-21719.html
Evil Awaking Work In Progress!
Hours Spend 472.
(This post was last modified: 04-14-2013, 10:34 AM by VeNoMzTeamHysterical.)
04-14-2013, 10:32 AM
Website Find
TheGreatCthulhu Offline
Member

Posts: 213
Threads: 10
Joined: Oct 2010
Reputation: 32
#28
RE: Black&White screen effect possible?

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.
04-15-2013, 04:39 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#29
RE: Black&White screen effect possible?

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!
09-13-2014, 04:03 PM
Find
DnALANGE Offline
Banned

Posts: 1,549
Threads: 73
Joined: Jan 2012
#30
RE: Black&White screen effect possible?

(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!
09-15-2014, 05:39 PM
Find




Users browsing this thread: 6 Guest(s)