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 Fattie · Sep 06, 2012 at 02:55 PM · cameraeffectsexplosions

Create white "flash" (like an edit) on whole view?

A very typical effect -- there's a big explosion, and the whole scene (i.e., the entire camera view) flashes white for a few frames.

(This is also trendy with many editors of TV commercials .. when you change shots you "cut through white" and it gives a sort of trendy white flash effect with the cut.)

To alternately explain what I mean, it's like when you get a bright flash (the whole scene) indicating "someone took a photo".

I've tried a few solutions like adding a cheesy white 50% plane in front of the lens, but I guess there's probably a conventional way to do this I don't know about?

Could this relate to Image Effects? (is for ipad only BTW)

Surprisingly couldn't find anything like this using the search function. Thanks !

Comment
Add comment · Show 9
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 3agle · Sep 06, 2012 at 04:06 PM 0
Share

So you tried a plane in front of the camera with 0 opacity then fading up quickly to 'flash'?

Did that not work? Or was not satisfactory?

That would probably be the way I would do it anyway.

avatar image Fattie · Sep 06, 2012 at 04:11 PM 0
Share

@Eric5h5 - exactly !! :)

@3agle - I sure did. But it just does not feel right somehow.

You know when you're program$$anonymous$$g, and you just know someone is going to come along and say "Oh, you don't know about THIS?" ... it seems like there must be some more elegant way, than having a plate sitting there all the time.

BTW, I think in an editing sense the best pattern to achieve that feel is...

 _whiteness = Random.Range(0.2,1.0);
 weirdWhiteSprite.color.a = _whiteness;
 yield;
 weirdWhiteSprite.color.a = 0.2 * _whiteness;
 yield;
 weirdWhiteSprite.color.a = 0.0;
 yield;

i.e., jump from 0 to 100 {or, some random max}, then next frame cut that way down, and then you're out. (I based that on analyzing some typical TVCs, that ridiculous effect was so popular for awhile there.)

PS edited twice due to damn HT$$anonymous$$L symbols woe.

avatar image Eric5h5 · Sep 06, 2012 at 04:17 PM 0
Share

Nah, that's framerate-dependent. It should be based on time, not frames...depending on how many frames per second it's running, and whether vsync is off, that could very well not even be visible since it wouldn't be drawn by the monitor. See my answer.

avatar image Fattie · Sep 06, 2012 at 04:25 PM 0
Share

Ah, a fantastic point, thanks. To be clear, the three frames in my example would run at perhaps 60fps on certain machines, perhaps 30fps on others and so on - am I right there?

I have assumed yield; on it's own is the same as the next FixedUpdate() .. no?

avatar image Kiloblargh · Sep 06, 2012 at 04:30 PM 1
Share

If it doesn't "feel" right, maybe what it needs is an easing function (Google "penner easing"). It will fade in a non-linear way and have more "punch." Also you could get the free Strumpy Shader Editor and make yourself a shader with some kind of custom blending mode that will give you a saturated overbright/ blown-out effect ins$$anonymous$$d of a simple fade-to-white.

Show more comments

4 Replies

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by Eric5h5 · Sep 06, 2012 at 04:06 PM

Use a 2x2 pixel white texture on a GUITexture, set to cover the entire screen--position (.5, .5), scale (1, 1), 0 for pixel inset values--then fade it out over time. (Like with this.) Also, disable the GUITexture when it's not actively in use...100% transparent pixels covering the entire display is really quite bad for fill-rate.

Comment
Add comment · Show 4 · 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 Eric5h5 · Sep 06, 2012 at 04:20 PM 0
Share

A GUITexture is a plane sitting in front of the camera, but it's quite a bit easier to manage than a "real" plane. Image effects would also effectively use a plane in front of the camera, but would be limited to Pro and possibly not as efficient, and anyway is more complicated while not really gaining any benefits.

avatar image Eric5h5 · Sep 06, 2012 at 04:35 PM 0
Share

No, actually people don't complain about GUITexture performance. They complain about OnGUI code performance, which is a different thing.

avatar image Fattie · Sep 06, 2012 at 04:53 PM 0
Share

GUITexture performance ....... intriguing, thanks for that. A practical upshoot of this is that using a GUITexture, in an of itself, is not lamer than, well, putting a "normal" sprite in front of the camera. Cheers!

avatar image blackpantherxx · Sep 21, 2012 at 05:37 PM 0
Share

How to make it flicker when looking at enemy? Like in slender but want to use it as a warn to player...

avatar image
1

Answer by eabramson · Sep 06, 2012 at 08:56 PM

If you use an HDR image, you might get some blooming that looks more like overexposing the shot, Hollywood style. Don't know if you could do that on mobile though.

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 Screenhog · Sep 06, 2012 at 04:30 PM

iTween has a section of scripts called CameraFade (CameraFadeAdd, CameraFadeFrom, etc.). You could just use that with a small white texture and fade it in or out as needed.

Comment
Add comment · Show 4 · 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 whydoidoit · Sep 06, 2012 at 04:52 PM 0
Share

Isn't iTween using OnGUI to do that fade? I've been using that but it could be slow compared to Eric's answer. I don't believe it's fading between cameras - you could do that with render to texture and 2 cameras with alpha blending on the faded in texture I guess....

avatar image Eric5h5 · Sep 06, 2012 at 06:50 PM 0
Share

See here for cross-fading a camera, or here if you don't have Pro (there are some limitations compared to the Pro version of course).

avatar image blackpantherxx · Sep 21, 2012 at 05:35 PM 0
Share

How to make it flicker when looking at enemy? Like in slender but want to use it as a warn to player...

avatar image srmojuze · Aug 14, 2013 at 04:38 PM 0
Share

@blackpanther get the frame and turn on and off the white thing every x frames (or something like this)...

avatar image
0

Answer by srmojuze · Aug 14, 2013 at 04:37 PM

You could also use Image Effects (Pro only) > Screen Overlay.

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

13 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

Related Questions

Camera layering with post processing? 0 Answers

Multiple post processing profiles? 2 Answers

How to make camera position relative to a specific target. 1 Answer

Change color of Standard Assets Vignette 0 Answers

How to use Post Processing AND a Camera Script,How to use a camera script AND post processing? 0 Answers


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