# How to scale and wrap individual tiles in a texture atlas?

**URL:** <https://forums.unrealengine.com/t/how-to-scale-and-wrap-individual-tiles-in-a-texture-atlas/1584011>\
**Category:** Rendering\
**Tags:** unreal-engine, editor, Rendering, Blueprint, question\
**Created:** [January 3, 2024, 7:01am UTC](https://forums.unrealengine.com/t/how-to-scale-and-wrap-individual-tiles-in-a-texture-atlas/1584011 "2024-01-03T07:01:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ExartaLtd](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/exartaltd/32/879126_2.png) [@ExartaLtd](https://forums.unrealengine.com/u/ExartaLtd)\
**Post date:** [January 3, 2024, 7:01am UTC](https://forums.unrealengine.com/t/how-to-scale-and-wrap-individual-tiles-in-a-texture-atlas/1584011/1 "2024-01-03T07:01:19Z")

</div>

Hello, I have been trying to scale and wrap (tile) a specific tile in a texture atlas.

Let’s suppose my texture atlas looks like this

 ![UV_checker_Map_byValle](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/b/0/1b0ee4e375769b5884f1f29aee571517b8bae209.jpeg)

When I scale the first tile up or down, it should look something like this

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/9/a/c9a60522cc9cd5088ac17c14bac9ed31db008a84.jpeg)  
 ![MI_TexAtlas_2 2024-01-03 11-47-17](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/a/c/dac61ac435a95b383c69ac331bf5a1db0c8a2da1.gif)

Which it does. I’ve been using the built-in MF named WrapFloat2 to get the job done on the first tile. But the problem with that function is that it wraps between 0 and the given end value to wrap at. So, the first tile, which starts at the UV Coord 0 tiles perfectly and scales. But when I move to tile 2 or tile 3, the wrap starts from the beginning since it is wrapping from the start. It then starts to look like this

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/3/2/b32c884b64ce63e487c1b986ad77da57d3e0ff47.jpeg)  
 ![MI_TexAtlas_2 2024-01-03 11-47-31](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/b/c/bbcf4971ea10eabb861ccd9b1f8b3ac4c9c0a733.gif)

My current Material setup looks like this

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/1/b/01b299d1b95f84025cae39d5d8568980efca2a11.png)

I have gotten both parts of the material that I want in the same material working separately.  
I have successfully been able to make a material with a texture atlas and have been able to pick the correct texture atlas and I have made a material that scales, tiles, and wraps perfectly but I haven’t been successful in making a material that both picks the correct atlas tile and scales it.

**PLEASE HELP!!**  
And thanks in advance.

---

<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:** [January 3, 2024, 8:47am UTC](https://forums.unrealengine.com/t/how-to-scale-and-wrap-individual-tiles-in-a-texture-atlas/1584011/2 "2024-01-03T08:47:36Z")

</div>

Not pretty, but it works 😉

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/7/a/27a73fc15c8befb80c6f7bcf0120c36223396143.jpeg)

---

<div class="post-metadata">

**Author:** ![ExartaLtd](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/exartaltd/32/879126_2.png) [@ExartaLtd](https://forums.unrealengine.com/u/ExartaLtd)\
**Post date:** [January 3, 2024, 10:01am UTC](https://forums.unrealengine.com/t/how-to-scale-and-wrap-individual-tiles-in-a-texture-atlas/1584011/3 "2024-01-03T10:01:33Z")

</div>

Thank you so much for your reply @ClockworkOcean

But I have been able to make a material that selects the individual tiles on an atlas.  
What I’m trying to figure out is, how to also scale any part of the atlas and have it be tileable like this

![MI_TexAtlas_2 2024-01-03 11-47-17](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/a/c/dac61ac435a95b383c69ac331bf5a1db0c8a2da1.gif)

For example, let’s suppose I select U4 and V5, which would be the tile E3. Now, how do I scale that part and have it be tileable like in the gif above.

Any insight would be much appreciated, thanks.

---

<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:** [January 3, 2024, 10:04am UTC](https://forums.unrealengine.com/t/how-to-scale-and-wrap-individual-tiles-in-a-texture-atlas/1584011/4 "2024-01-03T10:04:12Z")

</div>

Ah, sorry, my bad… ( thinks )

---

<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:** [January 3, 2024, 10:09am UTC](https://forums.unrealengine.com/t/how-to-scale-and-wrap-individual-tiles-in-a-texture-atlas/1584011/5 "2024-01-03T10:09:05Z")

</div>

I’d say, do the wrap float first

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/b/0/cb0d884382f8eb9d4b75b9f5ffb9a558a0ed71f3.jpeg)

( incomplete, but you get the idea )

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/f/1/1f14dcab5644e7d96415194f61ec0eb6fb3942e0.jpeg)

( bit more complete )

---

<div class="post-metadata">

**Author:** ![ExartaLtd](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/exartaltd/32/879126_2.png) [@ExartaLtd](https://forums.unrealengine.com/u/ExartaLtd)\
**Post date:** [January 3, 2024, 10:37am UTC](https://forums.unrealengine.com/t/how-to-scale-and-wrap-individual-tiles-in-a-texture-atlas/1584011/6 "2024-01-03T10:37:41Z")

</div>

Thank you so much @ClockworkOcean  
This was the solution!!

Here’s the Material with descriptions for anyone trying to replicate this in the future

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/0/2/6/026d41ce58c6f5067126a6b332e98cfd33f9a627.png)

Here’s the code if anyone wants to copy it from BlueprintUE  
[Resizable Texture Atlas Materials posted by anonymous | blueprintUE | PasteBin For Unreal Engine](https://blueprintue.com/blueprint/sqs62bzd/)

---

<div class="post-metadata">

**Author:** ![system](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/1/3/713c9d3f58553f0de89543d76a8a3a2779dc9fa4.png) [@system](https://forums.unrealengine.com/u/system)\
**Post date:** [February 2, 2024, 10:38am UTC](https://forums.unrealengine.com/t/how-to-scale-and-wrap-individual-tiles-in-a-texture-atlas/1584011/7 "2024-02-02T10:38:29Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
