Language:
Page Info
Skill Level:
Engine Version:

3. Blueprint Setup

Choose your OS:

In this section, we will take a look at creating a Blueprint that will work with the assets that were created in the previous steps.

Blueprint Creation & Setup

To create a Blueprint that will work with both render targets and Materials, you will need to do the following.

  1. Right-click in the Content Browser and from the menu that is displayed in the Create Basic Asset section, select the Blueprint option to create a new Blueprint.

    Create_Blueprint_01.png

  2. From the Pick Parent Class window, select the Actor class and then name the Blueprint BP_Texture_Creator.

    Create_Blueprint_02.png

  3. Double-click on the BP_Texture_Creator Blueprint to open it up and once opened, click on the Event Graph tab to open up the Event Graph.

    Create_Blueprint_03.png

  4. Add the following Blueprint nodes to the Event Graph:

    • Custom Event

    • Draw Material to Render Target

    Create_Blueprint_04.png

  5. Select the Custom Event node and press F2 so that you can rename the Custom Event node to Bake. Then, connect it's output to the input of the Draw Material to Render Target node.

    Create_Blueprint_05.png

  6. Next, on the Draw Material to Render Target node, load the render target that was created previously into the Texture Render Target slot by clicking on the small white triangle next to Select Asset, and then from the list, find the render target RT_00 and select it by clicking on it. Once that is completed, do the same for the Material section, selecting RT_Material_00.

    Create_Blueprint_06.png

  7. Now, click on the Construction Script tab and drag off the Construction Script node to display the Executable actions menu.

    Create_Blueprint_09.png

    Please note that DrawMaterialToRenderTarget will not work in Construction scripts outside of the UE4 editor which means if you are trying to do this at runtime it will not work.

  8. From this menu locate the Bake event that was created by inputting Bake into the search box and once found, click on it to add it to the graph and then connect the output of the Construction Script to the input on the Bake node.

    Create_Blueprint_07.png

  9. Finally, press the Compile and Save buttons to compile and save your Blueprint.

    Create_Blueprint_08.png

Now that the Blueprint has been setup, in the next section, we will take a look at how you capture and save a Texture that displays what was created in the Material.