# Any way to get a custom projection matrix? (Specifically Beltrami-Klein projection)

**URL:** <https://forums.unrealengine.com/t/any-way-to-get-a-custom-projection-matrix-specifically-beltrami-klein-projection/487180>\
**Category:** Asset Creation\
**Tags:** projection-matrix, unreal-engine, question\
**Created:** [August 8, 2021, 2:18am UTC](https://forums.unrealengine.com/t/any-way-to-get-a-custom-projection-matrix-specifically-beltrami-klein-projection/487180 "2021-08-08T02:18:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![radsherwin](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@radsherwin](https://forums.unrealengine.com/u/radsherwin)\
**Post date:** [August 8, 2021, 2:18am UTC](https://forums.unrealengine.com/t/any-way-to-get-a-custom-projection-matrix-specifically-beltrami-klein-projection/487180/1 "2021-08-08T02:18:21Z")

</div>

I’m not opposed to modifying the code of the engine and recompiling if it needs to be done, just would like to know whether something like this is possible and how to go about it.

For reference: [Beltrami–Klein model - Wikipedia](https://en.wikipedia.org/wiki/Beltrami%E2%80%93Klein_model)

---

<div class="post-metadata">

**Author:** ![douglaslassance](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/douglaslassance/32/1210436_2.png) [@douglaslassance](https://forums.unrealengine.com/u/douglaslassance)\
**Post date:** [April 28, 2022, 9:11am UTC](https://forums.unrealengine.com/t/any-way-to-get-a-custom-projection-matrix-specifically-beltrami-klein-projection/487180/2 "2022-04-28T09:11:33Z")

</div>

There is a Blueprint getter but no setter.

![2022-04-28-02-00-56](https://d3kjluh73b9h9o.cloudfront.net/original/4X/f/7/b/f7b554ec43389a077e9e14ec1a7977c047099a17.png)

Here is also a [broken documentation link](https://docs.unrealengine.com/5.0/en-US/BlueprintAPI/Utilities/GetViewProjectionMatrix) for it.

I browsed the source a bit, and unfortunately, it does not look like there is a corresponding `SetViewProjectionMatrix` that can be exposed with a simple decorator.

---

<div class="post-metadata">

**Author:** ![enrico.lapponi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@enrico.lapponi](https://forums.unrealengine.com/u/enrico.lapponi)\
**Post date:** [April 28, 2022, 9:25am UTC](https://forums.unrealengine.com/t/any-way-to-get-a-custom-projection-matrix-specifically-beltrami-klein-projection/487180/3 "2022-04-28T09:25:43Z")

</div>

Not sure if this can be helpful for you but I found this article a while ago while looking for 3d portals in UE4.  
He discusses Projection Matrixes, but the implementation is done in c++, at least if you want a custom one.

> **[Creating Seamless Portals in Unreal Engine 4 | Froyok - Fabrice Piquet](https://www.froyok.fr/blog/2019-03-creating-seamless-portals-in-unreal-engine-4/)**
>
> In this article I cover how to create Portals in Unreal Engine 4. As I did not find any write-up that would provide enough details...

---

<div class="post-metadata">

**Author:** ![douglaslassance](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/douglaslassance/32/1210436_2.png) [@douglaslassance](https://forums.unrealengine.com/u/douglaslassance)\
**Post date:** [April 28, 2022, 7:28pm UTC](https://forums.unrealengine.com/t/any-way-to-get-a-custom-projection-matrix-specifically-beltrami-klein-projection/487180/4 "2022-04-28T19:28:28Z")

</div>

I know it’s not quite like modifying the camera projection directly, but if you are okay rendering through a render target you could use what is proposed [here](https://forums.unrealengine.com/t/scenecapturecomponent2d-custom-projection-matrix-4-17/406364). Same idea as @enrico.lapponi’s, but more directly what you were asking for.

All these Scene Capture 2D methods are also accessible via Blueprint, which means you could make this happen without touching code.
