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

How many people unwrap entire maps?

Discussion in 'General Discussion' started by N1warhead, Aug 21, 2016.

  1. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    Hey guys, curious, I just learnt a new texture method that i've never seen before.
    I found a map of Outset Island from Wind Waker. And literally the entire level model (piece by piece) is inside a single 128 x 512 texture.

    is this a common thing in games? Because I always thought most did just tiled textures when they could.
    But turns out it's getting really really good stats in Unity (just had to try it out).

    I mean I know people unrwrap characters,cars, etc. But I've never seen an entire level as a single model unwrapped.

    such as the Grass and the walk paths in the back of the image behind the stats = 1 mesh.
    I noticed by looking at the Unwrap in max, that they had the UV's stretched to the side (to make the texture stretch or not). But how does one tile that way? Just doesn't seem like it would be very easy to make it tile
    because if you're even one single pixel off on your size, it will look like crap. Just seems like more work than what it's worth than just using a simple UVW Map.

    Stats.jpg
     
  2. RockoDyne

    RockoDyne

    Joined:
    Apr 10, 2014
    Posts:
    2,234
    It's not uncommon to bake materials into one, even in Unity, so whether it was modeled that way is another question. I'm pretty sure you can/would see performance benefits to doing this, even in disk seek times if nothing else.
     
    angrypenguin likes this.
  3. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    Yeah I just never seen it done through a UV Unwrap before... Perhaps whoever exported it out it baked it into a single mesh perhaps..
     
  4. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,327
    Took me a while to find this link, but I think this is relevant:
    http://www.thiagoklafke.com/modularenvironments.html

    Ctrl+F for "constructed with those 3 textures"

    Basically, on a system with limited resources you can actually have a whole level jammed into one texture, and you'll need to be really clever to maintain illusion of high level of detail.

    There was actually a unity-related article about that too, but I definitely won't be able to find that one.
     
    angrypenguin and Martin_H like this.
  5. neginfinity

    neginfinity

    Joined:
    Jan 27, 2013
    Posts:
    13,327
    You don't tile this way. When everything is in the same texture, there will be no huge surfaces made out of single highly-repeating pattern on one polygon.

    You COULD, of course, write a region-tiling shader, but it most likely won't be worth it and mipmaps will break it anyway..
     
  6. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,986
    Yup. Very.
    In fact there was a great example of this being taken to an extreme by a guy who even leveraged channels to build a complex sci-fi environment using 2 small textures.
    http://www.torfrick.com/info/lab.html
     
  7. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    Yeah i saw how they were doing it. They would unwrap the entire model (at least from the exported map that I got it was a single model). And they'd select an entire area - lets say grass. And they'l just stick it over that part on the texture. Just don't see how a 128 x 512 can give that much detail to be honest. (it had 3 textures on the 128 x 512) so the detail wasn't the greatest. But yet it looks remarkable in Unity + the actual game..

    Interesting website link too man, book marked it for future references.

    @zombiegorilla : Wow that's remarkable work that guy did. I didn't even know it was possible to get that much detail with 2 little textures.
     
  8. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,986
    You just arrange the uvs manually. Doing mobile, texture memory is at a premium, we build fairly large environments, using a few carefully designed textures. Light maps augment the effect.
     
    JamesArndt likes this.
  9. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    Yeah but would doing a 128 x 512 texture be good enough quality for lets say the Xbox One?
    I just find lack of fidelity below 1024 x 1024 for landscape textures. Well maybe 512 x 512 depending how often it is used.
    It's really noticeable when it comes to Normal's. small normal's i've noticed = crap.
     
  10. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,986
    Deon-Cadme likes this.
  11. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    That looks very well crafted.
     
    zombiegorilla likes this.
  12. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,986
    Really depends on the use case. And how much time you want to invest. There is definitely a sweet spot you try to find. With buildings/man made stuff you can get away with pretty small textures. Natural stuff, you can get small, but it takes more time to breakup patterns. I/we don't really use normals all that much. Mostly for the reason you stated. They require decent resolution to not look cruddy. With good geo/paint and spec/metal/rough/etc... you can skip normal maps.
     
  13. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,986
    Yea, most of his assets seem to be an exercise in awesome. ;)
     
  14. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    Yeah there most certainly is a sweet spot. Everyone I know calls me "Tweaker", because I'll sit here for 4 days straight tweaking a single value, just to never be satisfied lol. And I mean that literally by the way haha.

    I am starting to get the hang of using smaller textures, ones that don't need extra mapping info.
    But now that I just purchased Shader Forge last night, going to try and pop out some amazing shaders here soon.

    I might start trying to sell some models here again soon. I finally just deleted the pack I had on the asset store, was on there for like 6 months and not a single sale, and they were pretty good quality. So sort of gave up on trying to sell models seeing how flooded the models section is.
     
  15. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,984
    Interesting, would this hold for realistic assets or only stylized/lower detail?
     
  16. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,986
    It works well with realistic art. By that I mean, what we call '90%', realistic, but a bit (dramatic) stylized color/lighting. (Superheroes.) ;) It won't hold up in all situations, but where you have a known range of scale, it does. In some cases, we ended up using a hybrid. We would use a normal map, but it was very low fidelity, just to help define some gross morphology, but not the details. The challenge was that the characters had a massive amount of detail (think MCU versions of the Avengers), but to have normal maps that reflect fine detail they had to be too large, and looked like utter crap when scaled down. Geometry can often be cheaper, like for belts, suit edges, armor plates, etc... and holds up well when scaled up or down. We usually avoid mip maps for the same reason.
     
    theANMATOR2b likes this.
  17. Billy4184

    Billy4184

    Joined:
    Jul 7, 2014
    Posts:
    5,984
    Thanks for the info! I'm pretty sure I'm going to be moving away from normal maps for my game at the risk of pushing up the system requirements, since I have the same problem - especially with vehicles it's very hard to have good, uniform texture resolution inside and out, close up as well as far away. The early ads for star citizen had the cockpits obviously normal mapped and in some places the resolution issues were very obvious:

    StarCitizen-2.jpg

    now they use a lot of geo as well as tiling texture arrays.

    Btw do you guys use decals at all for normal detail?
     
    artisticmechanics likes this.
  18. zombiegorilla

    zombiegorilla

    Moderator

    Joined:
    May 8, 2012
    Posts:
    8,986
    Kinda..ish? We have a few of different solutions that effectively give us the ability to do 'decals', but not what people typically refer to when they mean decals. In Commander, for example, we built that... wow... a little over 3 years ago (just had our 2 year anniversary on the app store). And we were kinda pushing what was being done at the time, so we did a lot tricks to keep resource budget very low. In addition to not using lighting at all, we also index sort virtually everything on the play field via shaders. The terrain is the very lowest and is essentially a dynamic splat map that writes to the texture channels directly. Very flexible and fast. There is a bit of a hit when updating it, but that only happens when you are editing your base. Then there is a layer right on top of that, where we place blast marks and basically damage. We lay those down as quads and combine them into a single mesh when they happen. Then shadows, a couple of fx layers and finally buildings. Generally, we just do dynamic mesh generation for UI type decals like this:
    IMG_0688 2.jpg
    It's night in my time zone, so a bit dark right now. (more shader tricks).
    Circles are a pain. ;) it's impractical to just use a circle texture, as the edges aren't crisp, so I built a multi 'ring' mesh builder that covers most things like that. Other decally type effects are either dynamic mesh, or shader tricks.

    For not-Commander, we use creative use of UVs (very creative), a little shader magic and quads. (and even particlesystems in a few places. We creatively reuse or distort the same textures and quickly bolt them down in some fashion. (usually mesh combines).
     
  19. Deon-Cadme

    Deon-Cadme

    Joined:
    Sep 10, 2013
    Posts:
    288
    Because of the OP

    The concept work on both high and low quality models.
    Tiling can be achieved but is a bit troublesome to set up.
    Lighting is typically done with the help of vertex normals. I know of a pair of techniques that use normal maps but they require a lot of work from the artist.

    The basics of this method to modelling is to go against the traditional method of solving everything with more and bigger textures that get combined in the shader. Instead, details are added directly into the models mesh and the use and size of textures is minimized.

    I can recommend this GDC talk, a personal favorite. One of the prettiest, 2D-styled games that actually use this method but they took it to the next level and there is still room for improvements :)

     
    artisticmechanics likes this.
  20. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,785
    we use that technique actually to map every object in our scene. pretty weird at first to be honest but once you get used to that technique you can work pretty fast too
     
    N1warhead likes this.
  21. ElectroMantis

    ElectroMantis

    Joined:
    Sep 15, 2013
    Posts:
    78
    Ha I was just looking at that very same wind waker model a few weeks ago and studying that very same technique. The uv maps were quite interesting indeed! I was surprised with how much stretching they could get by with due to the relatively simple textures.
     
  22. N1warhead

    N1warhead

    Joined:
    Mar 12, 2014
    Posts:
    3,884
    Haha yeah, I've wondered for YEARS how they did it. I figured it was a terrain system, but for the life of me, I couldn't understand how it would have been a terrain system because of the beautiful 90 degree sidings.
    So finally just looked it up when I remember N64 games have ripped models.
    It truly is a unique way to me, strange, but unique. And I like it.
     
  23. Reanimate_L

    Reanimate_L

    Joined:
    Oct 10, 2009
    Posts:
    2,785
    Oh and believe it or not we have hundreds of objects (and still adding) and all of them only use 4 material (at the moment) with albedo and normal (just for small detail not whole object normal maps) for each :D
    i'm saying at the moment due sometimes we have to create a new atlas/material for new type of texture/object that we doesn't have before