News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_alex76gr

Everything looks better in scanlines!

Started by alex76gr, 12:48, 31 May 14

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mr_lou

My problem with the last one is that the scanlines have different distances between each other.
While the average distance may be closer to the real thing, I just prefer the first one where it's the same distance.

I wonder if I need to create a poll. I obviously want to use the one that'll make most people happy.

Gryzor

I was going to say the same - the resizing made the effect uneven and it's pretty obvious, so I'd go with the previous result myself :)

robcfg

Yep, definitely the previous version is way better The uneven scanlines ruin the whole image.

||C|-|E||

My GF prefers the first one as well... I must be the only one that prefers the hi-res approach  :picard:

remax

I prefer the first one, even if colors are not perfect...
Brain Radioactivity

mr_lou

#105
Yea, nothing is perfect in this mission.

I think I'll end up using the first Wec Le Mans one, but I admit I'm still conflicted.

1080p would give me slightly better scanline-effect, but then I'd only have 25 fps available. I'd really like to keep 50fps, but that means I'm stuck with 720p

...unless I turn the whole thing into an Ultra HD Blu-ray project, in which case I can get 4k resolution with 50 fps. That would solve everything.
But then I'd have no recipients because no one has an Ultra HD Blu-ray player.  :)

Choices choices choices.

I'll have to stick with the 720p 50fps option I think....

Apollo

Wouldn't be 1080i50 be an option? You can still provide the 1080p50 AVC for download if you master with that and in the last step for the BD make a 1080i50 encoding.
CPC - My beloved first computer!

Apollo

Quote from: mr_lou on 08:02, 05 February 16
Here is the same picture scaled to 4k - RGB-elements filter applied - glow-filter applied - scaled back to 720p using Sinc (Lanczos3) filter.

I think Lanczos could be the wrong method for downscaling as it emphasizes sharpness which can lead to aliasing or a kind of moiré pattern with regular fine details. Try with a more simple downscale filters if they give better results.
CPC - My beloved first computer!

KaosOverride

What is your 720p formula? I will try to add a filter to capriceRPI. I have yet made for basic scanlines and interlaced. Easy to add one more!!!
KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

mr_lou

#109
Quote from: Apollo on 22:57, 05 February 16
Wouldn't be 1080i50 be an option? You can still provide the 1080p50 AVC for download if you master with that and in the last step for the BD make a 1080i50 encoding.

I don't think 1080i50 would look right. I also don't think it's an option for Blu-ray.
Encoding Video for Blu-Ray using H264/AVC - Doom9's Forum

Quote from: Apollo on 23:03, 05 February 16
I think Lanczos could be the wrong method for downscaling as it emphasizes sharpness which can lead to aliasing or a kind of moiré pattern with regular fine details. Try with a more simple downscale filters if they give better results.

I've only tried the down-scale fllters available in GiMP. Sinc gave the best result I think.

Quote from: KaosOverride on 23:39, 05 February 16
What is your 720p formula? I will try to add a filter to capriceRPI. I have yet made for basic scanlines and interlaced. Easy to add one more!!!

I don't think an emulator can do it fast enough real-time.

First I scale to 720p and then I apply my RGB-elements pattern by AND'ing the values to the image.
(Used multiply formula previously).


  private static final int CPC_R = 0xffff0000;
  private static final int CPC_G = 0xff00ff00;
  private static final int CPC_B = 0xff0000ff;
  private static final int[][] CPC_RGB = {
    {CPC_R, CPC_G, CPC_B}
  };

    int outPixels[] = new int[destImage.width() * destImage.height()];

    for (int xx = destImage.getWidth() - 1; xx >= 0; xx--) {
      for (int yy = destImage.getHeight() - 1; yy >= 0; yy--) {
        int pos = yy * (destImage.getWidth()) + xx;
        int dr = (outPixels[pos] & 0xff0000) >> 16;
        int dg =(outPixels[pos] & 0xff00) >> 8;
        int db =(outPixels[pos] & 0xff);
        int cr = (CPC_RGB[yy % CPC_RGB.length][xx % CPC_RGB[0].length] & 0xff0000) >> 16;
        int cg = (CPC_RGB[yy % CPC_RGB.length][xx % CPC_RGB[0].length] & 0xff00) >> 8;
        int cb = (CPC_RGB[yy % CPC_RGB.length][xx % CPC_RGB[0].length] & 0xff);
        int nr = dr & cr;
        int ng = dg & cg;
        int nb = db & cb;
        int newcolor = 0xff000000 | (nr << 16) | (ng << 8) | (nb);
        outPixels[pos] = newcolor;
      }
    }


After that I apply some filters, using a library I downloaded from here:
Jerry's Java Image Processing Pages

I currently use GaussianFilter followed by a LevelsFilter, and then GaussianFilter again followed by LevelsFilter again.


    GaussianFilter gf = new GaussianFilter();
    gf.setRadius(2);
    destImage = gf.filter(srcImage, null);

    srcImage = destImage;
    LevelsFilter lf = new LevelsFilter();
    lf.setLowLevel(0f);
    lf.setHighLevel(0.58f);
    destImage = lf.filter(srcImage, null);

    srcImage = destImage;
    GaussianFilter gf = new GaussianFilter();
    gf.setRadius(2);
    destImage = gf.filter(srcImage, null);

    srcImage = destImage;
    LevelsFilter lf = new LevelsFilter();
    lf.setLowLevel(0f);
    lf.setHighLevel(0.58f);
    destImage = lf.filter(srcImage, null);


I've also tried the GlowEffect which I think gave a nice impression, but it doesn't seem to work that well with the current RGB-elements pattern I'm using.
Probably works better when the RGB-pattern includes some black as well. (See the last Radzone example).

mr_lou

#110
I can have 25 fps with 1080i though.

Would you rather have 25fps + a better scanline effect, rather than 50fps with the current scanline effect?

I always felt the 50fps was more important, but now I'm not sure.
Most games run at 25fps anyway, and the 50fps will only be visible briefly sometimes....

PulkoMandy

I think 50fps is more important. Games are not always at full 50 fps speed, but they are not necessarily at 25fps either. They could refresh one every 3 frames at 50fps for example, which would then interfere with the 25fps display for even worse results.

mr_lou

I also prefer the 50fps, but I also would really like a proper CTM-look.

I can't believe the amount of time I've spent on trying to come up with an acceptable result. It seems I just can't.
Currently actually leaning towards giving it up completely and just do plain videos with blocky pixel graphics.

Spent all day (again) trying to get an acceptable result. Need a break now.

KaosOverride

Thanks, it gives me an idea of how to manipulate the pixels. Just because an emulator can't lose so much time with pixel manipulation then I will try some precast tables. RPI  has not a superpower full cpu but has enough ram.

With caprice hires mode a cpc pixel has 2x2 real pixels, well, time for some calculations :)
KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

TotO

It is too much computing for finaly not look like a CTM...
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

mr_lou

Ok, I'm trying a new approach.

What's your opinion on these?

TotO

"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

robcfg

Not bad!


It's simpler and yet it gives a nice glowing pixel grid effect.

||C|-|E||


KaosOverride

#119
Great!! It comes closer to CRT  :o

Well, all I have reached at 768x544 is some kind of dithering.... not great but... emulation does not suffer...

Ugly photos from the screen...
KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

Phi2x

#120
.

KaosOverride

CapriceRPI also has that scanline mode  :D

Also I did an interlaced mode (Try with the double-res Orion-Prime intro!!)

As I said before, I only have 2x2 pixels for each CPC pixel, so I haven't enought resolution.

I'm making some tests with different values (I have precalculated a secondary palette with half bright values and switch between normal and darker when writing pixels. I have tried 1/2, 1/3 and 1/4 values and I'm not very convinced. I think I must try to lower 1/2 bright and try to give a semi grey tone but holding the colour as the main component of that pixel
KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

KaosOverride

And don't try that scanline mode playing with SilkWorm and pressing the T key!!!! you have scanline from scanline!!!!!
KaosOverride · GitHub
MEGA Amstrad Public Amstrad folder

ZbyniuR

Horizontal scanlines look real as emulation of Green monitor - only.

Filter from #115 at first sight look interesting and good, much better than scanlines, could stay like this. I think only with zoom look different but more pretty than real monitor. I think most close to real CMT was in #82. :)
In STARS, TREK is better than WARS.

mr_lou

Quote from: phi2x on 21:53, 06 February 16
Your results are a lot better than the dumb horizontal scanlines approach that we can see in some CPC emulators.

I was just thinking about that yesterday, how strange it is that some emulators offer this when the CPC monitor never looked like that.

Maybe there were many people who used a TV instead?

Quote from: ZbyniuR on 02:01, 07 February 16
Filter from #115 at first sight look interesting and good, much better than scanlines, could stay like this. I think only with zoom look different but more pretty than real monitor. I think most close to real CMT was in #82. :)

I agree that #82 gives a cool look, but I don't think it resembles the CTM properly. In #82 each vertical scanline is 1 CPC MODE 1 pixel wide. This is what gives the cool look, but it's just not how the CTM looks.
#115 isn't how it looks either though, but I think it comes a bit closer at least. Still not quite happy with the colours or brightness though.

Powered by SMFPacks Menu Editor Mod