Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Michael.H · Oct 29, 2013 at 04:12 PM · gui

Camera Static Effect

I want to make like a noise/static effect on screen simulating like you would be watching through a video camera. How would one be able to achieve these kind of effects with Unity Free?

Comment
Add comment · Show 2
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image robertbu · Oct 29, 2013 at 05:50 PM 0
Share

For a question like this one, a screen shot would be very helpful. Better yet, a pointer to a video (and time within the video), that shows what you are looking for. To me "static Effect' can mean several things. You care limited in what you can do in Free, but there a couple of things that may get you what you want.

avatar image Michael.H · Oct 29, 2013 at 06:13 PM 0
Share

Here is a video Part 0:56 you can see the noise effect.

2 Replies

· Add your reply
  • Sort: 
avatar image
1

Answer by robertbu · Oct 29, 2013 at 09:18 PM

The most efficient method would be with a custom shader. The second most efficient method is likely to be a set of images animated on plane or a GUITexture in front of the camera. You will find code here to animate a set of images.

http://wiki.unity3d.com/index.php?title=Texture_swap_animator

A less efficient method is to dynamically calculate changes in a texture:

  • Create a Quad (Game Object > Create Other > Quad).

  • Move the Quad directly in front of the camera just in front of the camera and just in front of the near clip plane of the camera

  • Make the Quad a child of the camera

  • Create a material using the Unlit/Transparent shader and apply it to the Quad (no need for a texture)

  • Add the script below to the Quad.


    pragma strict

    var lineFrequency = 5; var updateFrequency = 5.0;

    private var tex : Texture2D; private var pixels : Color32[]; private var mat : Material;

    function Start () { mat = renderer.material; tex = new Texture2D(255, 255); var c32 = Color32(0, 0, 0, 0); pixels = tex.GetPixels32(); for (var i = 0; i < pixels.Length; i++) { pixels[i] = c32; } tex.SetPixels32(pixels); tex.Apply(); mat.mainTexture = tex;

       InvokeRepeating("UpdateStatic", 0.0, 1.0/updateFrequency);
     }
     
     function UpdateStatic() {
         for (var i = 0; i < pixels.Length; i++) {
             if ((((i / tex.width ) % lineFrequency) == 0 ))
                 pixels[i].a = Random.Range(85, 101.0);
             else
                 pixels[i].a = Random.Range(0, 25);
         }
         
         tex.SetPixels32(pixels);
         tex.Apply();
         mat.mainTexture = tex;
     }
    
    

There are a number of things here to play with to get the effect the way you want:

  • The size of the texture and the line frequency will effect the softness/hardness of the lines...and will also have an impact on efficiency.

  • The Random.Range() calls determines the look of the static for both lines and non-line areas.

  • 'updateFrequency determines the rate at which the static refreshes.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by Tanshaydar · Oct 29, 2013 at 06:13 PM

In here, this person explains how to create a Slender game in detail using Unity Free version. http://www.youtube.com/watch?v=JXDBNNE4aFY

He speaks in Portuguese but it's pretty much clear how he does that, so here you go.

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

16 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

GUI click through? 3 Answers

Disable script on 2. object by boolean from 1. object. 0 Answers

Select text in multiple text areas simultaneously 2 Answers

Scaling a GUI element to fit it's contents 0 Answers

Can't display PNG texture within GUI calls 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges