TV snow simulator?

You can talk about almost anything that you want to on this board.

Moderator: Moderators

Post Reply
User avatar
Zepper
Formerly Fx3
Posts: 3264
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

TV snow simulator?

Post by Zepper »

- How do I simulate a noisy TV screen, no syntonized channel?
Last edited by Zepper on Sat Sep 13, 2008 6:58 pm, edited 1 time in total.
tepples
Posts: 22345
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Post by tepples »

Are you doing this on the NES, in an NES emulator, or otherwise? If on the NES, are you doing it full screen or in a tiny window?

Techniques to try on the NES:
  • Play with bits 0, 5, 6, and 7 of PPUMASK
  • Nudge the fine X scroll per scanline
  • Make a sprite of 8 black pixels across, and draw it somewhere random each frame
Celius
Posts: 2159
Joined: Sun Jun 05, 2005 2:04 pm
Location: Minneapolis, Minnesota, United States
Contact:

Post by Celius »

Is this for making the grainy white pixeling all over the screen?

Here's what I'd do: Take a bunch of tiles, and put them in random order all over the screen. This only has to be done once. Have these tiles filled randomly with pixels using all 4 colors. You should have 2 colors be a greyish white, and two colors black. Then every frame, cycle which colors are black and which ones are grey. This may give you the effect. If not, it at least might give you some ideas.
User avatar
kyuusaku
Posts: 1665
Joined: Mon Sep 27, 2004 2:13 pm

Post by kyuusaku »

I'd guess TV snow for an emulator when the ROM is unloaded. For that just render random black and white pixels (and noise to the sound bufferl). If you want to be truly authentic I guess you'd have to pass it through a NTSC codec to get some color artifacts, and maybe simulate locking to noise sync.
User avatar
Bregalad
Posts: 8036
Joined: Fri Nov 12, 2004 2:49 pm
Location: Caen, France

Post by Bregalad »

Well, I guess TV snow is not black and white. It's just that the colors switch so quickly that it appers so. Also Battltetoads features some in it's graphics.
Useless, lumbering half-wits don't scare us.
Celius
Posts: 2159
Joined: Sun Jun 05, 2005 2:04 pm
Location: Minneapolis, Minnesota, United States
Contact:

Post by Celius »

I made a quick demo of my palette cycling idea. It doesn't have sound or anything, but here it is:


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

Now this could be improved A LOT. I just am a little lazy right now. I know the tessellation is quite obvious as I only made 5 different tiles, but if one were to make 16 or more, and tile these more randomly than I did, you could get some pretty good results.

The basic idea is that you cycle colors #1-#3 of the first BG palette so one is black when the other two are grey. With tiles like I have, this can create a snowy effect if tiles are drawn properly.
CartCollector
Posts: 122
Joined: Mon Oct 30, 2006 8:32 pm

Post by CartCollector »

TV snow actually is black and white only because for a field (half of an interlaced frame) to be rendered in color there has to be a burst of the color carrier (frequency which color is modulated on) at the beginning of each scanline. Since TV snow is just random noise, the likelihood of a continuous burst of a certain frequency on each scanline is unlikely. However, luminance (black-and-white) is modulated by amplitude and does not need a carrier burst, so random noise is much more likely to be picked up by a reciever as a black-and-white signal than a color one.

For those of you who don't understand what I'm getting at, read this article. It explains how the television broadcast signal standard used in the US, Canada and Japan works. You also get the benefit of learning how the NES sends its video and why blargg's TV filter makes the output video look so much different from normal emulation.
User avatar
Zepper
Formerly Fx3
Posts: 3264
Joined: Fri Nov 12, 2004 4:59 pm
Location: Brazil
Contact:

Post by Zepper »

Sorry for the barrier, as I didn't know it as "TV snow" here... ^.^!
User avatar
jargon
B&: This is not your blog
Posts: 208
Joined: Fri Dec 07, 2007 11:40 pm
Location: 480/85260
Contact:

Re: TV snow simulator?

Post by jargon »

Fx3 wrote:- How do I simulate a noisy TV screen, no syntonized channel?
i knew losing my demo would come back to haunt me.

i once made a flawless demo of this for xt.

i have no idea how i got it working.

it was like tv static during an acid trip. -.-

i will get back to this later if someone doesn't come up with a better idea first.

use lots of palette cycling, and use interrupts to make the scanlines wiggle left and right.

also refer to my MISHAP scaler routine i am planning on showing the algorithm for soon. as it works great for making dynamic 'glint'. (is that even a word?)

also be sure to have two different completely wrong parallaxing layers.

one layer should have a fake offscreen region that is transparent which wanders randomly left to right while scrolling in loop vertically at variable rate. (google VHS/NTSC signal bounding region)

one way to adjust variable rate in similar fashion is to make a random number for how many frames to wait to adjust the vertical scroll rate, then when the timer triggers, weighted average the current scroll rate with a new one.

for horizontal wander scroll rate/position you can google 'wander ai' where the object faces a specific direction with a steering wheel mounted always slightly in front of the object on the ray of the vector it is facing.

then have a dot randomly increment in degrees around that wheel relative to which way is futhest from the object within its steering wheel.

then have the object rotate the direction it faces based off the vector from the object to the invisible dot on its invisible steering wheel relative to the current direction faced.

also be sure to have the object constantly walk foreward in the direction it is facing, this results in a really freakish pong ball when you have it bounce of a bounding region.

thus you can have that one wandering 'pong ball's x be the horizontal offset of the wrapped scanlines, and the y axis of it, be the rate at which it scrolls the wrap horizontally.

this is hard to understand and prolly makes little sense unless you already know about various behavioral ai to some extent.

i will upload youtube video with a tutorial on this stuff once i get my replacement os discs in the mail around the 30th of this month, (september 2008), as soon as i can get the damn laptop running smoothly and have personal time off to work on the video tutorial series.

anyways just google 'behavoral ai', 'pathfinding ai' etc. and google 'weighted average' etc until you find something that resembles what in god's name i am talking about with actual interactive illustrations.

i will post the tv-static / "EVP" how-to tutorial vids as soon as i have the equipment, time, and patience to make them.

(By EVP i mean snow that actually resembles something living, like the Electronic Voice Print in the movie 'White Noise'.)
Cheers,
Timothy Robert Keal alias jargon

Image
Miser's House Anthology Project
Celius
Posts: 2159
Joined: Sun Jun 05, 2005 2:04 pm
Location: Minneapolis, Minnesota, United States
Contact:

Post by Celius »

I thought about something a while back that I was too lazy to post here. In addition to my palette cycling demo, you could put random values in the scroll to make the noise simulator seem more believable.
User avatar
blargg
Posts: 3717
Joined: Mon Sep 27, 2004 8:33 am
Location: Central Texas, USA
Contact:

Post by blargg »

If you squint your eyes, one of the previous posts is a pretty good simulation, though it has fewer scanlines (thank god).
User avatar
jargon
B&: This is not your blog
Posts: 208
Joined: Fri Dec 07, 2007 11:40 pm
Location: 480/85260
Contact:

Post by jargon »

blargg wrote:If you squint your eyes, one of the previous posts is a pretty good simulation, though it has fewer scanlines (thank god).
jargon wrote:ImageImage
by god, you are right!

........


:idea: Celius should totally combine tv static with polygons to make a simulation for the NES where you aim the tv camera at the same tv showing the output!
Cheers,
Timothy Robert Keal alias jargon

Image
Miser's House Anthology Project
Celius
Posts: 2159
Joined: Sun Jun 05, 2005 2:04 pm
Location: Minneapolis, Minnesota, United States
Contact:

Post by Celius »

I'm sorry, I don't know what you mean by the "TV camera", or the "Same TV showing the output". And anyways, combining TV static with polygons would be a headache, and I don't feel like it's worth the effort because I'd show it on maybe one occasion that I could think of (a shot of a static TV in my polygonal movie engine).
User avatar
tokumaru
Posts: 12106
Joined: Sat Feb 12, 2005 9:43 pm
Location: Rio de Janeiro - Brazil

Post by tokumaru »

I think he meant when you point a camera to a TV that is showing the output of that same camera. I used to do it all the time when I was a kid... There seems to be a sort of a tunnel, with everything repeating infinitely. But there is a delay, so you can see the images changing one after the other. I don't know what this has to do with static though.
User avatar
No Carrier
Posts: 290
Joined: Tue Dec 13, 2005 4:19 pm
Location: Gainesville, FL - USA
Contact:

Post by No Carrier »

tokumaru wrote:I think he meant when you point a camera to a TV that is showing the output of that same camera. I used to do it all the time when I was a kid... There seems to be a sort of a tunnel, with everything repeating infinitely. But there is a delay, so you can see the images changing one after the other. I don't know what this has to do with static though.
Yep, he's probably talking about optical feedback:

http://en.wikipedia.org/wiki/Optical_feedback
Post Reply