• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
Question by tannergilliland9 · Oct 17, 2022 at 06:56 PM · texturelightinggraphicsnormalsquality

Normal map causing lighting errors and pixelated lines at further distances or shallower angles.

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 (https://assetstore.unity.com/packages/3d/environments/sci-fi/sci-fi-construction-kit-modular-159280). 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 $$anonymous$$gh max size but t$$anonymous$$s 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 alt text Is there some setting I missed or does it just need $$anonymous$$gher quality textures? If anyone could help I would greatly appreciate it.

screenshot-2022-10-14-144817.png (522.1 kB)
Comment

People who like this

0 Show 0
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by tannergilliland9 · Oct 18, 2022 at 05:32 PM

After a lot of searc$$anonymous$$ng I came across the mipmap bias value for the texture import settings. It is a $$anonymous$$dden value for some reason so I had to figure out how to set it in code. Here is the code if anyone has t$$anonymous$$s 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();
         }
     }
 }

Comment

People who like this

0 Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image solosurge · Jan 19 at 03:32 PM 0
Share

I stumbled upon your question. Trying to figure out the same problem. The code you provided gives more options but doesn't really change anything. How do you get rid of those pixelated lines? Thanks

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

220 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How can I prevent lights overlapping in intensity? 1 Answer

Accidentally Clicked Refresh Assets and This Happened. How Do I Fix It? 0 Answers

Strange Circle On Wall Texture 0 Answers

Changing texture type to "Advanced" stops it from being affected when changing Quality Settings. Any way to get around this? 0 Answers

Implementing Custom Vertex Lighting Shader 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges