TV snow simulator?
Moderator: Moderators
TV snow simulator?
- 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.
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:
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:
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.
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.
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.
-
Celius
- Posts: 2159
- Joined: Sun Jun 05, 2005 2:04 pm
- Location: Minneapolis, Minnesota, United States
- Contact:
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.
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
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.
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.
- 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?
i knew losing my demo would come back to haunt me.Fx3 wrote:- How do I simulate a noisy TV screen, no syntonized channel?
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'.)
- jargon
- B&: This is not your blog
- Posts: 208
- Joined: Fri Dec 07, 2007 11:40 pm
- Location: 480/85260
- Contact:
blargg wrote:If you squint your eyes, one of the previous posts is a pretty good simulation, though it has fewer scanlines (thank god).
by god, you are right!jargon wrote:
........
-
Celius
- Posts: 2159
- Joined: Sun Jun 05, 2005 2:04 pm
- Location: Minneapolis, Minnesota, United States
- Contact:
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).
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.
- No Carrier
- Posts: 290
- Joined: Tue Dec 13, 2005 4:19 pm
- Location: Gainesville, FL - USA
- Contact:
Yep, he's probably talking about optical feedback: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.
http://en.wikipedia.org/wiki/Optical_feedback
