Search Unity

Tileable Testures or a single Image

Discussion in 'World Building' started by The_Nerd_Sherpa, Dec 11, 2018.

  1. The_Nerd_Sherpa

    The_Nerd_Sherpa

    Joined:
    Dec 11, 2018
    Posts:
    57
    I have a terrain that is 1536x2048 and I created a .PNG file with grass, beach, water painted on it. I can stretch the image to cover the entire terrain. Doing this gave me the ability to laydown multiple colors without taking up multiple texture slots.

    Question: Couldn't I just paint a high-detailed image and apply that? Result, Unity would only have to make one texture pass when rendering?
     
  2. gabrielw_unity

    gabrielw_unity

    Unity Technologies

    Joined:
    Feb 19, 2018
    Posts:
    963
    Sure...but imagine, if your image is 2048x2048, that'll be one pixel per meter, which would be supper pixelated (or super mushy, depending how you apply it). Quadruple that and you'll still only have 4 pixels per meter...and an ultra-massive PNG file, and it's still about 1/100th the size you really want.

    Tiling is a solid technique, as long as you are careful about breaking up repetition and not going crazy with the amount/complexity of materials you use.

    Or, you can look into solutions like this: http://amplify.pt/unity/amplify-texture-2/
     
  3. The_Nerd_Sherpa

    The_Nerd_Sherpa

    Joined:
    Dec 11, 2018
    Posts:
    57
    Thanks for the quick response!

    I understand your point.

    Would it be advantageous to use that technique to lay down color on the terrain, then go back over it with texture painting? Would this give me any performance increase?
     
    Last edited: Dec 11, 2018
  4. gabrielw_unity

    gabrielw_unity

    Unity Technologies

    Joined:
    Feb 19, 2018
    Posts:
    963
    Yep! :) Not sure what you mean in the second question there?

    If you try out the existing Unity terrain, it should do what you need with some nice tools, and there lots of great Asset Store extensions to make it even better :)
     
  5. The_Nerd_Sherpa

    The_Nerd_Sherpa

    Joined:
    Dec 11, 2018
    Posts:
    57
    "Would this give me any performance increase?"
    I read in a forum that you should limit the number of textures that are used on the terrain, preferably below 4. Each texture is a separate render pass. So I thought I'd get smart and use a single texture (PNG image) to get a base color on the terrain. Or was I begin fed nonsense?

    PNG Image:
     
    Last edited: Dec 11, 2018
  6. The_Nerd_Sherpa

    The_Nerd_Sherpa

    Joined:
    Dec 11, 2018
    Posts:
    57
  7. gabrielw_unity

    gabrielw_unity

    Unity Technologies

    Joined:
    Feb 19, 2018
    Posts:
    963
    I'm no expert on performance, and it varies wildly between platforms (mobile, PC, console...), however more than 4 shouldn't be a problem, that might be old advice or for a specific type of device.

    More importantly, using a single big image will be both perf-heavy and not look good up close. For an RTS, maybe...it all comes down to how close you'll get to the ground.
     
  8. The_Nerd_Sherpa

    The_Nerd_Sherpa

    Joined:
    Dec 11, 2018
    Posts:
    57
    Thanks for the help with this!

    This is for a 3rd person perspective.... so pretty close. I'll ditch the large image idea and use texture painting.