-
-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Image Texture node set to Linear instead of Closest in Blender import #132
Comments
AFAIK this is a limitation with the OBJ/MTL file format, you can't change the texture filtering. The best workaround is to make a script to change each texture, then it's a 1 click fix. Another way is to just export the textures at 8x scale from jmc, then it will be less blurry with linear interp but you will use way more ram loading them and they will still be blurry close up; so it's not ideal. |
Another way would be to export Blender files directly, but then the project would be jmc2blend not jmc2obj. We considered this a long time ago, but people ususally figured out ways to deal with it. I'd look for some Blender extensions, if anyone's made them. |
Here's a python script to change the interpolation of all the textures of all the materials of the active object:
You can paste this into the text editor in blender, and run it. |
MCprep also does all this |
Just a FYI: I tried to implement COLLADA 1.4.1 and realized that Blender (3.0.0) nor Unity (2021.2.8) support the file format sufficiently, the supplied texture filtering gets ignored by Blender/Unity.
|
This script works for me instead for some reason. I'll leave it here just incase. 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" |
when importing the .obj into blender 2.82, all image texture nodes are set to linear by default making the textures blurry, changing them to closest fixes the issue but would take forever to change every individual material back to closest. Can this be the default?
The text was updated successfully, but these errors were encountered: