I am trying to make a really good looking game, but I am having some trouble. I found a cool asset that I would like to use (Sci-Fi Construction Kit (Modular) | 3D Sci-Fi | Unity Asset Store). When I load into the example scene I see weird pixelated lines from the normal texture of the floors farther away from me. I don’t know if it is because it is farther away or it is a shallower angle from the camera. My Quality is on ultra, I have tried setting all textures to no compression and a high max size but this doesn’t seem to work. When I take off the normal texture from the floors the issue goes away. The normal texture does add some nice detail so I would like to keep it
Is there some setting I missed or does it just need higher quality textures? If anyone could help I would greatly appreciate it.After a lot of searching I came across the mipmap bias value for the texture import settings. It is a hidden value for some reason so I had to figure out how to set it in code. Here is the code if anyone has this problem in the future.
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
[CustomEditor(typeof(TextureImporter))]
public class OverrideImportSettings : Editor
{
float hSbarValue = 0;
float prevvalue = 0;
public override void OnInspectorGUI()
{
base.OnInspectorGUI();
hSbarValue = GUILayout.HorizontalScrollbar(hSbarValue, 1.0f, -1.0f, 1.0f);
if (prevvalue != hSbarValue)
{
prevvalue = hSbarValue;
TextureImporter importer = (TextureImporter)TextureImporter.GetAtPath(Asset Path);
importer.isReadable = true;
importer.textureType = TextureImporterType.NormalMap;
TextureImporterSettings importerSettings = new TextureImporterSettings();
importer.ReadTextureSettings(importerSettings);
importerSettings.mipmapBias = hSbarValue;
importer.SetTextureSettings(importerSettings);
EditorUtility.SetDirty(importer);
importer.SaveAndReimport();
}
}
}