Home Technical Talk

Making sense of hard edges, uvs, normal maps and vertex counts

2456715

Replies

  • EarthQuake
    BARDLER wrote: »
    In Maya I set my hard and soft edges where needed and export out the OBJs. Then I have just been going into xnormal and doing a global extrusion for the cage to make sure the highpoly in completely inside then saving out the cage. I have been getting pretty good results to my knowledge, but was wondering if I should be building a custom cage in maya.

    No that should be all you need to do. The only reason you would want to do it in Maya is if you prefer Maya's tools to create the cage.
  • polygoo
    Offline / Send Message
    polygoo polycounter lvl 17
    @ eq one quick comment - If i were to uv this, i wouldnt have put a seam where you did on smaller thinner edge of the haloscope, i'd have that welded to the main housing, which a single smooth group bake would allow me to do, this is better because when im painting edge wear on that edge, its 100x easier and faster to make it not have seams.

    Thats an area where i'd favor distortion, since it would be alot easier to texture for an area like that. I honestly think that would outweigh the subtle resolution based issues your calling it of the single smooth group bake. Just a thought - of course the entire thing wouldnt need to be single smooth group, just have those two edges smoothed together..

    This stuff depends on how you uv, but you seem to uv in a way that favors this type of baking, but im not sure it favors ease of texture and seam issues when it comes to diffuse and spec, i guess if i were texturing this to be a clean scope, then it wouldnt matter as much
  • dirigible
    Offline / Send Message
    dirigible polycounter lvl 8
    BARDLER wrote: »
    "To get an "averged projection mesh" in Xnormal, you will be using a cage, either exported from your 3d app(In max you can set up a projection modifier and then export as SBM with your cage) or by creating a cage in Xnormal's 3d viewer. So you don't need to use those settings, as the cage overides it."

    In Maya I set my hard and soft edges where needed and export out the OBJs. Then I have just been going into xnormal and doing a global extrusion for the cage to make sure the highpoly in completely inside then saving out the cage. I have been getting pretty good results to my knowledge, but was wondering if I should be building a custom cage in maya.

    I mentioned it earlier in the thread, but there are instances where you might want to adjust your cage into a shape that isn't just a straight extrusion. Though yeah - straight extrusion is what I use 95% of the time. Still, the other 5% of the time it can be helpful to make a cage in maya or max or whatever, simply because xNormal's tools for tweaking individual verts on your cage aren't very good.
  • throttlekitty
    dirigible wrote: »
    True, I suppose I should have said that face-weighted normals are a good SUPPLEMENT to proper use of hard edges.
    8YvKl.jpg
    EDIT: Lol, I like the new thread name.

    Which would be great if we could actually mix and match hard edge commands with vertex normal commands. There's no easy/quick way to get a hard edge like that with vertex normal tools. Natively, at least.
  • dirigible
    Offline / Send Message
    dirigible polycounter lvl 8
    Which would be great if we could actually mix and match hard edge commands with vertex normal commands. There's no easy/quick way to get a hard edge like that with vertex normal tools. Natively, at least.

    ??
    Not sure what you mean. that screen shot shows a mix of hard edges and Face-weighted normals.
    In maya2013, face weighted normals is simply an option that you can toggle on, per mesh. It goes into effect any time you soften a normal.
  • BARDLER
    Offline / Send Message
    BARDLER polycounter lvl 12
    EarthQuake wrote: »
    No that should be all you need to do. The only reason you would want to do it in Maya is if you prefer Maya's tools to create the cage.

    Cool thanks, its nice to have someone who knows what they are doing confirm I am doing something right lol. Thanks for the write up, always appreciated when you post info on this forum.
  • EarthQuake
    polygoo wrote: »
    @ eq one quick comment - If i were to uv this, i wouldnt have put a seam where you did on smaller thinner edge of the haloscope, i'd have that welded to the main housing, which a single smooth group bake would allow me to do, this is better because when im painting edge wear on that edge, its 100x easier and faster to make it not have seams.

    Thats an area where i'd favor distortion, since it would be alot easier to texture for an area like that. I honestly think that would outweigh the subtle resolution based issues your calling it of the single smooth group bake. Just a thought - of course the entire thing wouldnt need to be single smooth group, just have those two edges smoothed together..

    This stuff depends on how you uv, but you seem to uv in a way that favors this type of baking, but im not sure it favors ease of texture and seam issues when it comes to diffuse and spec, i guess if i were texturing this to be a clean scope, then it wouldnt matter as much

    Generally speaking, you're always going to have some uv seams to work with. If you don't have a good workflow for dealing with that stuff you're going to have a lot of problems. Taking a mesh into mudbox and painting some really quick selection masks for instance can help a lot.

    If there is some specific wear i'm planing to do on that edge I probably would uv it a little differently, and maybe add in a bevel there too, as that area would be close up in the player view.

    There are so many different uv combinations you could use in different situations, this wasn't really meant as a UVing tutorial or anything.

    Of course its going to be faster if every bit of your mesh that you want to add cool unique detail on has no uv seams, but when you get into complex assets thats rarely possible, though if you plan it out well you can make it easier on yourself. But yeah, having a way to deal with seams is super important.
  • throttlekitty
    dirigible wrote: »
    ??
    Not sure what you mean. that screen shot shows a mix of hard edges and Face-weighted normals.
    In maya2013, face weighted normals is simply an option that you can toggle on, per mesh. It goes into effect any time you soften a normal.

    Ah, I didn't know that about 2013. Previously, you couldn't mix edge smoothing with vertex normals; it's one system or the other, and not all exporters handle normals properly. Creating a hard edge with vert normals, you'd need to go into face vertex mode and eyeballing things which is a total pain.
  • Hazardous
    Offline / Send Message
    Hazardous polycounter lvl 12
    EQ: Dude thanks for that big post man. Really solid stuff, TBH I never knew the difference it made, and always went for the smoothed version - argh!
  • funth
    Offline / Send Message
    funth polycounter lvl 7
    Earthquake. thanks for the post, at our studio we've been mostly using all softedges and extra geometry around problem areas to stop the normal map gradients in our bakes. when reading this I was very excited. I tried your method on a cube keeping my hard edges at the seams and using "geometry normals" in maya. Alas it didn't seem to fix our problem...the normal map is still a gradient and there are still hard edged seams. Is there something I'm missing as to why this wouldn't work on something as simple as a cube? illustrations attached.

    bake_example_zps0b4d9ada.jpg
  • EarthQuake
    funth: To get rid of all extreme gradients on a simple cube like this with the minimum amount of geometry you need to detach each uv face.

    As far as the hard edge seem, well first off its extremely hard to see here, and secondly I think when you're dealing with normal maps, anywhere you have a uv seam you'll see a seam on the mesh if you zoom in far enough/if your texture resolution is low enough.
  • Scruples
    Offline / Send Message
    Scruples polycounter lvl 10
    edit: ah I misread thought his entire mesh was hard edges, ignore this post
  • funth
    Offline / Send Message
    funth polycounter lvl 7
    EarthQuake wrote: »
    funth: To get rid of all extreme gradients on a simple cube like this with the minimum amount of geometry you need to detach each uv face.

    As far as the hard edge seem, well first off its extremely hard to see here, and secondly I think when you're dealing with normal maps, anywhere you have a uv seam you'll see a seam on the mesh if you zoom in far enough/if your texture resolution is low enough.

    it's actually quite easy to see, sorry for blurry pic

    I know you can detach faces and get a good result but that is what we are trying to avoid, because each detached face gives you less room in your 0 to 1 uv range. so picture a very complext object with a lot of broken uvs could equal a big reduction in uv space
  • funth
    Offline / Send Message
    funth polycounter lvl 7
    my basic work around is to bevel all edges (and make them soft) that intersect two long faces that would give me normal gradients....at the next LOD i merge these verts and make that edge hard, and the popping is acceptable...but I wish there was a more elegant solution without the bevels...
  • Kon Artist
    Offline / Send Message
    Kon Artist polycounter lvl 8
    funth, are you sure that edge isn't set to hard? B/c it looks like it is and also not a UV seam. I just did a test cube (256) no seams.

    Just ran a test with a 128 and no seams... a slight coloration on the seams (from lack of texture info?). But you should only get a dark seam like that if you have a hard edge that is NOT a UV edge.

    transfer settings.

    Map space: tangent space
    Transfer in : world space
    Sampling quality: high 8x8
    filter: 3
    Type: Gaussian
    fill texture seams: 3
    Matching using: Geo Noramls
  • funth
    Offline / Send Message
    funth polycounter lvl 7
    Kon Artist wrote: »
    funth, are you sure that edge isn't set to hard? B/c it looks like it is and also not a UV seam. I just did a test cube (256) no seams.

    Just ran a test with a 128 and no seams... a slight coloration on the seams (from lack of texture info?). But you should only get a dark seam like that if you have a hard edge that is NOT a UV edge.

    it is a hard edge, and it is on the uv seam
  • Kon Artist
    Offline / Send Message
    Kon Artist polycounter lvl 8
    do you mind letting me take a look at your file?
  • funth
    Offline / Send Message
    funth polycounter lvl 7
    Kon Artist wrote: »
    do you mind letting me take a look at your file?

    I would, i'm at work and can't send out files. anyway it's just a default maya cube. I used a high res cube with beveled edges as the source and used the default cube as the target.

    I used the default uv layout and made all edges soft except for the uv borders...I baked a 1024 using geometry normals and this is the result...

    I think that would be the only steps needed to repro.
  • funth
    Offline / Send Message
    funth polycounter lvl 7
    oh and i'm using maya 2013, if that makes a diff
  • Kon Artist
    Offline / Send Message
    Kon Artist polycounter lvl 8
    no, that's what I'm using. I made a short video:) Just a thought did you leave the default cube UV's?

    Edited: video added.

    http://www.youtube.com/watch?feature=player_detailpage&v=GhO7zi1S08I
  • JasonLavoie
    Offline / Send Message
    JasonLavoie polycounter lvl 18
    As others have said, this thread (and the one that started this all) has been such a great read. I'm in the camp of EQ, but we do have some artists at DE who much prefer 1 smoothing group method, and in general get some good results.

    The discussions here have been fantastic, and I really appreciate the time you all have taken to demonstrate the different methods.

    Thanks all!
  • Delerium
    Earthquake, you have patience of steel, your knowledge and willing to share that it is remarkable. Thanks! (Sorry for OT)
  • Envart
    Offline / Send Message
    Envart polycounter lvl 6
    Thanks for the write up, EQ. and for taking the time to explore this issue in greater depth. Personally I prefer using multiple smoothing groups/hard edges because it cuts down the gradients, dramatically so in some cases. I also find that using 1 smooth group sometimes leads to weird shading when the mesh is lit in the engine. Polygoo's image (left most example, sorry for redundant repost) shows the issue.

    I think the shading quality of the model is more important than the benefits reaped from baking a mesh with only one smooth group. I feel that once the model is in-engine, and the normal map is doing it's sweet pixely business, those hard edges are less visually off putting than either weird shading or an odd normal gradient.

    Untitled-3%20%282%29.jpg
  • Hayden Zammit
    Offline / Send Message
    Hayden Zammit polycounter lvl 12
    EarthQuake, I'm baking in Maya and trying to sort out a problem with artifacts.

    I'm using an averaged projection mesh. I've got a mix of hard and soft edges. As you can see in the following pic, Maya is baking out all sorts of oddities. The render is from Marmoset, but the odd details are still there in Maya.

    Ajdbj.jpg
  • poopinmymouth
    Offline / Send Message
    poopinmymouth polycounter lvl 19
    Great write up EQ. Easy to understand and follow.
  • sheckee
    Offline / Send Message
    sheckee polycounter lvl 9
    Here's a bake I just tried on the back of reading through this whole thread. This is very inspirational stuff! Enjoying learning more about the theory.

    I don't pretend to be able to follow all of what you guys say, but it's beginning to make some form of sense to me, and I really would like to become well versed in this stuff.
    Anyway, I wonder if you might have a look at a bake I did today based on a few things I read in this thread?
    There's a UV error on one of the objects, I don't know how I didn't notice that. The bake looks nice, I think; though your eyes probably will notice a lot of errors. My only problem is the waviness in the cylinder of the ear muffs. Though I'd imagine that's the all too common "Not enough geometry" issue?

    headphonebakinghelp.jpg

    Thanks, Jon. :)
  • MM
    Offline / Send Message
    MM polycounter lvl 17
    EarthQuake wrote: »
    Here is an example showing what happens when you try to pull a "detail map" out of crazy bump with methods A and B. 300% from photoshop so its clear what I'm talking about. This stuff can be a pain to edit out if pulling these detail maps are part of your workflow. The less of these little artifacts the better.

    mnt_normals_03.jpg

    There, that should cover the visual examples for all of the benefits of using method B over method A.


    i was reading your post again and the way you create your detail map seems like very old method. i hope you know xNormal have had very nice curvature map feature for a long time now.
    although it does have some minor ray cast issues, which can be avoided by doing couple bakes with different settings and taking best from both. but in the end the curvature map from xNormal is far better quality and almost perfect than what you have from crazybump(not to dis crzybump, it does a LOT of other things better).
  • EarthQuake
    MM wrote: »
    i was reading your post again and the way you create your detail map seems like very old method. i hope you know xNormal have had very nice curvature map feature for a long time now.
    although it does have some minor ray cast issues, which can be avoided by doing couple bakes with different settings and taking best from both. but in the end the curvature map from xNormal is far better quality and almost perfect than what you have from crazybump(not to dis crzybump, it does a LOT of other things better).

    The xnormal curvature map thing has already been discussed.

    Combining two maps is again, work that needs to be redone if you get change requests so its a slow and clunky workflow.

    There are some minor ray errors on some of the buttons, but nothing on the image you're quoting. The ray errors there could easily be fixed by tweaking the low poly geometry a little, no need for two bakes or anything like that. This is a 2-3 year old mesh and isn't meant to be a "perfect bake" or anything like that, just a quick example to show various methods in relation to hard/soft edges.

    I'm really opposed to any baking methods that require a lot of after work, you really should be able to just bake it and go, because it saves so much time with revisions etc, or if someone else needs to work on your mesh. I've brought this up previously but apparently you're the only artist in the games industry that has never had a change request from a client, and never been asked to work on an asset done by another artist. Congrats I guess?

    You're welcome to do as you like of course, you can even do you own write up on your personal methods as well, explaining the pros/cons of what you do. Incessantly nit-picking what I have posted seems a little petty though.
  • - Livewire -
    Offline / Send Message
    - Livewire - polycounter lvl 9
    I strongly agree that you need to wade through heaps of misinformation, it can be quite frustrating to learn a method only to read somewhere else that this method is actually wrong.

    Thanks for taking the time to write this EQ, just read through the whole thread and my mind has been blown, massive help!
  • Macattackk
    Offline / Send Message
    Macattackk polycounter lvl 7
    im a little confused on the idea of a synced workflow. im assuming its using a shader in a 3d viewport which mimics a specific game engine? is there any info out there on how to achieve a synced workflow using 3ds and UDK?
  • Ace-Angel
    Offline / Send Message
    Ace-Angel polycounter lvl 12
    Not currently, Epic was able to improve the Normal math for UDK, but ONLY for Static Mesh assets, and you need to bake them out from XNormal.

    And it isn't easy, since you need to go deep into the core of the engine to change the way it handles things, especially in the case of UDK, so you cannot simply 'improve' something or mimic in an engine format to another.

    3DS currently doesn't have a single engine that supports it Normal math as far as I'm aware...
  • vik
    Offline / Send Message
    vik polycounter lvl 13
    Great thread!

    IMO for us environment guys working working with Unreal and baking stuff in Max, the most viable way is to use method B (Hard edges at UV seams+Averaged projection mesh). We usually don`t have the luxury to chamfer every edge to make it smooth nor can we get away using one SG on the whole mesh. Using 1 SG is all good when you have a very organic looking mesh or work with synced normals though(keeping the pros and cons mentioned in this thread in mind.)
  • throttlekitty
    Macattackk wrote: »
    im a little confused on the idea of a synced workflow. im assuming its using a shader in a 3d viewport which mimics a specific game engine? is there any info out there on how to achieve a synced workflow using 3ds and UDK?

    Different apps/games use different methods for calculating tangent space on a model, or interpreting said tangent space. Calling the workflow synced means that what you're baking the normal map in uses a close or same method as what will be rendering it.
  • Racer445
    Offline / Send Message
    Racer445 polycounter lvl 12
    Ace-Angel wrote: »
    3DS currently doesn't have a single engine that supports it Normal math as far as I'm aware...

    cryengine 3
  • EarthQuake
    Racer445 wrote: »
    cryengine 3

    I thought crytek used the same broken normals display that 3dsmax's default shaders do, or something like that. Have they updated it to actually sync properly to max bakes now?

    I vaguely remember you posting some test results a while back using crytek's proprietary baker and not getting very good results, but I haven't looked into it myself at all so I have no idea.
  • Hayden Zammit
    Offline / Send Message
    Hayden Zammit polycounter lvl 12
    Whoa, this issue is doing my head in. I did a few tests, even on a simple cube I'll get this weirdness in my bakes. I can't remember ever noticing this before.

    You can see the artifacts I'm getting in the pic pretty clearly. That's in marmoset, but its the same in Maya as well.

    I'm baking in Maya, but I've tried Xnormal and I got the same results.

    yJe0j.jpg?1
  • Racer445
    Offline / Send Message
    Racer445 polycounter lvl 12
    EarthQuake wrote: »
    I thought crytek used the same broken normals display that 3dsmax's default shaders do, or something like that. Have they updated it to actually sync properly to max bakes now?

    I vaguely remember you posting some test results a while back using crytek's proprietary baker and not getting very good results, but I haven't looked into it myself at all so I have no idea.

    that was in cryengine 2, the latest version of the engine syncs fine as i did a full asset for someone in that engine recently with no troubles. one sg tests looked fine.

    also i had no idea what i was doing then so yeah.
  • EarthQuake
    Racer445 wrote: »
    that was in cryengine 2, the latest version of the engine syncs fine as i did a full asset for someone in that engine recently with no troubles. one sg tests looked fine.

    also i had no idea what i was doing then so yeah.

    Awesome!
  • Zocky
    Offline / Send Message
    Zocky greentooth
    A lot of useful info in this thread!

    I do have a question here.
    I don't have model with myself here, but i will try to describe what the model looked like and what was the problem.

    Take a look at this garbage container:
    http://wakelydisposals.com/ESW/Images/IMG_0005.JPG?xcache=2216

    I was doing something similar to this.
    Low poly was very simple, and i put hard edges where the uv seams are.

    I was also using maya 2013. The problem i had, was that when i baked AO map, it simply didn't match normal map.

    I then discovered that the problem was actually normal map itself.
    For example, lets say those vertical bars on that container. They would simply be offset.

    Btw, i was using "Match using : Geometry Normals".

    For cage i was using low poly mesh, because i only extruded inwards.

    Then after trying various settings, i found out that i fixed this problem by using "match using: surface normals", which as i understand, we shouldn't be really using.

    Now i understand it's hard to get my problem with no pics, but this actually fixed my problem, but any idea what could cause this "offset"?

    Oh, and if it helps, i did use duplicated low poly mesh, so i removed all the overlapping faces (apart from the original ofcourse, otherwise, there wouldn't be any low poly to use :P)
  • Harry
    Offline / Send Message
    Harry polycounter lvl 13
    EarthQuake wrote: »
    To you, very specifically.

    Most hard surface artists that I know and have worked with UV in a very similar manner to myself.

    aside from that it really seems crazy to get behind the idea of not using hard edges on the LP cause firstly, its free, and secondly, even if it wasnt free or it did actually impeach on someone's ingrained workflow - the cost is pretty negligible for the benefit youre getting. This workflow will look best in the broadest range of engines, even with dismal tangent basis compatibility. I think theres no sense in respecting workflows out of habit when with minor alterations to those habits will result in an increase in quality (even if minor) and more versatility. EVEN if it's inconveniencing someone who doesn't wanna change, that person is getting an outright benefit from it.

    (quote doesnt totally put my response in context - this was after this MM guy claiming it's too much effort to change his workflow to include hard edges)
  • dirigible
    Offline / Send Message
    dirigible polycounter lvl 8
    Zocky wrote: »
    A lot of useful info in this thread!

    I do have a question here.
    I don't have model with myself here, but i will try to describe what the model looked like and what was the problem.

    Take a look at this garbage container:
    http://wakelydisposals.com/ESW/Images/IMG_0005.JPG?xcache=2216

    I was doing something similar to this.
    Low poly was very simple, and i put hard edges where the uv seams are.

    I was also using maya 2013. The problem i had, was that when i baked AO map, it simply didn't match normal map.

    I then discovered that the problem was actually normal map itself.
    For example, lets say those vertical bars on that container. They would simply be offset.

    Btw, i was using "Match using : Geometry Normals".

    For cage i was using low poly mesh, because i only extruded inwards.

    Then after trying various settings, i found out that i fixed this problem by using "match using: surface normals", which as i understand, we shouldn't be really using.

    Now i understand it's hard to get my problem with no pics, but this actually fixed my problem, but any idea what could cause this "offset"?

    Oh, and if it helps, i did use duplicated low poly mesh, so i removed all the overlapping faces (apart from the original ofcourse, otherwise, there wouldn't be any low poly to use :P)

    I think your question is way too complicated to answer without some pictures explaining it. Even as someone who uses maya, I had a hard time following what you were saying.
  • zenarion
    Offline / Send Message
    zenarion polycounter lvl 17
    Great stuff EQ. Thank you for clearing up a lot of bad info that's out there.
  • cw
    Offline / Send Message
    cw polycounter lvl 17
    The point about LODs is a great one (it's a great writeup altogether but you know..)

    All smooth verts makes for ugly LODs if you're not careful. :)
  • BARDLER
    Offline / Send Message
    BARDLER polycounter lvl 12
    I have a question that I think I know the answer to but I want to make sure. For example if I made shape like this, such as a barrel, or nozzle, or something like that.
    uvnormalquestion.jpg
    So I soften all the edges, then I select the highlighted edges and harden them, and then I have separate UV islands for each of the colors I highlighted. Even though this creates 4 UV islands this would be the right way to do it?
  • Oniram
    Offline / Send Message
    Oniram polycounter lvl 15
    there wouldnt be a need for that many uv seams. essentially where green meets purple would be the ideal place for a uv seam.. thats it.
  • Kon Artist
    Offline / Send Message
    Kon Artist polycounter lvl 8
    That would give you the best normal map... not worth it (texture space or UV wise). I would probably just have the outer edge hard; seam b/t green and purple-- giving you 2 uv islands. This would eliminate gradient in your normal map in the green area.

    Uv islands

    Green
    Purple, blue, red. (all one, soft edges in b/t)
  • BARDLER
    Offline / Send Message
    BARDLER polycounter lvl 12
    Oniram wrote: »
    there wouldnt be a need for that many uv seams. essentially where green meets purple would be the ideal place for a uv seam.. thats it.

    That makes sense, but wouldn't having soft normals on the top red area cause a shading gradient? Would adding an extra edge loop around the top red area be a solution to solve this instead of having extra UV islands.
  • Bek
    Offline / Send Message
    Bek interpolator
    If you did a bevel where red meets blue you could then have it soft, which would be the same cost as having it hard with no bevel (assuming the UV's for the beveled are continuous). But wouldn't it make more sense to have that bevel where green meets purple? My logic being that the green/purple edge would be seen more by camera / changes silhouette more.
  • Vrav
    Offline / Send Message
    Vrav polycounter lvl 11
    EarthQuake wrote: »
    The greater point of the thread is just to make it very clear how everything works, projection types, vert usage, etc etc. Not so much OMG ADDING HARD EDGES IS SO MUCH BETTER or anything like that, its very subtly better for some really esoteric reasons. Its really this big interconnected issue that a lot of artists don't really grasp, so I wanted to sum it all up in a nice concise package.
    As always, well done! Threads like this are a great resource to link to people who don't yet understand the difference (or benefit of being able to bake averaged projection normals on a split mesh).
  • EarthQuake
    Oniram wrote: »
    there wouldnt be a need for that many uv seams. essentially where green meets purple would be the ideal place for a uv seam.. thats it.

    Yeah if you've got synced normals at least. If not that would create some nasty shading unfortunately.

    However if that case you might re-think how the low is constructed in the first place, would the player notice that sort of indent or could you just "fake" it in the normal map?

    We get into sort of a different discussion there entirely, but one that I think is under appreciated none the less, how certain types of geometry are going to work better with bakes/smoothing issues/etc(this is sort of covered in the waviness thread, the gun muzzle example), and how you can plan your high out to minimize these sorts of situations in your low. Maybe a future topic for a write up.
2456715
Sign In or Register to comment.