What is a Viewport? (and what is a SceneCapture compared)?

Hi,

I´m getting really confused about what a viewport is in the unreal engine. Hope somebody can help me! =/

Here is where I am right now:
I have a SceneCaptureComponent2D placed somewhere. Since it can render the scene into a texture, there has to be a projection from the scene to the texture, doesn´t it?

I know that a SceneCapture has a TextureRenderTarget2D and with it you can get a RenderTarget with this code:

USceneCaptureComponent2D * RenderComponent
UTextureRenderTarget2D* RenderTexture = RenderComponent->TextureTarget;
FRenderTarget *RenderTarget = RenderTexture->GameThread_GetRenderTargetResource();

I know that a FSceneView inherits RenderTarget and has a methods to project world to screen and vice versa.

And a ULocalPlayer for example has a FViewPort which has a FViewPortClient which has a FSceneView, and can call ProjectWorldToScreen(...). But a SceneCaputeComponent2D does not have a Viewport for some reason!


Right now I dont get it any more. Can anyone tell me please what any of these classes should represent and how I can use them? Any Information would be helpful!

Thanks

Viewport in rendering terms mean render display on the screen, scene capture does not display captured scene on the screen just copy it to GPU memory so it has no viewport. Render Target is a texture which can be places on any surface and processed with the shader so viewport function can project it because view port don’t know where the render target is used and project position. You would need to do your own calculations depending on what where you use render target on.

Ok, now I get the difference between a ViewPort and a SceneCapture in terms of rendering.

But, there has to be some calculation to project the scene (3D Meshes) to the texture (2D Pixels), even in the SceneCapture, hasnt it?

I have no clue how to do these projection calculations on my own, so I wanted to use the build-in calculations for that. =/

Ok I found the solution of doing the projection without the need of the ViewPort class in this post