- Home /
the easiest way to mask my scene
ok so basically what i have been trying to find out, is there basically a Photoshop equivalent to masking in unity. so in other words i want my camera to show black, and only reveal a circle around objects with certain objects in my scene. so is this possible ? i would really appreciate any advice. i uploaded a pic of what i want.
Answer by Yasien · Oct 08, 2015 at 07:43 PM
You have to go to GUI > Colors > Black Then the camera is all black. Then u have to write a script with a direction of the Camera.
Answer by Statement · Oct 08, 2015 at 07:16 PM
Yes, it's possible. I guess there would be several approaches you could take, but one would be to make an image effect. You could render spheres etc where the objects are through a special camera (basically ONLY rendering these spheres). You could write a shader that outputs white color/no alpha where any sphere would be rendered. The result would then be a texture which basically is your mask. Then you'd apply that texture to your final rendered image, possibly through another image effect.
Some recommended reading to get further:
Possibly replacement shaders, but most likely not
So to reiterate it:
Render your spheres to a mask (render-) texture using an auxiliary camera component. Don't render the rest of the world with this camera. Render the rest of your world with your normal camera, but exclude the spheres. Apply mask texture to final image.
Your answer
Follow this Question
Related Questions
How can i make the game area pitch black 2 Answers
Unity2D Sprite lighting Diffuse Material is just black 3 Answers
Darkened scene on Android build 0 Answers
Did i miss something about lighting ? It's not looking like the real survival shooter game 0 Answers
2D URP: Determine amount of light hitting object or specific point in scene 0 Answers