Home Technical Talk

Why do you need to use straight uvs with hardsurface models

polycounter lvl 7
Offline / Send Message
Sunray polycounter lvl 7
Hey I've heard that you need to use straight uvs with hard surface models I was wondering why? Also do all edge need to be straight or only the borders?

Replies

  • Bek
    Offline / Send Message
    Bek interpolator
    Pixels are square. Diagonal UV seams means squares will have to try the best fit, which means you'll have jagged (aliased) lines, which gets worse (more noticeable) as texture resolution decreases (mips, lower texture settings...). Plus straight edges are easier to pack. You don't "need" to use straight edges on hard surface stuff.. but you really really should, unless you can think of a good reason not to.
  • Zack Maxwell
    Offline / Send Message
    Zack Maxwell interpolator
    Bek said:
    Pixels are square. Diagonal UV seams means squares will have to try the best fit, which means you'll have jagged (aliased) lines, which gets worse (more noticeable) as texture resolution decreases (mips, lower texture settings...). Plus straight edges are easier to pack. You don't "need" to use straight edges on hard surface stuff.. but you really really should, unless you can think of a good reason not to.
    I'm with Perna, I think it's just to avoid texture warp.
    Even if you have straight lines, there's no guarantee that the edge will be falling directly between two rows of pixels. And even so, it would only be visible both when the texture is extremely low resolution, and the camera is very close, which precludes the effect from mipmaps.
  • Sunray
    Offline / Send Message
    Sunray polycounter lvl 7
    perna said:
    Aye, for console art, "jagged" textures as a result of warping is not much of an issue. Also if you paint in 3D you don't much care what the UVs look like. Personally my prime concern is keeping pixel density consistent. That's about it.
    For consistent pixel density (not sure if I know what it is) you should keep the squares of the checker pattern all the same sizes right? 
  • Sunray
    Offline / Send Message
    Sunray polycounter lvl 7
    perna said:
    sunray, sure, as much as possible. Consistency is generally more important than sharpness. The second some parts have sharper texel density than others it looks amateurish and "computery". 
    Thanks but can I get away with certain exceptions? Like here if I were to keep the sword holder the same pixel density I'd have to scale all the other down a lot and waste a lot of texture space. 
  • Sunray
    Offline / Send Message
    Sunray polycounter lvl 7
    Also if use more materials on a character the texture density should be consistent between them?
  • Cay
    Offline / Send Message
    Cay polycounter lvl 5
    That's a perfect sample of uvs that could be a lot better..
    All these shells could be perfectly straight, not only will it avoid jaggies.. it will also make it much easier to reuse textures if you want to map part of the texture to another model. All it takes is planning and some extra effort in unwrapping. (using the trick with unitize to unwrap strips; the align tools)
    Minor distortion doesn't really matter if you instead end up with nice rectangular shells. Packing them will be a lot easier.


  • Sunray
    Offline / Send Message
    Sunray polycounter lvl 7
    Cay said:
    That's a perfect sample of uvs that could be a lot better..
    All these shells could be perfectly straight, not only will it avoid jaggies.. it will also make it much easier to reuse textures if you want to map part of the texture to another model. All it takes is planning and some extra effort in unwrapping. (using the trick with unitize to unwrap strips; the align tools)
    Minor distortion doesn't really matter if you instead end up with nice rectangular shells. Packing them will be a lot easier.


    Thanks, I see what you mean is there a good way to tell what is to much stretching and what's not?
  • Sunray
    Offline / Send Message
    Sunray polycounter lvl 7
    perna said:
    Sunray: if you upload that UV-mapped OBJ somewhere I can have a look at it later tonight.
    Thanks man, here is a link to the file https://www.dropbox.com/s/ikig7s8w53ko3aq/sword_on_back.fbx?dl=0 
  • Sunray
    Offline / Send Message
    Sunray polycounter lvl 7
    Cay said:
    That's a perfect sample of uvs that could be a lot better..
    All these shells could be perfectly straight, not only will it avoid jaggies.. it will also make it much easier to reuse textures if you want to map part of the texture to another model. All it takes is planning and some extra effort in unwrapping. (using the trick with unitize to unwrap strips; the align tools)
    Minor distortion doesn't really matter if you instead end up with nice rectangular shells. Packing them will be a lot easier.

    Ah dude the unitize function is amazing
  • Sunray
    Offline / Send Message
    Sunray polycounter lvl 7
    perna said:
    Sunray,

    Overall your islands are well relaxed and the packing looks fine.

    I'm sorry, but I can only say that making those rectangular UVs that some people do is completely nonsensical and not rooted in actual science, but in making "pretty" and "efficient" (but misleadingly so and without practical value) UV usage. If any of our artists ever used that approach I'd go Jackie Chan My Head Hurts on them. It makes no sense to deform a UV island into a shape which is not congruent with its 3D form to make it artificially look as if you are wasting less UV space. That's essentially "cheating" and a waste of time. The only times you see valid use of this technique is with extremely limited resolution assets such as mobile games from several years back, and the occasional parts such as the one highlighted in the image below.

    The mesh itself could do with optimization. There's an unnecessary amount of tiny detail for the studs, and some again unnecessarily tiny chamfers going on here. Reducing the number of 3D seams will reduce the number of UV seams, increasing the overall texture resolution.

    Here's an overpaint with some quick notes. This asset could do perfectly well in production, except for the complete lack of padding and the high number of separate meshes involved.



    Hey thanks for the extensive reply, 

    I decided to put seam A over there because it's facing to the back I feel like it's the best place or should it still be on the side?
     
    I made the whole island one thing I don't know what i was thinking to keep it all separate haha

    I also merged a lot of separate pieces I didn't think about the waste of uvs if I kept them separate.
    I ignored to the whole box uv thing, and kept my uvs as close to the form of the mesh you said. Also deleted some edge loops the smaller chamfers i had them because I thought I needed them for my normal map bake. Deleted some loops on the studs, 5582 Tris in total.

    I kept space between the islands for edge padding I didn't even know there was a thing like edge padding(I'm still "trying" to learn a lot). Is there a way to know how much space should be between islands? Here is my new unwrap I think it looks better I hope you won't have to Jackie Chan my ass. 

    Also, I have a bigger texture density on the sword holder(the thing where the sword goes into I don't know what it is called).

    Are the things that still could be better? thanks!!
  • sprunghunt
    Offline / Send Message
    sprunghunt polycounter
    I would try packing the UVs into a 1x2 (eg: 1024x2048) map to even out the density on the handle vs the scabbard.
  • Bek
    Offline / Send Message
    Bek interpolator
    perna said:
    Just a little heads-up here. You both talk about "straight UVs" as if it's a standardized term, which, to my knowledge, it isn't.
    I never used the term "straight UVs" in my post, but straight edges, which should be fairly clear — edges perpendicular to the U or V axis — but perhaps I should have said "Straight edge seams". If you have a perfectly square shape in 3d that isn't straight in the UV's that's just lazy unwrapping.  Though you raise a good point, perhaps that should be spoke of not as "straightening" but "orientating" your islands correctly. I agree with the rest though, you shouldn't add unnecessary distortion to your unwrap because of some desire to straighten everything (unless it's super low res mobile stuff and you know the tradeoff is worth it). As always, experiment and find out what works best for your particular situation.

    But I am curious what you consider to be unnecessary distortion to be exactly, Perna. Would you straighten the cap of a tube, or unwrap it as a circular shape, as it appears in 3d? I do the former in most cases, particularly if it were some metal with scratching/anisotropic type rings going around it. The saved UV space from easier packing is also a plus. If there was only a very slight taper to a cylinder or cube, would you straighten that, or leave it with very slightly diagonal edges? I know there are a lot of other factors that come into play, texture res, material, final usage and so on, I just mean in generally, because it seems you would advise to almost never depart from the 3d shape to avoid aliasing. Surely there is a point where the increase in distortion from straightening isn't noticeable, but the loss of aliasing is. Or is it more because, since not everything can be straightened, the differences between two areas is more likely to be noticed? I'm not sure that makes much sense because some things themselves will naturally be straight; you wouldn't ruin those for the sake of consistency... Anyway, interested to hear your thoughts.

    Sunray said:

    Is there a way to know how much space should be between islands?
    As always, "it depends", but here's a general guide: http://wiki.polycount.com/wiki/Edge_padding
    I'm somewhat skeptical about real-world practicalities of the linear increase for minimal padding values, but I haven't bothered doing much testing in that area myself.

    Another point I haven't seen mentioned yet is grouping your UV islands by their material type, so when the texture does mip down like in those examples above, you don't have small isolated islands that will quickly get, if not engulfed, at least encroached upon by its surrounding materials. It's also just easier to work with when texturing; you can zoom in on the one area that contains the one part you're working on and not have to zip all around the document. It's also handy to orient islands in the same direction of they have a highly directional texture — like wood grain. It also saves you from having to copy/rotate things and so on.

  • Sunray
    Offline / Send Message
    Sunray polycounter lvl 7
    @sprunghunt

    what is a 1024x2048 map? I've searched it but one of the first things I found was not to use it and keep in the power of 2 or something like that.

    @Bek

    I will group my UV islands by material that sounds pretty smart also nice for making id maps. The handle and the holder I've kept rotated in the same direction as my texture will go. For the other I didn't really care since it's just going to be some type of metal or something along those lines.



  • Sunray
    Offline / Send Message
    Sunray polycounter lvl 7
    @perna Thanks,

    I  will try to keep a consistent detail level in my next assets. For the word seam I agree that I would be better to put it on the side if it was used for game, But since I just want to get a render in marmoset from my character I think it's better this way. I will try to merge more pieces in future assets. My character is also holding on to an axe I have 16 pieces that all could be merged into one piece I'd better fix that fast haha.

    I used to model everything in one mesh didn't matter what it was, if it were a tank I'd thought I had to do it in one piece. After that I thought hey I should keep more pieces separate. But now I'm moving on to hopefully the correct way thanks haha.

    I'm going to group UV islands by material.

    But I'm still really confused about the whole 2:1 unwrap do you or anyone has some good links to that?


  • gnoop
    Offline / Send Message
    gnoop polycounter
    IMO, the dogma of consistent equal texel size  everywhere is very wrong.    You should vary texel size depending on  importance of subject and nature of details.   Some details need more resolution than other.     in that sword example  the hilt could have much smaller texels size than the blade , especially if decorated.    Another great option is using 1x2 form factor, as already was mentioned.     Both would give you a great advantage, especially if  texture resolution is not that great.
     Unfortunately new texture software, Quixel and Substance,  would make you problems with  both non equal texel size   and non square textures.   It's their huge drawback.

     ps.    Same with stretched texels and distorted ones.    A few distortion in some unimportant parts  could give you more  space for important ones.  Shouldn't be a dogma either.         Also texel stretching in specific direction could give you  further mip level switching and better look in certain circumstances. 

  • gnoop
    Offline / Send Message
    gnoop polycounter
    I have just mentioned a  decorated sword hilt with tiny patterns (hi res)  and a clean steel of blade(low res).   A figure face (hi res)  and  some wear , pants for example  ( could be much lower res).        A lot of environment objects  where some parts  are never in good sight.     A static box near the wall for example where the side facing the wall could be just few pixels.  
     Very often stretched texels size comes just from trying to pack things tighter just to give more resolution for most visually important and noticeable part of an object . i.e  to make it look hi res without extra sub material , mat ID .        

      Gamers  often  just  don't understand compromises that had to be done to make key things  looking good and hi res.     Thus they sometimes find  bizarre things to complain.

     
  • Sunray
    Offline / Send Message
    Sunray polycounter lvl 7
     
    @gnoop I'll just sit back and wait for @perna to reply to you, both of you make sense to me. 

  • gnoop
    Offline / Send Message
    gnoop polycounter
      Parts of  a weapon in FPS that in close plain sight of a player vs distant invisible parts  .  Left side vs right side.    I mean not a dramatic difference in texel size  since we  still see the right side sometimes , just rarely same close or while pretty quick animation  only.  

     Still having things in close plain sight  most of a time to be  higher res is so logical to me  I really don't understand why everybody follow  same old "equal texels" dogma   and having  mediocre looking thing as a result .

    The problem is Quixel/Substance where it's a pain in the a..  to work on non-square/ non consistent texel size.  And we really need it to be addressed.
  • kio
    Offline / Send Message
    kio polycounter lvl 15
    It's actually quite easy to work in a non square setup - just keep it square  and keep your stuff only in one half. Once you're done, just crop the textures and transform your uvs as a last step.
  • gnoop
    Offline / Send Message
    gnoop polycounter
    I agree with big part of what you have just said.    The boxes  and objects that could be reused  and your over-optimization  comments are 100% correct. But  I don't agree that examples I mentioned are rare exceptions.     They are exceptions  for main animated characters and props   where we have enough texel resolution usually .      

      But for environments  the texture resolution is still not that great  . Many parts are not reusable actually  or reusable only in very similar conditions.   Those boxes are often parts of bigger objects .    In general, we still use that phased out approaches, those you hardly see on main characters ,  animated objects.   Environments  still use a lot of faked things and often constitute so puzzling task you have to do anything you can to squeeze  some extra  visual quality.   

    And when you consider inconsistent density look horrid .   I see it  often as a way to make  already horridly  looking  low res  environment   to  be  not that bad in some key parts .    Even characters could be a part of  low res environment  actually  . Crowd in a  racing game for example.

    ps.  Regarding weapon.  Well , I never saw such optimization .   Left vs right at least.        Although I am working for a racing game last few years.

    What Kio  said is right , I often do it same way.      But let's see , to make a wall texture 512x2048   I have to work with 2048x2048 file , actually  4096x4096 master file  to have crisper hand painted details,    and  their "work on smaller resolution, then upscale" is not working really.  The nature of all that procedural details turns pretty different with upscaling.     

  • Synaesthesia
    Offline / Send Message
    Synaesthesia polycounter
    >The problem is Quixel where it's a pain in the a..  to work on non-square/ non consistent texel size

    Both DDO and NDO support non-square textures by nature of being reliant on Photoshop, which itself supports the same.

    Inconsistent texel density isn't a problem that I'm aware of that would affect working with either tool if it's a deliberate choice being made by the artist. As an example, I frequently give lesser-seen areas like dark crevices significantly less texel density than I do for prominent pieces or smaller components that won't show up well if given the same density as larger components.
  • AtticusMars
    Offline / Send Message
    AtticusMars greentooth
    perna said:
    gnoop said:
    IMO, the dogma of consistent equal texel size  everywhere is very wrong.    You should vary texel size depending on  importance of subject and nature of details.   Some details need more resolution than other.     in that sword example  the hilt could have much smaller texels size than the blade , especially if decorated.
    Could you provide a single real-life example of a detailed material where two adjacent parts having significantly different texture consistency would not look very, very amateurish? Even in game reviews, people who are not professional artists point out this practice and complain about it looking bad...
    I probably shouldn't get in the middle of this because I agree with you. But I'm curious if you'd consider this as passable or very, very amateurish?: http://polycount.com/discussion/74780/gunslinger/p1

    I always think about this piece when I think about texel density because there's a huge differences in texel density between the shirt pocket and the rest of the shirt, the belt and the pants, the pants and the shoes, etc.

    It's a really old piece so perhaps the decision to lay out the UVs the way he did was more understandable at the time, but it was still good enough to be banner work here on Polycount and ZBrushCentral.
  • Cay
    Offline / Send Message
    Cay polycounter lvl 5
    It doesn't make sense to force non rectangular shells into that shape. (that's why my post stated "minor distortion")
    If you ever had to work on somebody else's seemingly modular pieces though and trying to make new pieces mapping them to existing textures.. you will appreciate it if they have been extra careful with their uvs. Because matching the curvature is not fun.
    Now this doesn't apply to props or other things.. but I'd rather have people be extra careful than not care at all. That's how all these arbitrary general rules start out I guess.

    Btw. I'm one of these uv puzzle solver guys who like to go all out and make it perfect, so that's part of the reason for it.
    In this example he is wasting a lot of uv space though no matter how you want to go about improving that.
  • huffer
    Offline / Send Message
    huffer interpolator
    My 2 cents: the gunslinger looks great, and the end-user, the casual gamer just notices how nice and detailed everything is, especially that leather belt. The clothes and dirt on them are totally passable in the whole.

    First view impression is most important, and nitpicking about slight, sensible texel density differences is just nitpicking. Unless it's glaringly obvious (if fabric pattern size would be mismatched for example), I don't think it matters to the perceived artistic quality of the asset.

     Absolutely yes, large density differences look bad, but it's a kinda purist point of view to deny even the minute ones. I don't see how having more density on some small parts, for example shirt buttons would be a bad idea (they'll actually read as buttons not blobs). Furthermore, I think such small technical issues should not be critiqued, but focus should always be on the art direction.
  • gnoop
    Offline / Send Message
    gnoop polycounter
    perna said:
    The high detail areas bring to attention how blurry the medium detail areas look. If everything is equally blurry, it's much more convincing, even if the average detail level is lower
    Not at all.      It's exactly what I call dogma.     Honestly I just don't understand it.       
     
      And the difference could be pretty big when it's necessary.   One more  example:  a group of fresh painted posts, accurate clean wooden fence   and some poster or sign attached somewhere  . Do you want that poster be equally blurry  or still readable?  The answer is pretty obvious. 

     Same as with that nicely decorated  belt  vs shirt and pants .    Looks very right and pro.    You just shouldn't do too visually prominent and to specific /contrast details in low res parts and nobody would ever notice anything.   I would say "equally blurry" would rather seems pretty amateurish to me.     
  • ZacD
    Offline / Send Message
    ZacD ngon master
    I really think this is less of an issue with modern games. With a key character, pretty much the whole character is going to be high enough resolution that you don't need inconsistent resolutions. And detail maps make this debate even more complicated. 
  • Sunray
    Offline / Send Message
    Sunray polycounter lvl 7
    ZacD said:
    I really think this is less of an issue with modern games. With a key character, pretty much the whole character is going to be high enough resolution that you don't need inconsistent resolutions. And detail maps make this debate even more complicated. 
    I've heard of quite some people that your texture density should be bigger in the face. Especially lower it on the scalp where it's just going to be hidden under hairs.
  • gnoop
    Offline / Send Message
    gnoop polycounter
    While I agree with key characters  and  re -used props  in general.    Still we yet have the whole world beyond them .

       From a nature of a human vision,  we focus  more on contrast edges , silhouettes, and some distinctive details while do not focus on something  plain and evenly painted.   So why do not exploit it.     It's a kind of thing you are usually taught  at an art school.  I mean  to do a selection ,  to filter the reality and find key things and miss unimportant.    It's  a time saver  too when you could just  fill  low res  parts with a color  and focus on hi res ones.
  • ZacD
    Offline / Send Message
    ZacD ngon master
    Sunray said:
    ZacD said:
    I really think this is less of an issue with modern games. With a key character, pretty much the whole character is going to be high enough resolution that you don't need inconsistent resolutions. And detail maps make this debate even more complicated. 
    I've heard of quite some people that your texture density should be bigger in the face. Especially lower it on the scalp where it's just going to be hidden under hairs.
    I should of expanded on that, I meant everything but the face. What I was trying to say was, the texture resolution on a character will be higher resolution than the display during gameplay unless you are pixel peeping. And when everything is higher resolution than the display can show, there's no point in having inconsistent texture resolutions. But of course close ups on the face for cinematics and dialog will be an exception, and you need more resolution there. 
  • gnoop
    Offline / Send Message
    gnoop polycounter
    Inconsistent texel density isn't a problem that I'm aware of that would affect working with either tool if it's a deliberate choice being made by the artist.
    DDO is  better  in regards of that , still you have to readjust everything for texel size variations.      That's why I often prefer Max, Blender or Modo procedural material to be then baked into the textures.    Especially Blender Cycles ones.    You just don't care about texel density ,UV orientation  etc  and your materials are always  truly  universal ,scalable and non-repetitive.   Cycles has very nice real time adjustable curvature mask based on actual geometry  and tessellation  rather than  normal map,   plus an instant extremely speedy preview.      


     


  • Synaesthesia
    Offline / Send Message
    Synaesthesia polycounter
    >still you have to readjust everything for texel size variations.  

    I'm not sure I follow you here. Could you show me an example of this problem? I use non-square textures occasionally and haven't run into anything like this yet. :)
  • gnoop
    Offline / Send Message
    gnoop polycounter
    I mean not non-square, I mean any texture with inconsistent texel  size  , in some UV island  square , in another one stretched or upscaled.       In fact I have to use consistent texel size  because  Quixel and SP both  force me to do so.        With a kind of hi res  "master file"    and then  do another "optimised" unwrap to re-bake into.   But the process is so annoying,  I am gradually moving to rather completely 3d procedural shaders to bake.
  • Justo
    Offline / Send Message
    Justo polycounter
    perna said:
    straight edges are absolutely horrid for efficient UV-packing.
    How is this true, Perna? I can think of many automatic UV packers that would give you production-ready results in seconds if most shells were straight, and very very few tools (IPackThat and that new updated Maya packer) that can work with more organic islands. And just in case, my point isn't that the packing should be done with automatic tools for best results, but it usually is a very good and fast start. I'd much pack seven boxes than seven banana-shaped stars or whatever, so long as distortion isn't noticeable and it's easy to straighten the shells.  

    Bek said:
    Surely there is a point where the increase in distortion from straightening isn't noticeable, but the loss of aliasing is. 

    I think this is the golden rule. 
  • gnoop
    Offline / Send Message
    gnoop polycounter
    perna said:
    Goop, I can only tell you that what I've shared with you about consistency of texel density is one of the core principles at 3Point. What you state as "amateurish" is something artists at the absolute top of the industry take for granted as great practice. Sorry for backing out of the debate about whether the sun is hot or not, as it doesn't feel like a constructive use of time.

    That's what actually  gives  cause for concern.  It's now seems so imprinted into minds of  fresh industry incomers,  they  refuse to use a common sense where varying texel size is absolutely obvious   and forget there should be no dogmas.     I saw so many such weird dogmas through my gamedev carreer.
    Like using always a box for background. ( decades ago)   Using weird HDR and bloom effects your eye leaking off .  Using  "cinematic" indigo or sepia color tinting.    Don't using specular mask since roughness is all you need , using only true measured  albedo values   ans so on an on.   They just come and pass.



     
Sign In or Register to comment.