Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Material in preview is good but no texture in game visible

Discussion in 'Getting Started' started by nerdnils, Dec 9, 2017.

  1. nerdnils

    nerdnils

    Joined:
    Dec 7, 2017
    Posts:
    36
    Hi there,

    topic explains it all, let me show some pictures:
    Material looks fine in preview:

    But in the game it is all one color(besides specular)no matter how I scale or what I do:

    What did I do wrong? And why is the preview that much different from the ingame material?

    Greetings
     
  2. Deleted User

    Deleted User

    Guest

    Could we have a screen shot of the full object in the inspector instead of just the material?
     
  3. nerdnils

    nerdnils

    Joined:
    Dec 7, 2017
    Posts:
    36
    Of course, here you are:


    It is the same for other materials, too. Like the metal.
     
  4. Deleted User

    Deleted User

    Guest

    This image show the inspector for the material not the game object in the scene. You must select the object to which the material is applied in the Hierarchy window so that we can see how it looks in the inspector.
     
  5. nerdnils

    nerdnils

    Joined:
    Dec 7, 2017
    Posts:
    36
    I am not really sure what you need to see. Is it in here?


    I played around and what I found out is that all my materials work fine on objects created in cycles. But those are way too simple for me. On any object imported from blender i have those issues. So what am I doing wrong with my objects in blender? Scale is applied and all normals are pointing in the right direction. I tried to mess around with the import settings but to no avail.
     
    Last edited: Dec 9, 2017
  6. nerdnils

    nerdnils

    Joined:
    Dec 7, 2017
    Posts:
    36
    Solution: Seems like it is absolutely mandatory for the objects to have uv-maps else those problems come up. Materials are fine if i create uv-maps.
     
  7. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Yes. UV maps tell the engine how a texture should be mapped onto the object. Without one, what can it do? I guess it probably just takes whatever color is in one corner of the texture, and applies that to the whole object.
     
  8. nerdnils

    nerdnils

    Joined:
    Dec 7, 2017
    Posts:
    36
    In blender there are other ways than uv I thought it could do that, too.
     
  9. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Not with the standard shaders. There are other shaders that apply the texture based on where each vertex is in space, but that's advanced stuff — I recommend you stick with the standard shader as a beginner.