4
$\begingroup$

I'm making a Minecraft animation and the only way the render comes out with clean pixelated textures and not blurry textures is if I set the image interpolation in the shader node editor to Closest.

It seems that I have to do this for every kind of block. Is there a way I can just set closest to the default interpolation within a project (so whenever I have to append a new Minecraft object, it will have the right interpolation)?

If I can't set the interpolation to a default value, can I at least apply the Closest interpolation to everything in the scene?

$\endgroup$

2 Answers 2

6
$\begingroup$

I'll post another answer since this one will actually solve your problem (I hope). Use this script to set the interpolation of each and every one of your "Image Texture" nodes to "Closest" :

import bpy

for mat in bpy.data.materials:
    if not mat.node_tree:
        continue
    for node in mat.node_tree.nodes:
        if node.type == 'TEX_IMAGE':
            node.interpolation = 'Closest'

enter image description here

How to run a script

$\endgroup$
2
$\begingroup$

As far as I know you can't modify the default setting easily but you can use a simple node group to force the behaviour wherever you want to use your image texture node :

enter image description here

Related : https://blender.stackexchange.com/a/168033/86891

$\endgroup$
4
  • $\begingroup$ I realized by re-reading your question that this doesn't answer it... $\endgroup$
    – Gorgious
    Commented Apr 1, 2020 at 17:06
  • $\begingroup$ It could function as a workaround. Instead of adding a new Image Texture node every time instead add a new Group Node with an image texture already set as Closest Interpolation, then ungroup the node before regular use. $\endgroup$ Commented Apr 1, 2020 at 17:12
  • $\begingroup$ The problem is that I import the model from mineways, so it automatically creates the textures and nodes. But everything is set to Linear, so I have to go back to every single type of block and change the interpolation to Closest. I don't have to create nodes, just edit them. $\endgroup$ Commented Jun 9, 2020 at 13:32
  • $\begingroup$ Does my other answer help you ? $\endgroup$
    – Gorgious
    Commented Jun 9, 2020 at 15:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .