UE4_How to set dynamic pictures in UI

Import into 3D scene/import into UI

1> Open PS, first split the desired dynamic picture into sequence frames (if there are sequence frames, please ignore this step and watch directly)

The prefix is ​​arbitrary, and after clicking to run, you will get some pictures like this

 

2> After the split is complete, merge the pictures into a contact form

 

For the rows and columns here, you can calculate the width and height pixels according to the number of your pictures * corresponding size. I have 26 pictures, and 5*6=30 pictures can be arranged.

3> The preparatory work is completed, open UE, import

We import both the picture sequence and the contact form into UE, and operate the picture sequence part first.

 

 

 After the creation is complete, select all the created Sprites and right click again

 

 

 The frame rate can be set according to the dynamic picture itself.

This can be directly dragged into the scene to display

 The effect shown in the figure above;

How to put it in the UI? Change this to material

Locate the previously imported contact form.

 Then create a new material, write like this

Just put it in the UI. If there is a problem with the playback order of the pictures, it means that the order of the joint table is wrong.

Change the names of the pictures to 01, 02...xx to regenerate a joint table chart. The B value of lerp here is the number of pictures/set number, for example: 26/30, so the last few A blank image will not be played.

The final effect in the UI

 

 


If it helps, please give it a thumbs up~thanks

Guess you like

Origin blog.csdn.net/qq_35337794/article/details/124818250