The inability to modify camera projection matrices in blueprint (and the extreme difficulty of doing it in C++) puts a big damper on several very creative effects.
Exposing the FMatrix on a camera lets us do fun off-axis projections like this:
Additionally, proper Portals and Mirrors may be implemented as well.
A blueprint node that allows for the creation and modification of arbitrary FMatrix objects and their application to Cameras and SceneCapture2D actors would be great to this end.
(It’s important they’re FMatrix objects and not FPerspectiveMatrix objects since FPerspectiveMatrix doesn’t support off-axis projection).
Same here. To modify the projection matrix, I followed the suggestions in this post and extended the GameViewportClient using my own draw method.
Replacing the projection and view matrix of the SceneView with my own results in blurry images as mentioned by KennyBobby.
Disabling AntiAliasing and MotionBlur removes these artifacts as well as any impact on the resulting image I usually would expect using a different projection - it just looks the same as if I never had changed the matrix at all, except for some messed up lighting.
So currently my assumption is that overriding the viewport client’s draw function is not enough to actually apply a different type of projection to the entire rendering process, but given that I am quite new to both Unreal Engine and implementing custom projections, that might be an entirely wrong conclusion and I’d appreciate any inspiration that might point me in the right direction
Guys. Is this possible for You to write an instruction how to achieve projection matrix effect (better on some surface) as it would be projection mapping or portal texture? Please!
Hi,
I am working on since few weeks on Unreal in order to make apps in a CAVE environment. I have already made a VRPN plugin, now I need to adapt the camera frustum (projection matrix) on real time. Does anyone have any news on how to access the projection matrix ? is it still impossible ? (my collegue did it on Unity in one afternoon …)
thx
You will need to make a plugin based on IHeadMountedDisplayModule or IStereoRendering (IHeadMountedDisplayModule is probably better because it will get loaded automatically by the engine). In there you need to implement GetStereoProjectionMatrix() and CalculateStereoViewOffset() to set the matrices. Search the engine source for FFakeStereoRenderingDevice or the Oculus plugin, I used those two as an example when I implemented it.
Also in a cave you will have an off-axis frustum, temporalAA does not play nice with it right now but you can disable it or apply this patch: https://github.com/EpicGames/UnrealEngine/pull/912
As for the link to the patch. You need to be logged in Github and have your github account linked with your Unreal Engine account else you will get a 404 page.
Hi Vinaxus
How did you manage to add off axis projection into a scene capture component 2D ? did you modify the UE4 source code into FScene::UpdateSceneCaptureContents ?
Thank you
hei man!
I am trying to work on a similar problem, could you please tell us how did you maneged how to modify the point of view ?
Do you have any part of code that you can share with us?
Thanks a lot man
Hey guys,
Does anyone have news on this topic? I’m currently looking for the matrix applied to this cam.
As a newbie, your help will be really appreciated.
Thanks a lot