Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Half pixel shifting
2005-11-21 08:13
Twynn
Account closed

Registered: Nov 2005
Posts: 9
Half pixel shifting

First of all: It's good to see that the C64-scene is still alive.
I kinda left the scene about ten years ago but after accidently crossing this site I got interested a bit again. Downloaded some demo's to see what happened since I left and I was quite amazed. Not those ugly 8x8 modes anymore, but good looking demos.

Anyway, when I was watching krestage I saw this intro for each demopart which used this high-resolution text which is said to use half pixel shifting? I'm still familiar with the normal vic-tricks, but this one made me curious.

Now I wonder how this is done. Is it just a visual trick or has the vic really some possibility to do half pixel movements or something?
2005-11-21 08:27
Oswald

Registered: Apr 2002
Posts: 5094
just a visual trick, tho I dunno how is it done, and if it can be at any level considered as a half pixel shift.
2005-11-21 08:29
Cruzer

Registered: Dec 2001
Posts: 1048
Just move the gfx one pixel each 2nd frame. E.g. if moved vertically the eye will be between two lines on the 2nd frame, since the eye will move smoothly rather than stopping and starting 25 times per second. If you then display the equal lines of the gfx on one frame and the odd lines on the other it will almost look like there's twice as many lines.

Same concept as interlace on a normal TV signal, except here the lines are auto-displaced half a line each frame, so you don't have to move your eyes.
2005-11-21 08:35
HCL

Registered: Feb 2003
Posts: 728
No, it's just a visual trick.

Theoretically you may think that the graphics is twice as wide as the screen, so when you show it you can only display every second pixel. But since the scroller moves one pixel each frame, you will display the other second half of the gfx the next frame. and so on..

Since the scroller moves with a constant speed, it also flickers between the two graphic screens at a constant rate. This makes it look good.
2005-11-21 08:56
Oswald

Registered: Apr 2002
Posts: 5094
I understand then. In short this is the same as IFLI interlacing, or as in the demo 400, which doubles the vertical resolution. But doing this with a diagonal scroll you may *think* that you doubled both resolution. As the displayed graphics only alternates between 2 of a kind, its not even virtually 640x400 imho, as to really display the amount of data needed you would need to display 4 kinds of gfx.
2005-11-21 09:33
JackAsser

Registered: Jun 2002
Posts: 2014
IFLI is not the same since in IFLI you actually shift half a multicolor pixel, thus you don't have to scroll the image to get the impression of higher resolution, you actually get true interlacing in IFLI.
2005-11-21 09:47
Twynn
Account closed

Registered: Nov 2005
Posts: 9
Ok, thanx all.

Just a little interlace trick.. Well, still nicely done.

JackAsser: isn't IFLI actually more ment for producing more colors instead of a higher resolution?
2005-11-21 10:00
JackAsser

Registered: Jun 2002
Posts: 2014
Twynn: If you shift half a pixel you get higher resolution, if you don't shift you get color blending, that's basically it when it comes to interlacing. However, the artist may use interlacing as a means of color blending if the pixels are put correct.
2005-11-21 11:20
algorithm

Registered: May 2002
Posts: 705
Doesn't really matter if it is a genuine VIC trick or illusion. As long as it gives the effect, that is all that matters.

Some other examples are alternative interlace methods which seem to reduce flicker (line interlacing or cross hatch)
2005-11-21 11:30
Oswald

Registered: Apr 2002
Posts: 5094
anyone knows of a ifli pic where each line is shifted to the opposite direction ? I wonder if that method is ufeful.
2005-11-21 11:46
chatGPZ

Registered: Dec 2001
Posts: 11386
oswald: i tried this a (long) time ago...it actually improves the quality of the interlace quite a bit (depending on the picture ofcourse). its a simelar thing with evening out the luminance of both half frames. the first will improve horizontal color blending (since the picture will be displayed in a "checkerboard" style all the time) and the second will reduce flickering.
2005-11-21 11:49
WVL

Registered: Mar 2002
Posts: 902
Quote: anyone knows of a ifli pic where each line is shifted to the opposite direction ? I wonder if that method is ufeful.

not really IFLI, but i think HCL's Interruptus Retriggerus is a good example? (the part with the FPP logo)
2005-11-21 11:52
enthusi

Registered: May 2004
Posts: 677
Im a mere 'watcher' of those effects I admit :)
But IMHO what groepaz mentioned last is the most important thing about any interlace mode (unless its displayed with a beamer or my green-monitor :).
Well - my post was pretty obvious but I still wonder about people generating greyshades by black+white pixels etc. Must be some weird converter around somewhere...
...or the average graphician is too stoned to recognize and/or care
2005-11-21 12:00
algorithm

Registered: May 2002
Posts: 705
Try out my HOI converter. It takes a truecolor image and converts it to 192x200 hires according to the selected mix colors rather than the C64's 16 colors. Horrible flicking on anything other than a tv though.
2005-11-21 12:08
T.M.R
Account closed

Registered: Dec 2001
Posts: 749
As an aside, there are Atari 8-bit demos using Hard Interlaced Picture (HIP, the "Hard" is the crew who invented the routine) mode and variants that do the odd/even line thing and they look pretty good (using the Atari's 80x192 16 colour modes and a "feature" of the hardware that allows the pixels to shunt half a pixel sideways, the smooth scroll can't do that with the 16 colour mode).
2005-11-21 13:51
algorithm

Registered: May 2002
Posts: 705
I think some examples of this Atari Mode were in the demo 'Numan' although i could be wrong. The display still does not look as good as IFLI on C64 though. The 80 pixel horizontal width would then give a virtual 160 h width after interlace and C64 could do virtual 320 width.

Still, The Atari probably has other tricks up its sleeve. Would like to see some graphic mode examples for this machine.


2005-11-21 13:51
chatGPZ

Registered: Dec 2001
Posts: 11386
Quote:

not really IFLI, but i think HCL's Interruptus Retriggerus is a good example? (the part with the FPP logo)


yes, that one is using the alternating one pixel offset... and as you can see it looks quite smooth :)

Quote:

But IMHO what groepaz mentioned last is the most important thing about any interlace mode (unless its displayed with a beamer or my green-monitor :).


the first effectivly smoothens horizontally, the second vertically...so a combination of both would be ideal :)

2005-11-21 13:57
algorithm

Registered: May 2002
Posts: 705
Some examples although there are more of interlace techniques in C64 Demo's

Crest Avantarde. The interlaced picture of three men covering the side borders. alternates between two lines.. eg picture 1 has pic1 data for two vertical pics, then pic2 info for the next 2, then pic1 info etc...
then picture 2 has pic2 data for two vertical pics, then pic1 info for next two etc etc

Don't Meet Crest. Cross hatched technique, etc
2005-11-21 14:12
Cruzer

Registered: Dec 2001
Posts: 1048
And btw, half-pixel interlace was of course first seen in this demo: Unbounded/Demotion (I think.)
2005-11-21 14:19
chatGPZ

Registered: Dec 2001
Posts: 11386
whatever is in that demo, its certainly not half-pixel interlace :o)
2005-11-21 14:56
Cruzer

Registered: Dec 2001
Posts: 1048
why not???
2005-11-21 16:43
pernod
Account closed

Registered: Nov 2004
Posts: 25
"Reticulate" by SCG was, as far as I know, the first 64 demo to use interlace effects. It was released in 1988. There is a scroller that utilizes the "half-pixel-shift" effect.

Reticulate

"Our pixels are smaller than yours"
2005-11-21 16:51
Dane

Registered: May 2002
Posts: 423
Check out the final part of Digital Magic: Digital Magic for an example of interlaced hires in many colours. Probably the smoothest interlace there is.
2005-11-21 16:57
algorithm

Registered: May 2002
Posts: 705
Dane, that picture probably rates as one of the best I have seen, quality and resolution wise (Was it Kirsten Dunst btw?)

What mode was it in?
2005-11-21 17:04
chatGPZ

Registered: Dec 2001
Posts: 11386
cruzer: in my book "half pixel interlace" just like "half pixel shift" implies displaying one halfpicture with an offset of half a pixel, which none of the tricks on the c64 can do. the thing you guys are talking about refers more to stroboskopic effect and persistance than interlace :)
2005-11-21 17:08
Oswald

Registered: Apr 2002
Posts: 5094
groepaz: cant agree more, the term "half pixel shift" is bullshit

pernod, if you would have read the comments you would find an even earlier interlace demo from '86

Interlace
2005-11-21 17:10
Dane

Registered: May 2002
Posts: 423
Thanks Algorithm. It is interlaced X-Fli and most definitely Kirsten Dunst.
2005-11-21 17:14
Oswald

Registered: Apr 2002
Posts: 5094
somehow its funny to find out that whats thought to be a lame newschool craze (interlaced pix) was invented in the oldshcool era :)
2005-11-21 17:33
Tch
Account closed

Registered: Sep 2004
Posts: 512
Quote: somehow its funny to find out that whats thought to be a lame newschool craze (interlaced pix) was invented in the oldshcool era :)


I blame the screenshots. ;)
2005-11-21 18:16
JackAsser

Registered: Jun 2002
Posts: 2014
Groepaz, oswald: When you scroll using $d016 one pixel back and forth in multicolor you move the image half a multicolor pixel, thus you get TRUE interlace. So, let fine-scroll be 0 and show every odd row and then let fine-scroll be 1 and show every even row (maybe I switched the fields now, which would look crap =) ). So, YES, in multicolor pixels you CAN move the image half pixels => TRUE interlace.

Although, normally interlace moves the picture half a pixel up and down (the TV does that automagically), but interlace works just as well moving sideways using $d016 (with 2x1 pixels!)

2005-11-21 18:40
Oswald

Registered: Apr 2002
Posts: 5094
jackasser:we mean half hires pixel
2005-11-21 18:45
Tch
Account closed

Registered: Sep 2004
Posts: 512
Quote: jackasser:we mean half hires pixel

This can´t be done,right?
It will always only be a delusion?
UIFLI is amazing,but there is no $D016 involved.
Just 2 different pictures interacting really fast.
2005-11-21 19:34
T.M.R
Account closed

Registered: Dec 2001
Posts: 749
Quote: I think some examples of this Atari Mode were in the demo 'Numan' although i could be wrong. The display still does not look as good as IFLI on C64 though. The 80 pixel horizontal width would then give a virtual 160 h width after interlace and C64 could do virtual 320 width.

Still, The Atari probably has other tricks up its sleeve. Would like to see some graphic mode examples for this machine.




HIP is 160x192 yes, but with 16 lumas and interlace to mix them to 32, that's a pretty good image quality - the colour variants reduce the actual palette considerably, but add more interlaced shades.

As for other modes, the Atari can match the C64 for res in hi-res or multicolour but hasn't as good a colour depth (320x192 in two colours, 160x192 in up to five colours) unless sprites are used as underlays - the best mode to date is G2F, not quite C64 multicolour control of the colours but with access to a large proportion of the 128 colours. Some good examples here;

http://g2f.atari8.info/gallery.html
2005-11-21 20:12
algorithm

Registered: May 2002
Posts: 705
Had a look at the pictures.. quiet good, but nowhere near as good as IFLI. and if you take into consideration other custom modes such as UFILI, XFLI, SHIFLI, Nowhere as good as C64 even though there might be more control in 'custom' colors on atari
2005-11-21 20:28
T.M.R
Account closed

Registered: Dec 2001
Posts: 749
Well, they're not trying to *be* IFLI because the hardware smooth scroll on the A8 has half the resolution of the C64 anyway - they're trying to be multicolour with better colour depth and, if you'd done a little research, that's a major leap for the hardware considering the limits. Remember the A8 is three years older than the C64, it's hardly a fair comparison in the same way that putting a C64 up against a CPC+ isn't fair.
2005-11-21 20:33
algorithm

Registered: May 2002
Posts: 705
Well, C64 rules anyway.. what i have seen on the Atari (imagery wise) cannot match the c64

Although the atari is still an amazing machine (similar but very different to amiga in some ways) - same developers?? I think Jay Minor was partly responsible for the hardware design??
2005-11-21 20:48
T.M.R
Account closed

Registered: Dec 2001
Posts: 749
Miner's team helped build the A8 series yes, that's why it has that annoying "sprites are full screen height" design like the Amiga and indeed the VCS!

The display list/DLI system is useful and bears a vague resemblance to the copper on Amiga but without the seperate CPU, it's possible to mix and match screen modes as the display draws without having to wait for rasterlines and splitting perfectly, the hardware does it all for you. Similarly, writing to wsync halts the processor until the start of the next line so a rasterbar routine is as easy as lda colours,x / sta wsync / sta colbgnd

The only down side is that it's demo scene didn't take off like the C64 so there's less examples of the improbable out there and something like G2F has only evolved recently. That should've happened ten to fifteen years ago, really...

For graphical capabilities, you might want to check out DFLI on the 264 series as well; essentially it's 8x2 pixel attribute cells on hi-res, 320x200 pixel display with a 121 colour palette. It's not been done to my knowledge, but IDFLI is possible too; IFLI with the colour changes every other scanline (two badlines on the 264 hardware) and again that 121 colour palette...
2005-11-21 20:49
T.M.R
Account closed

Registered: Dec 2001
Posts: 749
Oh and sorry to everyone else for hijacking the thread... =-)
2005-11-21 21:06
algorithm

Registered: May 2002
Posts: 705
I have seen examples of FLI type modes on 264 and it looks quite amazing. It's true that the C64 demo scene was more active, therefore possiblity of more inventions etc...

Not sure if there are any more vic trickery left on C64 (although heavy usage of illegal opcodes may be the only thing left)
2005-11-21 21:44
chatGPZ

Registered: Dec 2001
Posts: 11386
illegal opcodes? POLICE!
2005-11-22 01:44
T.M.R
Account closed

Registered: Dec 2001
Posts: 749
i think i can claim the only hand-drawn DFLI image to date... and that was a pain in the arse, since i didn't have an editor!
2005-11-22 10:45
Monte Carlos

Registered: Jun 2004
Posts: 359
The problem with that "half-pixel-shifting" is, that
the picture must scroll.
You you can never do real half pixels.
The effect doesnt make sense without you eyes and your brain.

Monte Carlotta
2005-11-22 11:04
TDJ

Registered: Dec 2001
Posts: 1879
Quote: The problem with that "half-pixel-shifting" is, that
the picture must scroll.
You you can never do real half pixels.
The effect doesnt make sense without you eyes and your brain.

Monte Carlotta


Contrary to all those other demo effects that you can enjoy with your eyes closed and your brain switched off.
2005-11-22 11:58
hollowman

Registered: Dec 2001
Posts: 474
Quote: Contrary to all those other demo effects that you can enjoy with your eyes closed and your brain switched off.

time for someone to port the imaginary demo/melon dezign to c64
2005-11-22 12:04
Cruzer

Registered: Dec 2001
Posts: 1048
Quote: The problem with that "half-pixel-shifting" is, that
the picture must scroll.
You you can never do real half pixels.
The effect doesnt make sense without you eyes and your brain.

Monte Carlotta


Actually it is possible to make the scanlines move a bit on some TV sets by simply flashing some colors. E.g. if you have some gfx in the middle of the screen and a big solid bar on top of the screen flashing between black and white, the gfx in the middle will move a bit up/down.

How much it moves of course varies a lot from TV to TV, so it would be pretty hard to use for anything useful. But maybe if the user was prompted to calibrate it first :-)
2005-11-22 12:27
Cruzer

Registered: Dec 2001
Posts: 1048
Quote: "Reticulate" by SCG was, as far as I know, the first 64 demo to use interlace effects. It was released in 1988. There is a scroller that utilizes the "half-pixel-shift" effect.

Reticulate

"Our pixels are smaller than yours"


Hadn't seen that demo before, but that scroller for sure is a half-pixel one.
2005-11-22 12:32
Cruzer

Registered: Dec 2001
Posts: 1048
Quote: I have seen examples of FLI type modes on 264 and it looks quite amazing. It's true that the C64 demo scene was more active, therefore possiblity of more inventions etc...

Not sure if there are any more vic trickery left on C64 (although heavy usage of illegal opcodes may be the only thing left)


There are, trust me, I got plenty of unreleased routines lying around. Whether or not any of them introduce completely new VIC tricks can of course always be debated, but it's certainly possible to make new VIC-based effects.
2005-11-22 12:45
Oswald

Registered: Apr 2002
Posts: 5094
all effects are vic based, except sound effects :)
2005-11-22 12:47
Cruzer

Registered: Dec 2001
Posts: 1048
Quote: all effects are vic based, except sound effects :)

VIC-trickery based then ;)
2005-11-22 12:48
Radiant

Registered: Sep 2004
Posts: 639
Quote: There are, trust me, I got plenty of unreleased routines lying around. Whether or not any of them introduce completely new VIC tricks can of course always be debated, but it's certainly possible to make new VIC-based effects.

Well, there certainly are some effects left to discover, but you'd be hard pressed to uncover more undocumented features like FLD, FLI, sprite stretching etc.
2005-11-22 13:12
Twynn
Account closed

Registered: Nov 2005
Posts: 9
Quote: Well, there certainly are some effects left to discover, but you'd be hard pressed to uncover more undocumented features like FLD, FLI, sprite stretching etc.


Well, actually FLI is also not an undocumeted feature. Just normal vic-usage. It's just that someone has to think about it and realize what is possible. And maybe cruzer has also thought about something and worked it out.
2005-11-22 13:29
Radiant

Registered: Sep 2004
Posts: 639
Quote:
Well, actually FLI is also not an undocumeted feature. Just normal vic-usage. It's just that someone has to think about it and realize what is possible. And maybe cruzer has also thought about something and worked it out.


Badline at will sure is undocumented, no? I haven't read any official VIC-II specs, but I don't think they'd include such hacks...
2005-11-22 15:34
Cruzer

Registered: Dec 2001
Posts: 1048
Quote: Well, there certainly are some effects left to discover, but you'd be hard pressed to uncover more undocumented features like FLD, FLI, sprite stretching etc.

What is a "feature" anyway? Is FLI really an undocumented VIC-feature, when the processor has to be involved at every line? All the VIC chip does is just updating the bitmap colors whenever there is a badline, like it always does in bitmap mode.

Guess we could discuss what a "feature" is for ages (there was a thread like that some time ago) but I don't really think it's that interesting.

What really counts is what appears on the screen, and there's definitely lots of effects left to do, which rely more or less on VIC-trickery, including improvements of existing tricks, and even stuff that some might say would qualify for a new feature/gfx mode/etc.
2005-11-22 16:25
algorithm

Registered: May 2002
Posts: 705
Give us a clue.., new graphic modes, etc etc
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
lA-sTYLe/Quantum
goerp/F4CG/HF
ΛΛdZ
Francesco Sblendorio
crayon/Hokuto Force
radius75
algorithm
Lord Crucifier/SCS*TRC
ciccior2003/HF
Jack the Rapper
Guests online: 120
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 The Demo Coder  (9.6)
6 Edge of Disgrace  (9.6)
7 What Is The Matrix 2  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 X-Mas Demo 2024  (9.5)
7 Dawnfall V1.1  (9.5)
8 Rainbow Connection  (9.5)
9 Onscreen 5k  (9.5)
10 Morph  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Organizers
1 Burglar  (9.9)
2 Sixx  (9.8)
3 hedning  (9.7)
4 Irata  (9.7)
5 Tim  (9.7)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.098 sec.