# How do I use ComputeMipLevel node in material editor?

**URL:** <https://forums.unrealengine.com/t/how-do-i-use-computemiplevel-node-in-material-editor/361529>\
**Category:** Rendering\
**Tags:** example, mipmap, unreal-engine, Rendering, question\
**Created:** [June 21, 2016, 9:31am UTC](https://forums.unrealengine.com/t/how-do-i-use-computemiplevel-node-in-material-editor/361529 "2016-06-21T09:31:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_0c35de84](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0c35de84](https://forums.unrealengine.com/u/anonymous_user_0c35de84)\
**Post date:** [June 21, 2016, 9:31am UTC](https://forums.unrealengine.com/t/how-do-i-use-computemiplevel-node-in-material-editor/361529/1 "2016-06-21T09:31:02Z")

</div>

![95344-computemiplevel.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/5/4/e54c624a3a23df04dbf79e4b05a1b858ac3dab05.jpeg)

How do I use **ComputeMipLevel** node in material editor?

Is is possible to change _mip level_ of material using this node?

How do i activate _custom data 0_ and _custom data 1_ pin?

Please explain with example.

---

<div class="post-metadata">

**Author:** ![Roel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Roel](https://forums.unrealengine.com/u/Roel)\
**Post date:** [June 21, 2016, 12:25pm UTC](https://forums.unrealengine.com/t/how-do-i-use-computemiplevel-node-in-material-editor/361529/2 "2016-06-21T12:25:55Z")

</div>

![95349-material.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/7/f/d7fec44dce2db24e0d9b574e4337a0bbbc2acbc2.jpeg)

Q1: How do I use ComputeMipLevel node in material editor?

A1: Hook it up like it is shown in the image, You can use the output of the miplevel for whatever you like.

* * *

Q2: Is is possible to change mip level of material using this node?

A2: Materials don’t set the mip level, samples of a texture do this for the texture it is sampling. In the image it shows a Sample node in which you can hook up the Level, which is the mip level. To see this input you need to set MipValueMode on the Sample node to MipLevel instead of None.

* * *

Q3: How do i activate custom data 0 and custom data 1 pin?

A3: Click on the main material node, in the material tab it has an option “Num Customized UVs”, set this number to the amount of custom variables you would like to have in the main material node. It basically mean it will run the code in the vertex program, si it will be cheaper. You can get the data by using a TextureCoordinate node. You don’y need it till you know what your trying to optimize.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_0c35de84](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_0c35de84](https://forums.unrealengine.com/u/anonymous_user_0c35de84)\
**Post date:** [June 21, 2016, 6:08pm UTC](https://forums.unrealengine.com/t/how-do-i-use-computemiplevel-node-in-material-editor/361529/3 "2016-06-21T18:08:45Z")

</div>

![95446-derivative+texture.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/4X/a/7/d/a7d5e4e07eb242f78e143401b0a88062b49af6c8.jpeg)

Thanks Roel for detail answers.

When I select mip level mode= derivative, What should I give as the inputs of DDX and DDY ?

When to use anistropic filtering, When not to use it ?
