Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

UV-Layout question

Discussion in 'General Graphics' started by Olipool, Apr 10, 2015.

  1. Olipool

    Olipool

    Joined:
    Feb 8, 2015
    Posts:
    316
    Hi there,

    I have a question regarding the workflow for a specific usecase in texturing.
    Let's say I have a huge wall with no special details, it is modled with one simple plane. I would then make a small seamless texture and set my UVs so that it is repeating like 10 times or so.
    Now there should a small window/air vent/logo be added to the wall. I can come up with three solutions but neither seems very smart:
    -make a texture that is 10 times as big, repeat the tile manualy and place the window on the texture where I want it to be
    -make the texture a bit larger to squeeze the window beside the wall-tile, divide the wall-plane in 10 single polys and stack them all on the same position in the UV
    -make s separate object (one single poly), make a new texture with just the window and place the window slightly over the tiling wall

    It would be great if one could be able to put some tiling info in small parts of the UV/texture but this is not possible am I right?
    Are there other more neat solutions?

    Thanks a lot!
     
  2. Zomby138

    Zomby138

    Joined:
    Nov 3, 2009
    Posts:
    659
    Usually for a window, you would make a hole in the wall mesh.
     
  3. Olipool

    Olipool

    Joined:
    Feb 8, 2015
    Posts:
    316
    Ok thanks, but what about other details, a window is just an example. Let's say you have a small logo on a big, one colored house...
     
  4. ToMorning

    ToMorning

    Joined:
    Apr 8, 2015
    Posts:
    4
    Is there a reason you have to use a single plane for your wall? If not, you can assemble it out of multiple planes that have different materials using the same texture, but with different tiling settings.

    You can also make a separate plane with just the logo on it and position it slightly in front of the wall. If you use a material with an alpha channel, you can play around with its positioning inside of Unity. In the case of a window, you can use this method to overlay a frame on the hole in your wall and whatnot. You'll still need a hole if you want to be able to see through the window.
     
  5. Olipool

    Olipool

    Joined:
    Feb 8, 2015
    Posts:
    316
    Thank you, I just wasn't sure if the "plane-solution" is a standard one or just a hack for noobs like me :)
    Normaly I would model a window or decorations as extra but for a game like Cities:Skylines for example, this would be overkill since the buildings are numerous and are only seen from a certain distance.
     
  6. tawsm

    tawsm

    Joined:
    Nov 12, 2013
    Posts:
    43
    As ToMorning said, a single plane is a neat way of doing it. No reason not to do this. If you prefer another solution, you could use a decal, that's what they are there for.
    If your concern is texture memory, either make the plane/decal-logo-texture very small, or if you have multiple of those overlay-objects, create a whole 'atlas' of logos and arrange your uvs of the plane/decal accordingly.
     
  7. Olipool

    Olipool

    Joined:
    Feb 8, 2015
    Posts:
    316
    Ok thank you, decals sounds reasonable, I will look into this next :)