# Reflective Textures

<figure><img src="https://2178109540-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLUy2H1mYN4QeaSWpm7%2Fuploads%2FJPDbSKGe9ZSoJO8X89Br%2Fezgif.com-video-to-gif%20(1).gif?alt=media&#x26;token=8ff37856-942c-4ea7-bf0f-e0d69307164f" alt=""><figcaption><p>The final result</p></figcaption></figure>

Most NPR materials use diffuse, non-reflective shaders for the basis of effects like cel shading. However, using either reflection texture coordinates or plugging a reflective shader (eg glossy/glass shader) into the Shader->RGB node, you can get textures that shift around in a metallic or glasslike way. This NPR technique was popularized by the anime Land of the Lustrous, and some examples of their advanced NPR crystals [can be seen here](https://www.youtube.com/watch?v=Kb9YmmQG4iQ).

The rest of this page will demonstrate how to create the above material in Blender Eevee. However, both reflection mapping and shader->RGB conversion can be done in a number of other render engines so this technique is by no means exclusive.

## Reflection Mapped Textures

Mapping textures to reflections in Blender is very simple: plug a texture coordinate node's 'Reflection' output into the coordinate input of a texture.\ <img src="https://2178109540-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLUy2H1mYN4QeaSWpm7%2Fuploads%2F8JppmTNo5ljHyB657fd6%2Fimage.png?alt=media&#x26;token=de9dbf63-4894-4c40-b320-47681c208848" alt="" data-size="original">\
Only two nodes, and it's already quite an interesting effect. When using reflection coordinates, it's best to use either procedurally generated textures like the voronoi here, or to use tiling image textures. Otherwise seams at the edges of textures will be obvious.

<figure><img src="https://2178109540-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLUy2H1mYN4QeaSWpm7%2Fuploads%2FI9UwjbSEDmpd0MjQLNPS%2Fezgif.com-video-to-gif%20(2).gif?alt=media&#x26;token=44dea00f-4afe-45c9-9e33-dfbea280472b" alt=""><figcaption><p>Converting it to grayscale simplifies things so that it can be used in a larger effect.</p></figcaption></figure>

## Reflective Shader->RGB

The other method to get reflective NPR is to use the 'Shader to RGB' node. The benefit of this technique is that the rest of the scene will affect the reflections, whether it's lights, HDRIs, or other objects.\
![](https://2178109540-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLUy2H1mYN4QeaSWpm7%2Fuploads%2Fq2tQDqvQIboVTTMm6GLd%2Fimage.png?alt=media\&token=d285eec8-e0d6-48a4-9942-414e0a31e4a1)\
The brightest parts of the metal shader are isolated, which happens to be where it's reflecting the bright parts of the HDRI. These make for interesting highlights!

<figure><img src="https://2178109540-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLUy2H1mYN4QeaSWpm7%2Fuploads%2FHGicFbJ8BotU0ZFDo8IK%2Fezgif.com-video-to-gif%20(3).gif?alt=media&#x26;token=918b616a-c288-4c68-b4ea-360b96cde277" alt=""><figcaption></figcaption></figure>

## The Final Material

Adding these two effects together and then giving them some color, here is what we get:

<figure><img src="https://2178109540-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLUy2H1mYN4QeaSWpm7%2Fuploads%2FJPDbSKGe9ZSoJO8X89Br%2Fezgif.com-video-to-gif%20(1).gif?alt=media&#x26;token=8ff37856-942c-4ea7-bf0f-e0d69307164f" alt=""><figcaption><p>You already knew it was going to look like this though</p></figcaption></figure>

<figure><img src="https://2178109540-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLUy2H1mYN4QeaSWpm7%2Fuploads%2F3KjDb8bnLwjZINlEKYlv%2Fimage_2023-03-20_190052037.png?alt=media&#x26;token=51ea35df-d9e9-45b0-8859-4d90ed70bdae" alt=""><figcaption><p>Nodes</p></figcaption></figure>

A final note about reflections is that they look quite different when the base mesh is changed, so try swapping out meshes and see what happens!

<figure><img src="https://2178109540-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLUy2H1mYN4QeaSWpm7%2Fuploads%2FtY9wxVBLuyTXYWhkHXvK%2Fezgif.com-video-to-gif%20(4).gif?alt=media&#x26;token=3ef23e5c-c529-4f77-b6f0-0b519916716f" alt=""><figcaption><p>Same Suzanne but with flat shading</p></figcaption></figure>

<figure><img src="https://2178109540-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLUy2H1mYN4QeaSWpm7%2Fuploads%2Fz5hZAcxqObekCEAgzig9%2Fezgif.com-video-to-gif%20(5).gif?alt=media&#x26;token=93921007-54dd-4c5d-b74c-8775ec5deca7" alt=""><figcaption><p>Same Suzanne but with chunky geometry!</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://bnpr.gitbook.io/bnpr/shaders/reflective-textures.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
