Vertical Line Animation Illusion

A place for your artistic side. Discuss techniques and tools for pixel art on the NES, GBC, or similar platforms.

Moderator: Moderators

Celius
Posts: 2158
Joined: Sun Jun 05, 2005 2:04 pm
Location: Minneapolis, Minnesota, United States
Contact:

Vertical Line Animation Illusion

Post by Celius »

So this is probably a bit random, but I couldn't help myself.

The other day I stumbled upon this concept:

https://www.youtube.com/watch?v=lvvcRdwNhGM

Basically you have this sheet of clear plastic with vertical black lines on it, and you slide it over one of these images. The images are printed in such a way that when you place the plastic sheet over it, you will see a frame of an animation between the vertical lines. Slide the plastic sheet a little bit, and the next frame of the animation will be revealed. Keep doing this, and you will see the animation come to life.

My first thought when I saw this was, "Hey, I might be able to use this concept for something cool in an NES project." I haven't thought of anything too crazy yet, but here's an example I came up with:

http://www.freewebs.com/the_bott/IllusionTest.nes

This is a 3-frame animation that cycles over and over. The vertical bars are actually sprites in my example, and the image is in the background. I originally started with 3 8x8 tile images. If I were to have completely unique images that were each that size, that would take up 192 tiles of pattern table space! Not to mention the amount of ROM it's taking up. Using this concept, I merged the 3 images into a single 8x8 tile image. This saves me ROM space and pattern table space, and it saves me from having to update the BG to show the next frame of the animation. I just slide the sprites over.

I figured this concept could be useful if you wanted to do something like a short cutscene. You could take a video clip, NES-ify it and merge every 3 frames into 1. Then you'd just update the BG every 3 frames of the clip.

Another idea I just had was that this doesn't need to be done with vertical bars. You can use horizontal ones, and just blank out scanlines. I have some ideas about it that could be pretty cool.

Obviously this has limited use, but I figured I'd throw the idea out there. Maybe someone can make something cool out of it.
User avatar
thefox
Posts: 3134
Joined: Mon Jan 03, 2005 10:36 am
Location: 🇫🇮
Contact:

Re: Vertical Line Animation Illusion

Post by thefox »

It's an interesting concept!

Speaking of optical illusions, just yesterday I was playing a bit of Skate or Die! (the first one), and it's funny how the title screen logo looks like it's being pushed up/down (like a button) even though only the palette is changing.
Download STREEMERZ for NES from fauxgame.com! — Some other stuff I've done: fo.aspekt.fi
User avatar
OneCrudeDude
Posts: 276
Joined: Fri Aug 23, 2013 2:14 am

Re: Vertical Line Animation Illusion

Post by OneCrudeDude »

Another optical illusion I noticed is that some of the backgrounds of the Famicom version of Flipull are actually 8-bit interpretations of actual optical illusions.

Image

This doesn't work nearly as great as it should thanks to the small resolution of the NES. One thing worth noting is that the 'optical illusion' backgrounds are exclusive only the Famicom version.

Some other optical illusions NES games employ is the famed striped grass to give a sense of forward movement. It works because grass actually can look like that in real life, since grass is usually cut with and against the grain with each line, with one of them appearing to be darker. Another illusion of motion NES games employ is using a static image and changing their palette to look as if it's moving, especially with waterfalls. However, I noticed the NES cannot make a good waterfall without being too overpowering to the eyes, be it through palette cycling or BG bankswitching.
User avatar
Bregalad
Posts: 8056
Joined: Fri Nov 12, 2004 2:49 pm
Location: Divonne-les-bains, France

Re: Vertical Line Animation Illusion

Post by Bregalad »

Celius, this is very cool, and I am very interested in how those animations are done.

Unfortunately I doubt it allows anything awesome for the particular case of the NES for two reasons :

1) The NES has only 1 background layer. This means that you'd need sprites for either the scrolling black bar, or the drawing itself. As you said, the only way to fix that is to use vertical bars, and to use the BG enable ability in order to make bigger animations.

2) Those bars does not reduce the quantity of information of the animation in any way. They just move temporal information (frames) on the X direction, or Y direction if horizontal black bars were to be used. You sacrifice resolution for more frames. In terms of quantity of information, that's the same as extending the visible sprites to the whole black stripe, effectively avoiding the black bars, but sacrifying resolution. FMVs of very large pixels has already been done on the NES.

The only advantage is that it could give the illusion of more details if the black bars move fast enough. It's then the same concept of interlacing, exept the concept is extended to alternance between more than 2 frames.
User avatar
shao
Posts: 44
Joined: Wed Oct 12, 2011 2:21 pm

Re: Vertical Line Animation Illusion

Post by shao »

I'm not sure I understand the concept but ¿could you show who is the image that is in the background?.
Celius
Posts: 2158
Joined: Sun Jun 05, 2005 2:04 pm
Location: Minneapolis, Minnesota, United States
Contact:

Re: Vertical Line Animation Illusion

Post by Celius »

thefox wrote: Speaking of optical illusions, just yesterday I was playing a bit of Skate or Die! (the first one), and it's funny how the title screen logo looks like it's being pushed up/down (like a button) even though only the palette is changing.
I just saw it on YouTube. I would never have thought those tiles weren't changing! Very interesting.
Bregalad wrote: 1) The NES has only 1 background layer. This means that you'd need sprites for either the scrolling black bar, or the drawing itself. As you said, the only way to fix that is to use vertical bars, and to use the BG enable ability in order to make bigger animations.
I think it'd be better to use blanked out scanlines for this reason. Plus you have more freedom to do cooler effects, since you're resetting the scroll (you could even repeat the row of pixels instead of blanking them out). But this greatly increases the complexity of the code.
Bregalad wrote: 2) Those bars does not reduce the quantity of information of the animation in any way. They just move temporal information (frames) on the X direction, or Y direction if horizontal black bars were to be used. You sacrifice resolution for more frames. In terms of quantity of information, that's the same as extending the visible sprites to the whole black stripe, effectively avoiding the black bars, but sacrifying resolution. FMVs of very large pixels has already been done on the NES.
Exactly; you are simply reducing the resolution to be able to squeeze more images in. It's a sacrifice, but it might be a sacrifice you're willing to take, if it's the right application. I also think, if you're going with black bars made out of sprites, it's an easy way to implement interleaving images. The code behind this is not complex at all. If you found a use for the concept during gameplay, you could easily implement it. The same can't really be said for doing complex raster effects.
shao wrote: I'm not sure I understand the concept but ¿could you show who is the image that is in the background?.
The image below breaks it down:

Image

The image in the top left is what is in the background. The vertical bars are made of sprites and are moved over the image. The result looks like what is shown on the bottom. You can even try it yourself; take the image in an image editor, and drag the black bars over the image on the top left. You should see how it works once you do :)
User avatar
Memblers
Site Admin
Posts: 4044
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Re: Vertical Line Animation Illusion

Post by Memblers »

That's a neat idea. I was thinking too, if the animation was only 2 colors, you could squeeze 3 more frames into the same memory.

So you'd have 2 1bpp combined images, then you'd combine them into a 2bpp NES tile arranged like this:
set1: transparent,transparent,color1,color1overlap
set2: transparent,color1,transparent,color1overlap

If that didn't make sense, another way of saying it is pixels that exist in same position of both images, use entry #3, while pixels that are in one image but not the other use entry #1 or #2. The latter are then hidden by making them the same color as transparent.

So to display the alternate 3 frames, you would simply swap the 2nd and 3rd entries in the palette memory. Then cycle the bars over it a second time. Whether it's 3 or 6 animation frames derived from one still image, that's pretty cool illusion either way.
Celius
Posts: 2158
Joined: Sun Jun 05, 2005 2:04 pm
Location: Minneapolis, Minnesota, United States
Contact:

Re: Vertical Line Animation Illusion

Post by Celius »

That totally makes sense! That's actually a very good idea, as many of these illusions are done using silhouettes. I can picture using that for something like a giant creature flying in from a distance. You can use the silhouette idea for when its furthest away, and then flip it to full color as the creature comes closer. This illusion would lend itself well to things that need to appear "faded".
User avatar
tokumaru
Posts: 12427
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Re: Vertical Line Animation Illusion

Post by tokumaru »

This technique is interesting and all (in fact, from what I've heard this is similar to the way the 3DS screen works: stripes block different parts of a combined image for each eye, so each eye sees a different perspective), but what would be the real reason to use this on the NES? The stripped look isn't exactly pleasing to the eye, and there aren't enough sprites to do thi to a full frame image, meaning that in that case you'd still need large (slow!) background updates in order to create animations, so what is the advantage over traditional animation techniques?
User avatar
Gilbert
Posts: 564
Joined: Sun Dec 12, 2010 10:27 pm
Location: Hong Kong
Contact:

Re: Vertical Line Animation Illusion

Post by Gilbert »

I remember when I was a kid, plastic rulers using this technique to show animation or "3-D" imagery were very popular (like these for example).

But like some people pointed out already, you can animate stuff on consoles by changing sprites/background portions directly anyway, other than doing it for style there isn't much to it (unless in the case of the 3DS, which requires special screen hardware not unlike the plastic layers of those rulers, to achieve 3-D effect without requiring glasses).
lazigamer
Posts: 23
Joined: Mon Oct 10, 2011 9:05 am

Re: Vertical Line Animation Illusion

Post by lazigamer »

I just thought of a way to do a fullscreen illusion without any sprites. Instead of using vertical bars, try horizontal bars created by turning off and on the display at regular intervals with interrupts or timed code.
User avatar
rainwarrior
Posts: 8734
Joined: Sun Jan 22, 2012 12:03 pm
Location: Canada
Contact:

Re: Vertical Line Animation Illusion

Post by rainwarrior »

Well, if you're willing to go with horizontal, you have a lot more freedom... You don't need sprites, and you don't need the image to move between frames, or even empty lines between rows, and you don't even have to interleave frames of the animation. You can just double or triple or quadruple arbitrary scanlines. Obviously it's not the same effect at all, at that point, but if your goal is lower-resolution frames of animation, that's one way to do it.

Of course you can also make blank scanlines, with the spatial displacement, etc. with pretty much the same technique, just at this point there's no technical reason why they have to be blank.
User avatar
shao
Posts: 44
Joined: Wed Oct 12, 2011 2:21 pm

Re: Vertical Line Animation Illusion

Post by shao »

Thanks for the explanation, now I can see more clearly, maybe do experiments.
Celius
Posts: 2158
Joined: Sun Jun 05, 2005 2:04 pm
Location: Minneapolis, Minnesota, United States
Contact:

Re: Vertical Line Animation Illusion

Post by Celius »

tokumaru wrote:This technique is interesting and all (in fact, from what I've heard this is similar to the way the 3DS screen works: stripes block different parts of a combined image for each eye, so each eye sees a different perspective), but what would be the real reason to use this on the NES? The stripped look isn't exactly pleasing to the eye, and there aren't enough sprites to do thi to a full frame image, meaning that in that case you'd still need large (slow!) background updates in order to create animations, so what is the advantage over traditional animation techniques?
If the striped look is a sacrifice you're willing to make (along with an 8x8 size max), it's a way to fit seemingly more information into less space in the pattern table. This means it consumes less ROM space, which also means it would take less time to transfer to CHR RAM, if CHR RAM is being used. It also means having to do less BG updates, since the data is all compressed into the same tiles. On top of that, all you have to do is change the position of the overlay to advance to the next frame of the animation.

Honestly, without using a sprite overlay, there's not much point in performing this exact trick with blanked out scanlines (it took me a bit to figure that out). Since you're resetting the scroll, you're not bound by the limitation of "NumberOfAnimations = BlankBarWidth + 1".

The striped look might have an appeal, like if you're going for an old-timey projector look. If nothing else, it's an idea. Ideas lead to other ideas.
User avatar
Memblers
Site Admin
Posts: 4044
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Re: Vertical Line Animation Illusion

Post by Memblers »

It sounds like it could be decent video compression for full-screen. By changing the scroll every hblank (or using a special mapper), you could either do stripes or stretch the lines. Just cutting the resolution down to 256x120 (or 256x112) would halve the data to update a full screen bitmap. If the animation is 1BPP, then you could merge 2 frames and do the palette cycling, and it's just a quarter of the data.
Post Reply