Search Unity

Material Tiling not working correctly

Discussion in 'Editor & General Support' started by KAB11, Feb 4, 2014.

Thread Status:
Not open for further replies.
  1. KAB11

    KAB11

    Joined:
    Dec 1, 2013
    Posts:
    14
    For some reason when I opened up unity today all my objects that are using materials are all messed up. It is something to do with the texture but I dont exactly know what is happening. Has nothing to do with the image I am using for the texture it is something to do with all the materials I make. Here is an image so you have an idea of what I am dealing with.

    $Capture.PNG
     
  2. SpookyCat

    SpookyCat

    Joined:
    Jan 25, 2010
    Posts:
    3,765
    Change the Wrap mode from Clamp to Repeat for the texture.
     
  3. Deleted User

    Deleted User

    Guest

    How is it I am referred to this Out of Date and irrelevant Solution? Considering this problem is back in unity 5.3 and was solved and is a problem with Unity's Material not Tiling itself not and not the texture itself? I already sent many examples of the same basic texture showing without smearing but the moment i try and adjust its resolution (tiling) to a smaller value such as 2x2 or whatever, it smears!
     
  4. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    9,052
    What are you talking about? Who referred you to this old thread and why? Your post doesn't provide any context, what is your actual problem?
     
  5. Deleted User

    Deleted User

    Guest

    If you read what I said its about Material not Tiling and Unity messing up the settings. The one that referred me to this thread was Unity's "report a bug" program. .
     
  6. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    9,052
    I read it, it is just not clear or complete. What is your question? Explain clearly what you are doing, what you are expecting to happen and what is actually happening. Ideally with some screen shots. All that is decipherable from your post it that you are having some kind of problem with texture tiling and something about smearing. If we can't understand what is going on, we can't help. Please start over, and clarify.
     
  7. Deleted User

    Deleted User

    Guest

    Forget it, I have responded and stated several times and I am getting tired of repeating myself.

    I don't comprehend how you are incapable of comprehending "textures" not tiling but instead being smeared. its self explanatory.
     
    rahulk1991 and madein83uk like this.
  8. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    9,052
    Huh? You literally have no posts explaining anything. Textures tile just fine. You are doing something wrong. Just saying "it doesn't work" is pointless without details. But, since you don't want help and are going to be a dick when people try help, good luck!
     
  9. Deleted User

    Deleted User

    Guest

    Final statement to this and then stop responding.

    1; the smearing is shown in the image provided by KAB11.
    2; Unity is doing this itself by importing things wrong and not to what its original defaults were.
    3; The problem is its changing textures to various types of sprites automatically and setting them to clamp.
    4; This is a problem that occurs after the updates went into affect.
    5; That causes the textures to not repeat (tile) as SpookyCat was talking about.
    6, As I stated one more time and for whatever reason you are incapable of comprehending, the reference to this post was through the Bug Reporting in the Engine itself.

    CAPISCE? UNDERSTAND? COMPRENDE?

    Now go away.
     
  10. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    User banned for a week til he gets manners.
     
  11. VDCSteve

    VDCSteve

    Joined:
    Mar 8, 2016
    Posts:
    1
    I have been experiencing a similar problem. Running version 5.3.2f1. I can't seem to get my materials to tile.
    I see that answer "change wrap mode from "clamp" to "repeat". Please forgive my inexperience, but could someone help me find where to do this? I don't see it anywhere. A screen shot would be much appreciated.
     

    Attached Files:

  12. crabman81

    crabman81

    Joined:
    Mar 11, 2016
    Posts:
    1
    First post, so here goes: (using Unity 5.3.2f1)

    Take a look at the image asset used on your texture. Wrap Mode is in the inspector there.

    Mine was Repeat by default when I imported the image asset, but I was still having the same problem you are. If this is the case for you:

    1. change the wrap mode from Repeat, to Clamp and Apply.
    2. Change the wrap mode back to Repeat and Apply again.
    Hopefully this works for you.

    Image Wrap Mode.png
     
  13. thieum

    thieum

    Joined:
    Apr 8, 2011
    Posts:
    61
    Bumped into this. Same issue with Unity 5.2 using a custom Lambert shader (based on the simple diffuse detail), where I have a base map (1x1 tiling size) on UV0, and several details maps on the UV1, scattered through a splat map (No surprise, it's a shader used on a terrain mesh).
    Everything works fine with the first detail map (first means first in variables declaration order), but every following maps just adopt the first detail map tiling size (250x250). If I change the other details map tiling (wanted a 100x100 for these extra maps), nothing happens, until I change the first map tiling parameter...

    TextureTilingLimitations.jpg

    More strange, if I make the first detail map use UV0, then it adopts the base map tiling (1x1), BUT the following shaders still use the first detail map tiling setting! There no logic in this behaviour...

    So it just look like a limitation in some surface shaders, that freezes the first 2 declared tiling sizes here:
    Code (CSharp):
    1. struct Input {
    2.     float2 uv_MainTex; // textures using these UVs coord also share a single tiling size
    3.     float2 uv2_Detail; // textures using these secondary UVs coord also share a single tiling size
    4. };
    _MainTex and _Detail are built-in references, adding something like "float uv2_ExtraDetail" won't work.
    Is this due to this particuliar Lambert shader model?
    Can someone recommend a workaround allowing more than 2 texture coordinates in the shader struct?
     
  14. ColdJackle

    ColdJackle

    Joined:
    Apr 29, 2016
    Posts:
    5
    Hi Guys, i'm stuck with this problem too. How come everyone just anwsers "set to repeat", even when the posters say, they have allready done that?

    Because: I did it. Multiple times. Still got these weird tiling issues on my tree :(

    upload_2016-4-29_12-13-21.png

    It's going wrong after the first tile, like this:

    upload_2016-4-29_12-14-5.png

    And like I said, repeat is set:

    upload_2016-4-29_12-14-51.png

    Please help me :(

    PS: Wow Arch_Warlock was an a*hole... This could be solved, if he just had the manners...
     
    NotSpideey likes this.
  15. fffMalzbier

    fffMalzbier

    Joined:
    Jun 14, 2011
    Posts:
    3,276
    @ColdJackle did you set the normal map on repeat too? it looks like the normal map is calsing this by not repeating.
     
  16. ColdJackle

    ColdJackle

    Joined:
    Apr 29, 2016
    Posts:
    5
    @fffMalzbier Hello, please excuse me for my late response. I switched to other tasks, as I couldn't get rid of the error. Yes, the normal map is set to repeat too. I actually remade the whole error by accident, haha. I forgot that I got that bug and tried to create a fir tree a few minutes ago. However the error remains with a complettly new tree...
     
  17. TaNkerTANGO

    TaNkerTANGO

    Joined:
    Apr 6, 2017
    Posts:
    1
    Had the same issue, but setting 'Repeat' on the texture helped just fine. Thanks
     
  18. RobKraudy

    RobKraudy

    Joined:
    Sep 22, 2017
    Posts:
    2
    well... same problem here in 2018
     
  19. benjaroach

    benjaroach

    Joined:
    Mar 30, 2017
    Posts:
    1
    I still wait. :(:(:(:(:(
     
  20. VenoxShred

    VenoxShred

    Joined:
    Nov 17, 2015
    Posts:
    3
    Same problem here in 2018.1

    It was working just fine yesterday and now I open the scene and the materials are just like that. Stretched.
    Changing to Clamp and going back to Repeat didn't fix it.

    When creating a new object with ProBuilder it works fine, but the moment I replace the ProBuilder material by any other material it gets all stretched out.

    Any idea?
     
    ow3n likes this.
  21. artofshashank

    artofshashank

    Joined:
    Feb 3, 2014
    Posts:
    1
    @fffMalzbier was correct in my case. I have 4 textures, and at least 1 was not set to repeat, in fact there were a lot of texture settings not matching between all 4 textures. Thanks!

    So catch all the textures of the given material together, and keep all their texture settings the same, except Normal map, whose Texture type should be Normal.
     
  22. soja_exiles

    soja_exiles

    Joined:
    Sep 16, 2017
    Posts:
    3
    It's strange, but it randomly happens even now. The repeat on the material does not help, and you don't want to create a new material in case many prefabs are referring to that specific material and will be too big of an issue to reattach it.

    What I found to works is to take the texture itself and pull it out of Unity to a folder on your desktop. Then delete the original texture within Unity, then pull back the texture from your desktop back into the original Unity folder and reattach the texture to the material. So you only need to do this process once per texture (albedo, normal) per material instead of once per prefab.

    Hope this helps.
     
  23. markgrossnickle

    markgrossnickle

    Joined:
    Aug 21, 2017
    Posts:
    32
    @soja_exiles suggestion worked for me. Delete file/meta and re-import. Something in the meta must be off. git showed too many changes for me to narrow it down but you could most likely just delete the meta file and force it to recreate it.

    This started happening to me when I reverted a project from 2018.2 to 2018.1. Like others, I am also using ProBuilder.
     
    mango_khan likes this.
  24. Dageor

    Dageor

    Joined:
    Aug 4, 2016
    Posts:
    6
    Try to switch a format of texture from .jpg to .png and change wrap mode on repeat in texture settings.
     
  25. AdamTegkelidis

    AdamTegkelidis

    Joined:
    Jan 22, 2019
    Posts:
    10
    Hey there! I am a new Unity user and I had been trying to figure out what is going on with the imported (from 3ds max) shaders;

    As a matter of fact, once I select an object and try to access its materials, all I get in the inspector tab is greyed-out options for the shader.

    Does this have to do with the fact that I am using the "free" version? Or is it something else that I am possibly doing wrong?

    Capture.JPG
     
  26. deliberative

    deliberative

    Joined:
    Dec 22, 2016
    Posts:
    12
    Hey Adam!

    You can't change material properties on a material that's built into a model, it has to be a distinct material file in your project library. If you want to extract a material so that you can edit it in Unity, select it in the Project window (it'll probably be a child of the object you imported) and then press CTRL+D to duplicate it (or go Edit->Duplicate). That'll create a copy of it that you can select and edit. You'll have to reattach that version of the material to any MeshRenderers you want to use it by dragging it into the Materials array of the MeshRenderer component. Of course, if those MeshRenderers are also a part of the imported object, they'll probably be greyed out too if you select them in the Project window. You'll have to drag the object into your scene, reassign the materials, and then (if you want) resave the whole thing as a prefab by dragging it back into your a folder in your Project window.
     
    AdamTegkelidis likes this.
  27. AdamTegkelidis

    AdamTegkelidis

    Joined:
    Jan 22, 2019
    Posts:
    10
    Hey @deliberative

    Great to hear from you. Thank you so much for the explanatory and rapid reply! I will look into it asap, it is just such a shame that things which are normally considered pretty much default or simple have to be done in such a weird and kinda complicated way.

    Again, many thanks!

    A.
     
  28. AnnieCat

    AnnieCat

    Joined:
    Apr 13, 2015
    Posts:
    2
    Same issue, and managed to find a solution.

    I was working in Unity 2018 1.1f3, where I made part of an environment using probuilder.

    I exported that package and imported it into Unity 2018 1.1f1, where this error came out.

    It is NOT related to the texture's import settings (clamp vs. repeat.) The issue has to do with the material. I tested my theory by importing the raw asset into a clean 2018 1.1f1 project, and the material tiling was fine.

    My solution, tiring as it is, is to just rebuild the scene clean of any probuilder influence. At least I don't have to redo all the UVWs...
     
  29. OlliIllustrator

    OlliIllustrator

    Joined:
    Nov 1, 2013
    Posts:
    71
    I just stumbled upon the tiling not working when testing an asset bought in Assetstore that I brought into Unity 5.67 for a project I have been working on for quite some time and that stys in Unity 5.6 because it would break in newr Unities due to several shader and deprecated asset code reasons.

    Weirdly no matter how I set Unity's import settings the tiling never worked.
    I noticed it on several textures in the asset pack (Victorian Interiors, awesome and well organised asset btw.), some were Tiff, some were Png files.

    Then I opened one png texture in Photoshop and saved again as Tiff file.
    The Tiff texture tiling worked.

    I could not see any difference in Import settings between Tiff and png version.
    When I saved again a png file from the Tiff the tiling in the new png file worked.
    When I opened the original not tiling png and saved again in Photoshop it did not work. When I saved png from Photoshop under a new name the tiling of that worked.

    I tried to change all possible options for Unity texture import but no change.
    Seems that Unity (in my case 5.67) somehow caches Texture data somewhere and that sabotages tiling in some cases? No idea.
    But the solution is:
    Open texture in an image processor an save either under a new name or in a different format to get Unity to work with these .
     
  30. MODev

    MODev

    Joined:
    Jul 30, 2013
    Posts:
    229
    I had the same problem but when I manualy removed those lines from config:

    textureSettings:
    serializedVersion: 2
    filterMode: -1
    aniso: -1
    mipBias: -100
    wrapU: -1
    wrapV: -1
    wrapW: -1

    and reimported the texture, I was able to successfuly set repeat wrap mode for texture. On diff I've checked and values changed into:
    mipBias: -1
    wrapU: 0
    wrapV: 0
    wrapW: 0
     
  31. dninosores

    dninosores

    Joined:
    Feb 1, 2020
    Posts:
    1
    I was having this issue because I was importing a 3D model from Blender and the UV map was too small. I think that if you import a 3D model that's already UV mapped, the UV map will prevent the tiling from happening. I ended up getting the texture to tile by making the UV map larger in Blender.
     
  32. deplorablemountaineer

    deplorablemountaineer

    Joined:
    Jun 16, 2018
    Posts:
    12
    Hello, I just had the problem, and this thread gave me the piece of information needed to solve it. (in Unity 2020.2).

    It seems, my import presets (a recent feature) had tiling set to Clamp for some textures (particularly, for Ambient Occlusion textures). That was enough to make some tiled materials look horrible.

    So, I made sure all import presets had tiling set to Repeat instead of Clamp, and then reimported all the textures to apply the settings.

    If you didn't use import settings presets (i.e. Unity's default settings were applied on import) to import textures like I did, you would want to select all textures meant to tile and change Clamp to Repeat. Do this for diffuse/base color, normal, AO, every texture used in the material.

    If you are not familiar with the presets feature, https://docs.unity3d.com/Manual/Presets.html gives the rundown. They make it easier to, for example, make sure textures whose names end in "_normal" are automatically imported as normal textures.
     
Thread Status:
Not open for further replies.