# How to get the perpendicular pixel from camera?

**URL:** <https://forums.unrealengine.com/t/how-to-get-the-perpendicular-pixel-from-camera/384840>\
**Category:** Rendering\
**Tags:** unreal-engine, vector, pixel, question, vectors\
**Created:** [February 13, 2017, 8:32pm UTC](https://forums.unrealengine.com/t/how-to-get-the-perpendicular-pixel-from-camera/384840 "2017-02-13T20:32:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Iacopo\_Antonelli](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Iacopo\_Antonelli](https://forums.unrealengine.com/u/Iacopo_Antonelli)\
**Post date:** [February 13, 2017, 8:32pm UTC](https://forums.unrealengine.com/t/how-to-get-the-perpendicular-pixel-from-camera/384840/1 "2017-02-13T20:32:38Z")

</div>

Hi, do you know how could I get the perpendicular pixel from camera? This is the effect I would achieve:

 ![126100-cattura.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/7/8/27863fdcbc2f7ecfa6500d02bca0959cba771926.jpeg)

I would like to create a sphere mask based on the camera perpendicular pixel of a plane. to create an “hole” on the plane that follows the camera along x-y and fades black when camera goes far away on z.

Any ideas?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_fbe5155f](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_fbe5155f](https://forums.unrealengine.com/u/anonymous_user_fbe5155f)\
**Post date:** [February 14, 2017, 12:17am UTC](https://forums.unrealengine.com/t/how-to-get-the-perpendicular-pixel-from-camera/384840/2 "2017-02-14T00:17:17Z")

</div>

I don’t think you can change a static mesh at runtime to have a hole in it. That’s why they’re called _static_ mesh.

That said, if your floor or sky is flat, then you could have a permanent hole that just moves with the camera, giving the illusion of a hole following the camera.

As for positioning “the hole”, you can use a line trace from the camera to the forward vector, but since you’re more like to just move the static mesh rather than do runtime boolean operations, you just need to move the floor/sky with the camera. 🙂

---

<div class="post-metadata">

**Author:** ![Iacopo\_Antonelli](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Iacopo\_Antonelli](https://forums.unrealengine.com/u/Iacopo_Antonelli)\
**Post date:** [February 14, 2017, 12:23am UTC](https://forums.unrealengine.com/t/how-to-get-the-perpendicular-pixel-from-camera/384840/3 "2017-02-14T00:23:38Z")

</div>

Sorry, for ‘hole’ i just mean a 0 value in the opacity mask, not an hole in the static mesh.  
By the way i resolved the issue, thank you 🙂

---

<div class="post-metadata">

**Author:** ![thevfxguy13](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@thevfxguy13](https://forums.unrealengine.com/u/thevfxguy13)\
**Post date:** [February 14, 2017, 1:37am UTC](https://forums.unrealengine.com/t/how-to-get-the-perpendicular-pixel-from-camera/384840/4 "2017-02-14T01:37:17Z")

</div>

Were you asking about the Fresnel node?
