The UE4-UI panel displays the cutscene screen

Using RenderTexture in conjunction with the camera in U3D, you can display the image of the camera in the UI to make some dynamic display model effects. Found a similar method to implement the operation in UE4.

1. Create a TextureRenderTarget2D (rendering target 2D) named RenderTexture2D.

Double-click to open RenderTexture2D to set the size XY of TextureRenderTarget2D, which affects the clarity of the picture.

2. Search scene capture in the mode panel, select scene capture2D (scene capture 2D), and drag the camera to the scene

3. Create a cutscene and name it MatineeTest.

1. Add the SceneCapture2D created in the scene to the cutscene animation track, and add the transformation

2. Record cutscene animation content, the example here takes distance movement as an example

Note: No need to add camera switching track

4. Select the ScenCapture2D detail panel in the scene to set the ScneCapture texture target, you can select and drag, or select through the drop-down menu.

5. Create a material and name it RenderTextureMat.

1. In the material panel, set the material domain to user interface

2. Drag RenderTexture2D to the material editing panel, and connect RGB to the final color. save when done

5. Create a Widget and name it ShowMatineeWidget.

 

6. Use general/image to create controls

1. Set the Image size

2. In the Appearance panel, select the RenderTextureMat material ball for the image. Drag and drop or search for options yourself.

The preview interface can see the image.

In order to see the effect more clearly, I put a large white picture as the picture after the Image.

7. Edit display controls and play cutscene logic blueprint

1. It is convenient for testing, throw the cutscene animation directly into the scene, and use the level blueprint for demonstration

running result

The camera in the scene can still see the scene, and can also control the movement.

Remaining issues: CanvasRenderTarget2D can also be used to achieve the effect, and CanvasRenderTarget2D has not been used yet. to be learned.

Guess you like

Origin blog.csdn.net/lei_7103/article/details/110397443