# 一定時間でランダムに画像を変更させる方法

**URL:** <https://forums.unrealengine.com/t/topic/357281>\
**Category:** Rendering\
**Tags:** unreal-engine, question\
**Created:** [May 13, 2016, 1:19am UTC](https://forums.unrealengine.com/t/topic/357281 "2016-05-13T01:19:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_a6021755](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a6021755](https://forums.unrealengine.com/u/anonymous_user_a6021755)\
**Post date:** [May 13, 2016, 1:19am UTC](https://forums.unrealengine.com/t/topic/357281/1 "2016-05-13T01:19:44Z")

</div>

サイコロのような立方体の1面にマテリアルを貼り付けます。

1面いっぱいに正方形のテクスチャが貼られているものです。

そのマテリアルを一定時間（3秒ごと）に、50枚のテクスチャからランダムに切り替えるようなことはできますでしょうか。

---

<div class="post-metadata">

**Author:** ![tamfoi](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/tamfoi/32/984280_2.png) [@tamfoi](https://forums.unrealengine.com/u/tamfoi)\
**Post date:** [May 13, 2016, 6:08am UTC](https://forums.unrealengine.com/t/topic/357281/2 "2016-05-13T06:08:09Z")

</div>

3秒毎などのEventはTimer系のノードを使えば実装できます。

参考：[https://docs.unrealengine.com/latest/JPN/Gameplay/HowTo/UseTimers/Blueprints/index.html](https://docs.unrealengine.com/latest/JPN/Gameplay/HowTo/UseTimers/Blueprints/index.html)

50枚のTextureを切り替えるのはDyanamicMaterialInstanceにしてSet Texture Parameter Valueで切り替えていくのが楽だと思います。

参考：[インスタンス化マテリアル | Unreal Engine ドキュメント](https://docs.unrealengine.com/latest/JPN/Engine/Rendering/Materials/MaterialInstances/index.html)

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_a6021755](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_a6021755](https://forums.unrealengine.com/u/anonymous_user_a6021755)\
**Post date:** [May 15, 2016, 12:41am UTC](https://forums.unrealengine.com/t/topic/357281/3 "2016-05-15T00:41:28Z")

</div>

tamfoi様

ご回答ありがとうございます。

解決への指針が見えてきました。

まだまだ勉強不足なので参考先を見まして実装できるようにがんばってみようと思います。

ありがとうございます。
