# Material SubUV\_Function Random Starting Frame?

**URL:** <https://forums.unrealengine.com/t/material-subuv_function-random-starting-frame/489666>\
**Category:** Rendering\
**Tags:** subuv, random, unreal-engine, question\
**Created:** [October 8, 2021, 7:59am UTC](https://forums.unrealengine.com/t/material-subuv_function-random-starting-frame/489666 "2021-10-08T07:59:58Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![DarksunG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DarksunG](https://forums.unrealengine.com/u/DarksunG)\
**Post date:** [October 8, 2021, 7:59am UTC](https://forums.unrealengine.com/t/material-subuv_function-random-starting-frame/489666/1 "2021-10-08T07:59:58Z")

</div>

Hi,  
I’m using a Material SubUV\_Function to animate a material. But since I have many objects using that material I want each instance to have a random starting frame so as they loop they are not all in sequence. How can I do this. I’m not married to SubUV\_Function, so it doesn’t have to be that method.

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [October 8, 2021, 8:22am UTC](https://forums.unrealengine.com/t/material-subuv_function-random-starting-frame/489666/2 "2021-10-08T08:22:26Z")

</div>

You could do something based on object position, like this:

 ![350045-screenshot-1.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/4/f/8/4f8ee696306db208218f16cf8bcf96f7b3afb487.jpeg)

![350046-rand.gif](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/f/9/cf9518b08cf65cdf71c08f0daf481fa5f5d63aeb.gif)

---

<div class="post-metadata">

**Author:** ![DarksunG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DarksunG](https://forums.unrealengine.com/u/DarksunG)\
**Post date:** [October 8, 2021, 7:53pm UTC](https://forums.unrealengine.com/t/material-subuv_function-random-starting-frame/489666/3 "2021-10-08T19:53:59Z")

</div>

I definitely can, my problem is that if I want to use that I can’t have linear animation.

I tried to use position to add a random number to the frame, but I couldn’t quite get it to work. any ideas?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [October 8, 2021, 8:02pm UTC](https://forums.unrealengine.com/t/material-subuv_function-random-starting-frame/489666/4 "2021-10-08T20:02:26Z")

</div>

Are the objects moving?

An easier way to do it, would be to pass the current frame you want played from blueprint to a material instance on the object.

---

<div class="post-metadata">

**Author:** ![DarksunG](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DarksunG](https://forums.unrealengine.com/u/DarksunG)\
**Post date:** [October 8, 2021, 8:46pm UTC](https://forums.unrealengine.com/t/material-subuv_function-random-starting-frame/489666/5 "2021-10-08T20:46:14Z")

</div>

it is moving. how would I pass the frame to the mat?

---

<div class="post-metadata">

**Author:** ![ClockworkOcean](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/clockworkocean/32/1169999_2.png) [@ClockworkOcean](https://forums.unrealengine.com/u/ClockworkOcean)\
**Post date:** [October 8, 2021, 8:52pm UTC](https://forums.unrealengine.com/t/material-subuv_function-random-starting-frame/489666/6 "2021-10-08T20:52:01Z")

</div>

Here’s the quick answer, because I don’t have much time now.

Put the mesh in a blueprint, assign a dynamic material instance, choose your random start frame on begin play and change frames on a timer.

Just come back to me if that’s not enough ( or I’ve missed something ), and I’ll drop some code tomorrow…
