Scanline overlay w/rgb effect or aperture grill effect?

“Even some MAME “rgb” effects can be used with this system with minor modification”

I’d like to know if there’s an overlay that has scanlines and rgb effect? I haven’t seen anything in the common overlays.

I’m also curious if anyone has made an overlay that replicates a shadow mask/aperture grill effect?

I did some searching but couldn’t really find anything.

http://wiki.arcadeotaku.com/w/MAME_CRT_Simulation

Yeah, I only made one once as a PoC before mentioning it in that post, but I just did you a solid and modified the one you linked: Just make an overlay cfg as outlined in that post and point it at that image and you should be set.

All you need to do to “convert” one of those effects is bring it into GIMP and copy/paste it to tile it across the image size you want (I used 1280x960) and then use GIMP’s ‘color to alpha’ option (under the ‘color’ pulldown menu) to turn all of the white to transparency.

[QUOTE=hunterk;22110]Yeah, I only made one once as a PoC before mentioning it in that post, but I just did you a solid and modified the one you linked: Just make an overlay cfg as outlined in that post and point it at that image and you should be set.

All you need to do to “convert” one of those effects is bring it into GIMP and copy/paste it to tile it across the image size you want (I used 1280x960) and then use GIMP’s ‘color to alpha’ option (under the ‘color’ pulldown menu) to turn all of the white to transparency.[/QUOTE]

Sweet, thanks!!

Just played around with it @960x720 and it looks awesome. The regular scanline overlay darkens the image a bit too much IMO, but this fixes that. You might consider including this overlay in future releases. It probably would have taken me an entire day to figure out how to do the conversion, so thanks again :slight_smile:

Glad it worked for you :slight_smile:

I pushed it up to the repo, so it should start appearing in the nightlies soon.

[QUOTE=hunterk;22114]Glad it worked for you :slight_smile:

I pushed it up to the repo, so it should start appearing in the nightlies soon.[/QUOTE]

…aaaaand I realized I needed 1280x960 resolution for this to work right, although it looks ok at 960x720. How would one go about making a 3x version? Remove one row/column of pixels?

I also found this:

http://forum.arcadecontrols.com/index.php?action=dlattach;topic=112458.0;attach=168185

Would this one work at 3x scale?

Yeah, you would have to remove a pixel from each row. You could try dropping the overlay scale, but that would probably look bad. This second one is indeed designed for 3x scale, and here’s the conversion: I’m having trouble getting it to line up exactly with pixels, but YMMV.

[QUOTE=hunterk;22116]Yeah, you would have to remove a pixel from each row. You could try dropping the overlay scale, but that would probably look bad. This second one is indeed designed for 3x scale, and here’s the conversion: I’m having trouble getting it to line up exactly with pixels, but YMMV.[/QUOTE]

Yeah, that one’s interesting, but a little off IMO.

I’m still having problems with the conversion - I’m trying to edit the scanline overlay in the wii effects so that it isn’t as dark. I removed every pixel between the scanlines by selecting them with the fuzzy select tool and deleting them , went to colors -> color to alpha -> white only. The result is a transparent white instead of full transparency. I’m just trying to get rid of all the grey pixels inbetween the scanlines.

I can’t for the life of me figure out this transparency thing. I add a layer, select “transparent,” then select all white areas and hit “clear.” I should be left with nothing but black lines and a transparent background, but I just get transparent white.

Is there a way to edit this overlay so that the scanlines can be adjusted down to full black, while leaving the brightness of the other lines unaffected? Basically, something that would function as a fully adjustable scanline generator.

I believe the problem with the wii ones is that they’re designed for 480p and then get scaled up bilinearly, which makes the gray between lines as they get blurred to size (i.e., it’s averaging the black and coming up with gray). If you set your game to 2x, they line up perfectly. Basically, you can just think of the wii effects as all ending in ‘-2x’ because they’re all intended for that scale.

Unfortunately, you just have to make the overlays at the final scale you want, or else you get weird scaling issues. Plus, the overlay system only goes up to 2x scale, so even if you want to use scaling to customize, the overlay itself can never be less than half the final size.

[QUOTE=hunterk;22212]I believe the problem with the wii ones is that they’re designed for 480p and then get scaled up bilinearly, which makes the gray between lines as they get blurred to size (i.e., it’s averaging the black and coming up with gray). If you set your game to 2x, they line up perfectly. Basically, you can just think of the wii effects as all ending in ‘-2x’ because they’re all intended for that scale.

Unfortunately, you just have to make the overlays at the final scale you want, or else you get weird scaling issues. Plus, the overlay system only goes up to 2x scale, so even if you want to use scaling to customize, the overlay itself can never be less than half the final size.[/QUOTE]

When I open the wii scanlines.png and zoom in 800% I see the grey pixels in between the scanlines, so I assumed that they are part of the image. I think this is trying to emulate “soft” scanlines or maybe it’s trying to emulate a shadow mask. In theory this might be a good idea, but in practice it just darkens the image way too much on an LCD, even with the backlight at 100%.

If you compare this to the 4x CRT sim that you did the conversion for earlier, the CRT sim is a lot brighter because there are more white/light pixels inbetween the scanlines.

What I would like to see is a very simple scanline overlay that draws black horizontal lines across the image, with nothing between the scanlines, for maximum brightness, and with the scanlines adjustable to full black. I think this could be achieved by just removing all the grey pixels from the wii scanline overlay, but then I’m still not sure if it’s possible to get fully black scanlines via the overlay.

I’ve gotten to the point where I can edit the overlay but I still can’t figure out how to get transparency- everything I’ve tried results in transparent white rather than full transparency. I’ve literally never touched GIMP prior to this.

I’m not seeing anything but black lines and transparency here… I’m pretty certain it’s related to the scaling of the overlay, as the gray stuff comes and goes depending on the scale factor with some of the overlays I’ve been fiddling with.

Regardless, you don’t actually need GIMP for that part of it, just for the color-to-alpha part (which is like the one thing GIMP does that Photoshop can’t), and that’s only needed for the MAME RGB effects. If you’re more comfortable in Photoshop, that should be fine for anything other than converting those effects.

I have a couple more you can try. This one doesn’t seem to show any gray and works well at any integer scale factor >2 (as far as I’ve tested; 2x just turns solid gray): http://i.imgur.com/uICcquEm.png <-EDIT: LOL I just realized how hard it is to download those images. Here they are in a zip instead: https://www.mediafire.com/?8he777fw9atjcub and here’s what it looks like at 9x:

You’ll notice that it does the fade-out from the black lines, so if you don’t want that, you can try this one, which looks good at any integer scale <6x and is solid black lines: It actually only blanks out 4/9 (i.e., just under half) of the lines, as I wanted to center the black lines on the pixel borders instead of putting the black lines fully inside the pixel.

You’ll also notice those 2 overlay images are just 1 px wide, as the overlay system will stretch that out to cover the whole horizontal resolution as long as you change the cfg to say ‘overlay0_full_screen = false’ instead of true:

overlays = 1

overlay0_overlay = scanlines.png

overlay0_full_screen = false

overlay0_descs = 0

This can make it a little easier to make scanline effects but obviously doesn’t work for things like phosphor/RGB masks because it’s a stretch rather than a tile effect.

[QUOTE=hunterk;22227]I’m not seeing anything but black lines and transparency here… I’m pretty certain it’s related to the scaling of the overlay, as the gray stuff comes and goes depending on the scale factor with some of the overlays I’ve been fiddling with.

Regardless, you don’t actually need GIMP for that part of it, just for the color-to-alpha part (which is like the one thing GIMP does that Photoshop can’t), and that’s only needed for the MAME RGB effects. If you’re more comfortable in Photoshop, that should be fine for anything other than converting those effects.

I have a couple more you can try. This one doesn’t seem to show any gray and works well at any integer scale factor >2 (as far as I’ve tested; 2x just turns solid gray): http://i.imgur.com/uICcquEm.png <-EDIT: LOL I just realized how hard it is to download those images. Here they are in a zip instead: https://www.mediafire.com/?8he777fw9atjcub and here’s what it looks like at 9x:

You’ll notice that it does the fade-out from the black lines, so if you don’t want that, you can try this one, which looks good at any integer scale <6x and is solid black lines: It actually only blanks out 4/9 (i.e., just under half) of the lines, as I wanted to center the black lines on the pixel borders instead of putting the black lines fully inside the pixel.

You’ll also notice those 2 overlay images are just 1 px wide, as the overlay system will stretch that out to cover the whole horizontal resolution as long as you change the cfg to say ‘overlay0_full_screen = false’ instead of true:

overlays = 1

overlay0_overlay = scanlines.png

overlay0_full_screen = false

overlay0_descs = 0

This can make it a little easier to make scanline effects but obviously doesn’t work for things like phosphor/RGB masks because it’s a stretch rather than a tile effect.[/QUOTE]

Those look good, but I think I’m missing a step. I put the png files in the scanline folder, created a .cfg file for each, made sure they pointed to the right file, and set “overlay0_full_screen = false” on both. When I apply the overlay, all that happens is that the screen gets a lot darker.

Weird. You can try my cfgs, in case they differ from yours somehow, and I included images that were stretched out instead of 1px wide, in case that’s causing problems on your end:

[QUOTE=hunterk;22257]Weird. You can try my cfgs, in case they differ from yours somehow, and I included images that were stretched out instead of 1px wide, in case that’s causing problems on your end:

again, all that seems to happen is that the screen gets a lot darker. Could this be a resolution/video setting problem? I have my video output res at native (1080p) and RA render res at “use output” or “config” depending on the emulator. Integer scale is ON and crop overscan is OFF for all systems.

It looks like the entire overlay is getting averaged to a solid grey.

this is on the Raspberry Pi 2 with the latest stable builds. Any ideas…?

In video settings, on your ‘use bilinear filtering’ option, does it say ‘point filtering’? If not, switch it to that and then go into the shader options and hit ‘apply shader’.

tried that, no luck :frowning:

This has got me really scratching my head, here… I just can’t imagine what would be interfering with just these two shaders. All the others work. Is there something unique that needs to be done for the Rasp. Pi?

Ok. Not sure what else to tell you, then. I just tried them on another machine (linux 64-bit) and they worked fine there, too.

Yeah, this is really weird because those others you converted work fine. I can only guess that it’s related to either the resolution (2160x2160) or hardware issue with the raspberry pi. I’m going to see if anyone from the retropie forums can get these to work.

Okay, I played with this some more and I’m pretty sure it is a scaling issue relating to something the raspberry pi is doing. I think the overlay needs to match either the screen resolution or the retroarch render resolution to completely avoid scaling artifacts and line up right, although I’m still not clear which one it is.

For example, if my monitor is 1080p but my Retroarch resolution is 1280x960, should I make the overlay 1280x960 or 1920x1080? I’ve tried both, but neither works right.

Or is there a more complicated formula for figuring out the right size (probably)?

Yeah, you should just make retroarch run at your monitor’s resolution. 720p is usually okay on TVs but usually looks like garbage on PC monitors.

What’s happening is that it’s just scaling your 1280x960 up to 1080p anyway.