# Use a Material File

**URL:** <https://forums.unrealengine.com/t/use-a-material-file/232159>\
**Category:** C++\
**Tags:** unreal-engine\
**Created:** [May 29, 2021, 11:16am UTC](https://forums.unrealengine.com/t/use-a-material-file/232159 "2021-05-29T11:16:17Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![jwatte](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/jwatte/32/744941_2.png) [@jwatte](https://forums.unrealengine.com/u/jwatte)\
**Post date:** [May 31, 2021, 4:31am UTC](https://forums.unrealengine.com/t/use-a-material-file/232159/4 "2021-05-31T04:31:37Z")

</div>

You can make the texture be a parameter of the material, and create a dynamic material instance, and then configure a runtime generated (loaded) texture into that material.

A: terrain → material → Dynamic Material Instance (“MID”)  
B: texture on disk → bitmap in RAM → Runtime texture  
Configure B as the texture parameter on A. Done!

You may need to use a little bit of C++, but there’s reasonable suggestions of a few different approaches:

> **[Is it possible to load an image at runtime?](https://forums.unrealengine.com/questions/205006/is-it-possible-to-load-an-image-at-runtime.html)**
>
> I am making a game where the player can have custom emblems. My question is: Is it possible to load an image at runtime to use it as an emblem?

It mainly boils down to using something like Ramas plugin (or writing your own similar C++ code):

> [@(39) 's Extra Blueprint Nodes for You as a Plugin, No C++ Required!](https://forums.unrealengine.com/t/39-ramas-extra-blueprint-nodes-for-you-as-a-plugin-no-c-required/3448#post210419):
>
> Dear Community, star2 Newest Awesome star2 (In Complimentary (no cost) Victory Plugin!) Now You Can Get the Text Output (STDOUT or STDERR) from any .exe program, straight into Unreal Engine! is the output of zap a video compression commandline tool ([Handbrake](https://handbrake.fr/)), zap launched by your UE game & delivered straight into the Unreal Engine Viewport! zap rose Using only 3 Blueprints nodes! rose zap[Full Details and UE4 C++ Code](https://forums.unrealengine.com/t/39-ramas-extra-blueprint-nodes-for-you-as-a-plugin-no-c-required/3448/2644) MIT Software License for The…

---

_[View the full topic](https://forums.unrealengine.com/t/use-a-material-file/232159)._
