Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How to create a Television Noise

Discussion in 'Formats & External Tools' started by khansoft, Apr 13, 2011.

  1. khansoft

    khansoft

    Joined:
    Mar 30, 2009
    Posts:
    1
    Maybe a newbie question. Can someone tell me how to create a so called Television Noise effect for startup intro? I've tried with particle system but cant get the same result as I want. Can this be done with C# or Javascripting? any help would be great..

    Im using Unity Indie with iPhone Basic.
    Khan

    PS: somthing like that
    $noise.gif
     
  2. KyleStaves

    KyleStaves

    Joined:
    Nov 4, 2009
    Posts:
    821
    Is there any reason you can't just iterate through every pixel in a 2D image and choose a random color value from a set of values (white, black, and 2-3 different gray values perhaps)?

    You'd get much better performance just rotating through several pre-made pictures though I'd imagine (google "photoshop (or gimp) tv static tutorial" - make 3-5 "static" images, rotate between them).
     
  3. fallingbrickwork

    fallingbrickwork

    Joined:
    Mar 16, 2009
    Posts:
    1,072
    Not sure if a shader would work on iPhone Basic?! but you are welcome to give mine a try...

    http://www.fearedfuturegames.com/Archive.zip

    If you copy the shader to your project and then apply it to a plane you can drag the 2 images into the slots... coloured image goes in the 'colored' texture slot and the static image in the other... then just hit play.

    Not sure if it will work on the iPhone, but if not, it may help you somewhere else of someone else... you can change the static image for any 'tv static' type image.

    Regards,
    Matt.
     
  4. PrimeDerektive

    PrimeDerektive

    Joined:
    Dec 13, 2009
    Posts:
    3,090
    I think the simplest solution would be to get 10 or so different images of static, create a GUITexture, and add a script to it that has an array of the 10 different images and sets the GUITexture.texture to be a different one of the images in the array every frame (or use a coroutine and change it every 1/24th of a second or whatever other framerate you wanted).
     
  5. Quickfingers

    Quickfingers

    Joined:
    Aug 29, 2009
    Posts:
    268
    Here's what I did in my game, get a noise generated from photoshop (monochromatic) then use the additive particle shader applied to a plane and just randomize the pixel offsets in the material every frame, looks great, is true random and only 1 texture required
     
  6. RobbieDingo

    RobbieDingo

    Joined:
    Jun 2, 2008
    Posts:
    484
    I'd say the the most efficient way to do this, would be to use a single texture like the one you've shown in your original post, apply it to the surface of an object (wrapped), and then constantly/randomly change the offset x and y values so it jitters. Because of the type to texture you are using it will look very random all over, even though you are just offsetting it... (my 10p's worth).
     
  7. defjr

    defjr

    Joined:
    Apr 27, 2009
    Posts:
    436
    This. Definitely the easiest and probably the most efficient method to achieve the desired result.
     
  8. ivanzu

    ivanzu

    Joined:
    Nov 25, 2010
    Posts:
    2,065
    You would need to use GUI and than add image onto it.