1
\$\begingroup\$

I would like to render with any camera at any given time for a Portal clone project.

There's a USceneCaptureComponent2D but it renders the whole scene to a texture.

I don't need to render the entire scene. I would like to setup stencils to avoid unnecessary rendering. I don't think this component supports this.

Additionally, I would like to render directly to the main framebuffer - without render textures, which this component uses.

Is it possible to do something like this in Unreal Engine 4?

\$\endgroup\$

1 Answer 1

-1
\$\begingroup\$

It depends on what exactly you're trying to render without rendering the whole scene which is useful for things like security cameras.

If you're just trying to do a player preview in an equipment UI then you need to put the SceneCaptureComponent2D on the player itself then in the Scene Capture options, under Primitive Render Mode, choose "Use ShowOnly List" then, in the construction script of the player, get the SceneCaptureComp, get the ShowOnly list and add all unique items to the array with Self as the bottom pin.

\$\endgroup\$
1
  • 1
    \$\begingroup\$ I'm trying to render portals without using render textures. You're suggestion is actually a nice optimization for that specific case but I don't think it applies to mine :( \$\endgroup\$ Dec 10, 2020 at 22:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .