- Home /
color Tint camera
I'm trying to make a swimming script and am somewhat successful, but what i need now is, when the main camera is under water i would like to tint the whole screen a blue-ish color to simulate the underwater feeling. How would i go about doing this?
Answer by matyicsapo · Oct 08, 2010 at 06:32 PM
If you have a Pro license(or using the 30day free trial) you have access to image post processing effects. You can check out the effect in this project or just have a look at it via the webplayer here.
Otherwise you could use a cheap trick maybe by making a plane the child of the camera facing it and assign a material to it that makes it transparent and essentially you will see "everything" through this plane. The results are not that nice but it might be good enough for you.
Also check out the Render Settings page and see if a colored fog is applicable for your project.
Answer by Jessy · Nov 13, 2010 at 11:37 PM
Use this shader on a triangle or quad that takes up the whole screen. Due to ZTest Always, you don't even need to worry about how far away from the camera it is, or if other things are in front of it. (The alpha channel of the color controls how opaque it is.)
Shader "Transparent Color" {
Properties { _Color ("Color", Color) = (1,1,1,.5) }
SubShader { Tags {Queue = Overlay} ZTest Always Blend SrcAlpha OneMinusSrcAlpha Color [_Color] Pass {} }
}
Answer by Ed 1 · Oct 08, 2010 at 06:01 PM
Search before you ask link.
that topic's only answer is very inadequate since it assumes that one has a pro license(or pro trial) since you can't use post processing effects otherwise - BUT - the author's code contains fog stuff which is a "solution" if you meant to refer to that with your link - BUT - then you could have helped him yourself or atleast pointed out what to look for in that topic
http://unity3d.com/gallery/live-demos/tropical-paradise in this one when you go underwater the whole screen goes blurry(pro image effect), while if you test the project from a non-pro editor the only thing happens that there is some fog applied - so just check the difference between the 1st and one that you run from your indie editor(download link in my answer below)
Answer by nowhereman · Nov 14, 2010 at 07:10 AM
I'm really noobish, so I can't say I have a lot of experience, but I very recently was trying to do something similar in one of my games. What I did was make a GUI Texture in Unity and make it the size of the entire screen, in your case you would make it a blue-ish color, and then you could change the alpha value of the texture's color to make the texture mostly see-through. It's crude, but it worked really well for my project
Answer by UniqueMAX · Jul 03, 2015 at 03:04 PM
Create a fullscreen panel and give a color you want to it.
Your answer
Follow this Question
Related Questions
Water light seems affected by camera angle 0 Answers
How to make a lake that you can swim in 2 Answers
Can I get this water effect in Unity(free)? Image inside. 1 Answer
Combining multiple layers and water 0 Answers
My Water Or My Camera? 0 Answers