# About materails memory compsumition

**URL:** <https://forums.unrealengine.com/t/about-materails-memory-compsumition/91464>\
**Category:** UDK Content Creation and Design\
**Tags:** unreal-engine\
**Created:** [May 5, 2017, 6:52pm UTC](https://forums.unrealengine.com/t/about-materails-memory-compsumition/91464 "2017-05-05T18:52:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![CobaltUDK](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/cobaltudk/32/1194497_2.png) [@CobaltUDK](https://forums.unrealengine.com/u/CobaltUDK)\
**Post date:** [May 5, 2017, 6:52pm UTC](https://forums.unrealengine.com/t/about-materails-memory-compsumition/91464/1 "2017-05-05T18:52:34Z")

</div>

This is a doubt I have for a long time. For example in this image you can see that I have one texture and two materials that are exactly the same, but with different values in the texturecoordinate node:

 ![texturememory.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/e/2/e2412964479d76ea6101b9110213df7f772d2cfb.jpeg)

The texture is 1,33 Mbytes, and the two materials are 2 Mbytes, each.

What is the final memory compsumition in the game cooked, 1,33 Mbytes for the texture and a few bytes per each material? Or what the content browser shows, 1.33 + 2 + 2 Mbytes?

I’m using diferent materials that are basically the same, but with different texture coordinate values. If each one includes the same texture… it’s a lot of memory wasted.

---

<div class="post-metadata">

**Author:** ![DieByZer0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DieByZer0](https://forums.unrealengine.com/u/DieByZer0)\
**Post date:** [May 5, 2017, 7:30pm UTC](https://forums.unrealengine.com/t/about-materails-memory-compsumition/91464/2 "2017-05-05T19:30:21Z")

</div>

Why not use a material instance instead of a second material since its only some texturecoords you changed, What you would have to do is after your texture coord mask R and G and multiply R with one scalar and G with another scalar then append their end result and hook it into your texture.

Then inside your material instance change the texture coord values to your liking. (remember to input a default value of 1 on your scalars and name accordingly.)

Wouldn’t that make it the cheapest you can get?

---

<div class="post-metadata">

**Author:** ![CobaltUDK](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/cobaltudk/32/1194497_2.png) [@CobaltUDK](https://forums.unrealengine.com/u/CobaltUDK)\
**Post date:** [May 5, 2017, 10:19pm UTC](https://forums.unrealengine.com/t/about-materails-memory-compsumition/91464/3 "2017-05-05T22:19:17Z")

</div>

Yes, I was thought about using material instance, but that don’t resolves my doubt.

---

<div class="post-metadata">

**Author:** ![DieByZer0](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@DieByZer0](https://forums.unrealengine.com/u/DieByZer0)\
**Post date:** [May 6, 2017, 4:33am UTC](https://forums.unrealengine.com/t/about-materails-memory-compsumition/91464/4 "2017-05-06T04:33:40Z")

</div>

> [@CobaltUDK;704971](#):
>
> Yes, I was thought about using material instance, but that don’t resolves my doubt.

My reply is on the optimization side and not so much directly related to your question.  
I am guessing here that your final scene cost provided you use both those materials in your scene would be 2+2mb as the texture is already calculated as a cost inside those Materials, I could be wrong its not my area of expertise.

---

<div class="post-metadata">

**Author:** ![Chosker](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/chosker/32/710746_2.png) [@Chosker](https://forums.unrealengine.com/u/Chosker)\
**Post date:** [May 6, 2017, 7:51am UTC](https://forums.unrealengine.com/t/about-materails-memory-compsumition/91464/5 "2017-05-06T07:51:09Z")

</div>

memory-wise it’s still 1,33 MB. the material simply accesses the texture on memory but won’t duplicate it

---

<div class="post-metadata">

**Author:** ![CobaltUDK](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/cobaltudk/32/1194497_2.png) [@CobaltUDK](https://forums.unrealengine.com/u/CobaltUDK)\
**Post date:** [May 6, 2017, 6:47pm UTC](https://forums.unrealengine.com/t/about-materails-memory-compsumition/91464/6 "2017-05-06T18:47:59Z")

</div>

Sounds the most logic. Anyway I will use more the material instances as Diebyzer0 says. Thanks!
