I experimented with the “XRay” shader in the Wiki and full screen “Noise Effect” to get a pretty cool effect, but it’s not what I’m looking for. Anyone know how to make an infrared shader in Unity? I wouldn’t even know where to start…
Well… I’ve got a half decent night vision shader so far using the “grayscale” and “noise” filters. Any other ideas?
Try the Color Correction shader set at either RGB -.25, .25, -.25 + Noise (greenish night vision) or RGB .25, -.25, -.25 + Noise (sort of a red night vision) or even RGB -.25, 0, .25 + Noise (a bluish night vision that i’ve seen before).
Else you might try modifying the Sepia shader’s Y colorspace and sepiaConvert values (save as new unless you want to lose your Sepia shader!).
There are other ways, but that might be the quickest to get you started in color ![]()
This is weird: I’m trying to use both the “grayscale” and “noise” filters together on a camera that is rendering to a GUItexture and get this error:
I think something’s buggered because anytime I try to use two filters on the same camera I get the same error. :?
Strange, perhaps try restarting Unity. I know there is a bug when using filters + 2 cameras. Also, I don’t think you can apply full screen image effects to GUI objects unless you are not using GUIText / Texture for your GUI (i.e. using 3D objects instead).
Yeah, tried that, no joy. Also created a new project, fresh import of assets, still no joy.
Hmm… seems to work OK if I apply the filters to the “main” camera instead of the “map” camera.
Yeah, looks like that’s what I’m running into. Using a 3D object won’t work I’m afraid, I want to over lay another graphic border on top of it and will be using other effects, so I’m afraid using a “real” 3D object would run into problems.
What’s weird is that it was working there for a short while yesterday. Then suddenly it stopped working and started giving me an error. Weird.
Any other ideas or work-arounds?
Yeah weird that it was working. Are you sure you didn’t change anything since it working and not working? Happens to the best of us sometimes ![]()
When you want something outside of just 2D images pasted on screen, most 3D games use a 3D GUI (even if it’s just images on flat planes) and some form of camera culling to achieve it, even outside of Unity games. Are you sure there’s no way to get what you want using this method?
Without knowing more about what you’re trying to achieve I can’t say.
Typically night vision is a scene effect, coupled with special “night vision” copies of the UI (3D or 2D), rather than trying to add one effect that gives a desirable night vision effect for both scene UI. Maybe post a screen shot and /or detailed description of what you’re after to go further here.
I was experimenting with the effects, got it almost perfect, then suddenly I started to get this error.
Well I gave it a shot. Created a plane, gave it a render to texture, and then got the error again. No GUItextures in the game, and still getting the error. It works fine on the main camera, but when I do a “render to texture” I get the error. Something’s got to be messed up here…
Here’s a mockup of what I’m trying to achieve: a HUD with a second camera that has 2 image effects running on the second camera. The HUD has buttons and a text read out, so will need some GUItextures and GUItext.
I wonder if one of my Standard or Pro assets got buggered by accident?
Ok, the way I understood this issue: more than one image effect does not work when a camera renders into a regular (power of two) render texture. I have reproduced this and it does look like a bug.
At the moment you could try merging two image effects you’re using into one (it will be faster as well). Is it Grayscale and Noise that you’re trying to use? Are you using texture ramp / ramp offset in the Grayscale effect?
Cool idea. Yeah for that, perhaps you won’t have need for 3D GUI.
Yeah perhaps. Maybe import Standard and Pro packages (one at a time) and test if you still get the error.
As for the error msg, do you recall what you were changing when you “got it almost perfect,” just before the error appeared? Also, does it give the error when you use a different image effect, other than Greyscale?
Also, I’ve found on very rare occasion, resetting the computer resolved full screen effect weirdness (typically brought on when enabling / disabling a slew of image effects while the game is playing). This is extremely uncommon tho.
Else, I’d say double-check your inspector values (shaders usually complain if somehow a needed reference is unspecified or missing) and if it persists, use the Report Bug app to notify OTEE.
- Edit; looks like Aras, you, slipped in just under my reply (yea confirmed bug!) so feel free to ignore my post.
Looking at the image i actually wonder why you want to use a render texture at all.
Why not just make the hud camera be a normal camera with a smaller viewport area. Then use your image effects on it and on top of it put some gui textures with alpha channel to do the carve out effect.
Joachim, I think using Render Texture as such was just in effort to understand problem.
bigkahuna originally intended to use a camera with GUI hud and I had suggested that he try a 3D object to better understand the problem (not knowing exactly what he wanted to do). His mockup image cleared that up for me.
Dooh! What a dope I am! That’s what I was doing wrong. I was experimenting with cameras and GUItextures and when the render to texture didn’t work I forgot what I had originally done.
Ok, got it working perfectly now. Thanks!
Ahh it happens heh. Great to hear that you got it working!
Great. So you have it working now and I have fixed the bug. This proves there can be situations where both sides win! 8)
