Loading Texture on startup

So currently I am using Unreal Engine 4.18 to make an application for my bachelor thesis about VR Therapy. The application will be a simulation for holding presentations.

My goal is to create an application, were the user can just drag and drop his presentation slides into a specific “textures folder” following a naming convention like Slide1, Slide2 … so that the game can take those textures and apply them to the materials.

I cam across Rama and his Victory Plugin, there is a node to load textures ((39) Rama's Extra Blueprint Nodes for You as a Plugin, No C++ Required! - Blueprint Visual Scripting - Unreal Engine Forums)

However I am not sure how to store those textures once I got them, there is no " set texture" node. Can someone help me getting this to work? The idea is that I will just create about 40 materials and when I start the game, load the slide texture from the given path to the Materials.

Thanks in Advance!

Create an array of type Texture2D and add the images there:

This will allow you to fetch them by index later on. Once you have the array, create a Dynamic Material Instance with a TextureSample converted to a parameter. Now you can fetch any existing index from the ImageArray and feed it to the Dynamic Material Instance.

If you prefer to fetch images by name, look into Map (Dictionary).

Hey, thanks for your reply!

The thing is also, I don’t know how to add the node " Set Brush from Texture" somewhow this is not available to me. I already created an array for changing materials ( another function), can i somehow add what you just said to my blueprints?

In the end I want the application to be able to store loaded textures into different materials, and after that the user can change the materials in runtime from one to another. ( material changing is working, but the part about loading and storing textures is not yet created)

Brushes in SetBrushFromTexture are used in UMG which handles user interface. Judging by the code above, it’s not something you need to worry about as you’re using meshes instead.

I do not have Rama’s plugin installed so I can’t give you a proper visual solution.

You already have an array MyChoices - I’m assuming it stores the textures you want. In BeginPlay for this blueprint, run the node that loads textures and and add them to the array like in the screenshot I posted.

If you populated the array manually (since material changing is working), you will need to Clear the array first - otherwise you’ll add the loaded textures to the end of the list rather than replace them.

If it gives you a headache, let me know. I’ll try to get my hands on the plugin.

edit: so it would look similar to this: