Search Unity

  1. Unity 2018.3 is now released.
    Dismiss Notice
  2. The Unity Pro & Visual Studio Professional Bundle gives you the tools you need to develop faster & collaborate more efficiently. Learn more.
    Dismiss Notice
  3. Want more efficiency in your development work? Sign up to receive weekly tech and creative know-how from Unity experts.
    Dismiss Notice
  4. Build games and experiences that can load instantly and without install. Explore the Project Tiny Preview today!
    Dismiss Notice
  5. Want to provide direct feedback to the Unity team? Join the Unity Advisory Panel.
    Dismiss Notice
  6. Improve your Unity skills with a certified instructor in a private, interactive classroom. Watch the overview now.
    Dismiss Notice

UV Editor - Resizing the texture?

Discussion in 'World Building' started by ptgodz, Dec 6, 2018.

  1. ptgodz

    ptgodz

    Joined:
    Aug 4, 2016
    Posts:
    87
    Hey guys. I'm starting out with probuilder and I'm struggling to understand the UV side of it. When I try to export my UVs nothing seems to be visible unless I shrink them all to fit in the little box. I don't know what to actually call it. Texture viewport? I've attached an image of what I'm on about. I'm assumning that all UVs I want to export must be within this area. Is it possible to enlarge the size of this area? Thanks
    uveditor.png
     
  2. gabrielw_unity

    gabrielw_unity

    Unity Technologies

    Joined:
    Feb 19, 2018
    Posts:
    229
    Hi! Yep, UVs are...well, for me, they took a few months to learn, then they "clicked" :)

    Basically, only that little box matters, and everything else is just repeating (or, "tiling", as it's called here). UVs can go outside the box, but they'll just get mapped to their "tiled" position. Here's an easy way to think of this: the UV box is 0 to 1, on both axis. So a pixel in your texture is always at something between 0 and 1 (far left/bottom or far right/top). If you move UVs outside of the box, to something like 12.75, the whole number just gets chopped off- so that becomes .75 instead of 12.75.

    The good news is- that little box is actually an infinite sized box. Zoom in and fit all your UVs in, there, you'll never lose quality (other than your texture resolution).

    Hope that helps!
     
    ptgodz likes this.
  3. ptgodz

    ptgodz

    Joined:
    Aug 4, 2016
    Posts:
    87
    Thanks for replying to me Gabriel. This makes sense now. The tiling is almost like a resolution in some ways, but tiled.

    This has got me thinking however. If I was to have my texture file and say I have a small brick on that texture. Is it possible for me to map that specific area of the texture to an area of my UV map and tile it? I've attached another example of what I'm trying to say.

    uv example.jpg

    If this isn't possible, is there a typical way that people lay out their texture maps? in order to accomplish this.

    With the example above, Some of the unselected UVs are long walls roughly 2m x 10m unity units in size. I was looking to texture these by using a smaller section of my texture map designed for a 2 x 1 size and then repeat it. However it appears that this would probably need to be a entirely separate texture if the example above isn't possible. This is absolutely fine. I just want to make sure I'm not missing something.
     
  4. gabrielw_unity

    gabrielw_unity

    Unity Technologies

    Joined:
    Feb 19, 2018
    Posts:
    229
    Hi! Yep, unfortunately it isn't possible to tile just a portion of the texture...other than using something like sliced sprites, which works for UI but isn't really useful for level/game geometry, in general.

    So, you'll need to create a separate texture file and material for each thing you want to tile. Or, layout everything in that box and manually paint in the textures...but that usually means you are limited to 4096 or lower, depending on performance stuff. Tiling lets you get away with low-res textures, repeating across the geometry :)
     
  5. gabrielw_unity

    gabrielw_unity

    Unity Technologies

    Joined:
    Feb 19, 2018
    Posts:
    229
    Also, don't forget that you can apply as many materials as you like to a PB object, just select the face(s) and apply as needed :)
     
  6. ptgodz

    ptgodz

    Joined:
    Aug 4, 2016
    Posts:
    87
    This has been really helpful. I'm gonna go learn the key shortcuts and give this ago.

    I also had no idea that I could add multiple materials to PB objects so this is something I'm going to take a look at.

    Thanks again!
     
  7. gabrielw_unity

    gabrielw_unity

    Unity Technologies

    Joined:
    Feb 19, 2018
    Posts:
    229