Is it possible to load images and use them as textures through c++ only?

Right now I am working on a project that dynamically creates png and jpeg pictures at runtime, and I want to use the generated pictures as textures for materials that will be placed throughout the scene. I have tried to use other Unreal libraries like FImageUtils::ImportFileAsTexture2D but that results in the image being a very bright neon color:

Like this:


What’s strange is the general texture is loading correctly, but they are all being tinted by a random color. I’m not sure why this is occuring.

Here is an example png that I want to attach to a material:

Any help would be greatly appreciated.

1 Like