# Dynamic Textures kills FPS on Android

**URL:** <https://forums.unrealengine.com/t/dynamic-textures-kills-fps-on-android/363886>\
**Category:** Debugging, Optimization, & Profiling\
**Tags:** profiling, lag, unreal-engine, fps, Android, question\
**Created:** [July 13, 2016, 2:23pm UTC](https://forums.unrealengine.com/t/dynamic-textures-kills-fps-on-android/363886 "2016-07-13T14:23:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DannRees](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DannRees](https://forums.unrealengine.com/u/DannRees)\
**Post date:** [July 13, 2016, 2:23pm UTC](https://forums.unrealengine.com/t/dynamic-textures-kills-fps-on-android/363886/1 "2016-07-13T14:23:52Z")

</div>

I’ve implemented painting dynamic textures by following the tutorial here…

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

I’ve had it working for about a week and all was good. I tested it on Android (Galaxy S5) initially and seemed to work great with a 2048 texture. However, since yesterday suddenly the FPS is dropping from 60 to 10 when I start painting?! However, most of the time it drops immediately, sometimes after a second or two.  
When I stop painting it doesn’t immediately return to 60, but slowly climbs back up after a few seconds. I’m also testing it on an iPad Mini 2 (with Metal disabled) and the problem does not exists (or in the editor for that matter). But as I said, it was working fine previously and the code hasn’t changed at all. I tested it on an empty map to make sure that nothing else was causing it but the issue remains.

I have no idea what could have caused this? I saved the profiling info from the device but it’s not very helpful as there’s very little meaning to what it actually shows. I have no idea what FFileTransferRunnable, FMessageBus or what started Thread\_6899. There doesn’t seem to be much in the way of documentation on these things as far as I can find?

Any help appreciated. I’ve attached the profiling data.

Cheers

link text

---

<div class="post-metadata">

**Author:** ![DannRees](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DannRees](https://forums.unrealengine.com/u/DannRees)\
**Post date:** [July 15, 2016, 3:25pm UTC](https://forums.unrealengine.com/t/dynamic-textures-kills-fps-on-android/363886/2 "2016-07-15T15:25:55Z")

</div>

Solved the problem by only updating the modified region. But that then broke it on iOS ☹

```
PaintRegion.SrcX = cellX - halfBrushSize;
PaintRegion.SrcY = cellY - halfBrushSize;
PaintRegion.DestX = cellX - halfBrushSize;
PaintRegion.DestY = cellY - halfBrushSize;
PaintRegion.Width = brushSize;
PaintRegion.Height = brushSize;

```

More info here…

> **[UpdateTextureRegions problem/bugs on different platforms](https://forums.unrealengine.com/questions/453118/updatetextureregions-problembugs-on-different-plat.html)**
>
> I’ve implemented real-time texture (splat map) painting in C++. However I’ve got a couple of issues. The texture is 2048x2048 and performance on Android (Galaxy S5) was awful, but just fine on an iPad Mini 2. I fixed the issue on Android by...
