Home Technical Talk

Understanding averaged normals and ray projection/Who put waviness in my normal map?

1356711

Replies

  • EarthQuake
    ajr2764 wrote: »
    EQ, I'm curious what your workflow is like as far as uv's/smoothing groups. Do you typically unwrap a mesh not considering the smoothing groups and then split all your uv's on hard edges. You mentioned a script for maya that does that..where might I find that. You think it's worth it to bake a mesh that is naturally like 90% hard edged in the expense of saving say 300 or less tri's?

    Saving some tris/smoother edges vs a huge amount of uv islands(15+)/increased texturing work.


    Well first off, I plan my hard edges as i'm uving, this is pretty simple and straight forward when you start doing it, and it makes a lot of logical sense, because the areas you're likely to want hard edges are also the areas you're likely to want uv seams. I try not to split up my UVs too excessively, however I also try not to stitch them together to excessively, at the expense of distortion or ability to use hard edges.

    So generally speaking, areas that I know i'm going to have a uv split, i'll get by with a hard edge, areas where I know its a steep angle, but I want to keep a seamless uv chunk, i'll add a little more geometry to soften out the mesh normals. In addition to all of that, modeling your high and low to avoid lots of excessively steep angles in the end result is important, its all a big process that works together, high, low, uvs.

    I dont know what to tell you as far as "stats", 90% hard edges seems insane, I dont count the % of hard edges on a model, I dont count uv islands. 15 seems to much for a simple prop and too little for a complex asset, so I can't give you "rules", as it would just be made up arbitrary values that have no real meaning. It all comes down to experience and common sense, as every situation and every asset is different, and you'll have to balance these things. So go practice and gain experience, and just try to use common sense. =)
  • tristamus
    Offline / Send Message
    tristamus polycounter lvl 9
    Every 3D Artist should read this thread. Perhaps every artist in general, once you sift out the technical information. There is much to be learned here!
  • waedoe
    Offline / Send Message
    waedoe polycounter lvl 8
    EarthQuake wrote: »
    Oh, and another thing. Even if your lowpoly's normals look like A, your Cage/Projection mesh normals look like B. That is unless of course your bake is set up poorly(either using "offset" in max, match using "surface normals" in maya, or using the ray distance in XN instead of a proper, welded cage). If your cage is not averaged, you will get seams on all of your hard edges, as the normals will be facing perpendictular along those edges, and cause gaps in the projection.
    waviness07.jpg

    i guess im lost on this part... i thought that the cages smooth groups had to be the same as the original models? when ever i have hard edges like a i just split the uv into a new island (say from a 90 degree angle). are you suggesting that making the cage on 1 complete smooth group will prevent me from having to assign multiple smooth groups to the original low poly model?
  • maxivz
    Offline / Send Message
    maxivz interpolator
    are you suggesting that making the cage on 1 complete smooth group will prevent me from having to assign multiple smooth groups to the original low poly model?
    As far as i know when working with normal maps you have to assign smothing groups to thelow poly AND SPLIT THEM.
    But i am no way a pro at this, just a mediocre selft tought artist that works on cg as a jobbie :D
  • EarthQuake
    When using hard edges, you also need to split your uvs apart. This is due to the fact that when you have a hard edge, the baker tries to bake onto that row of pixels in the image twice, with different values for each side of hard edge. that gets sampled together and = seam artifact.

    This is independent of your cage, low doesn't = cage. As long as your cage is set up properly(ie: averaged), you'll get a seamless bake regardless of the hard edges on your low.
  • styx
    EarthQuake wrote: »
    Sure, normals:

    barreltestuv.jpg

    So, the A method has 5 uv islands as apposed to 4 for B/C. If you had to use hard edges to account for the normals on method A, you'd probably be up to about 10 uv islands, maybe more. If you had to use any hard edges on B/C, you'd simply use them on the natural seams, no big deal.

    [Edit] Doing the math, if you had to send A into an engine/app that wasn't properly synced as far as tangent basis goes, you'de have to have a uv seam at every 90 degree angle, which would = 13 uv islands. Ralph



    I have some questions about the way you did the unwrap of the examples:


    1- I know that if you split in more smoothing groups and UVs, it means
    more memory wasted in game.
    IMHO in B/C I would split the unrwap only for the circles and all the
    rest, the tube in one piece, not 2 like you. Why did you do like that? There are no hard edges in B/C..


    2- I use to do straight lines for the UVs, because I believe it's better
    then for taking the advantage of the same unwrap for texturing. But I
    see that you don't.. Is it right to unwrap in straight lines aswell?
  • EarthQuake
    1. No reason really, uvs were quickly done, generally I would weld those 2 chunks together.

    2. Distortion is the reason I didn't get too crazy with straitening the other way, when you have one are that is half as wide as the other, but the same width on the uvs, you're gonna get stretching/distortion. So that is always a balancing act.
  • styx
    EarthQuake wrote: »

    2. Distortion is the reason I didn't get too crazy with straitening the other way, when you have one are that is half as wide as the other, but the same width on the uvs, you're gonna get stretching/distortion. So that is always a balancing act.


    Hey thanks for the prompt answer.

    But I thought that for the normals, as they are baked, there shouldn't be any distortion in there, because the baker program adapt it to the size, isn't it?

    Or you're referring to the distortion when texturing? Yeah of course, in that case is a balancing act.
  • EarthQuake
    Yes, texturing distortion, thats more of a general uv problem than anything to do with baking/normals.

    I prefer not to clamp all my edges, because if i'm using "more" uv space technically, that doesn't always mean the asset will look better, esp if one area is squashed 1:2 but has more detail, depending on the type of surface it is, this can look worse, even though you're using "more" of the space. So, like what was discussed in that UV thread back a bit, using a higher % of your uv space doesn't necessarily equate to better results.
  • styx
    Thanks again for the explanation Earthquake, I don't know which UV thread are you
    talking about. I agree on what you say but I also use straight UVs because AFAIK
    there are less problems with the seams, or this is what I believe.
  • Eric Chadwick
    styx wrote: »
    Thanks again for the explanation Earthquake, I don't know which UV thread are you
    talking about.

    Maybe the first one here?
    http://wiki.polycount.com/TextureCoordinates

    Awesome thread Joe, many thanks for spending the time.
  • EarthQuake
    yeah; http://www.polycount.com/forum/showthread.php?t=80947

    When it comes to seams, I really do not spend a lot of time worrying about them, I follow a couple simple rules:
    1. Place seems in natural places, ie where there is a real seam in the highpoly mesh, place seams in the least-likely to be seen area
    2. Do not do much detail work along seams, if your seams are placed well this should work out fine
    3. If any detail work is essential along a seam, do it in a 3d painting app or something.

    This avoids having to worry about seams much at all, a lot of people do silly things so they have "seam friendly" layouts, but what they should really do is simply stop making this harder on themselves by creating the seams issues in the first place! =P

    Like throwing cloudy overlays that have a huge variance in brightness over your entire texture, just don't do this, it will only cause problems.
  • styx
    Thank you so much for the explanation and the links. Now I have everything clear. Invaluable :)
  • HAL
    Offline / Send Message
    HAL polycounter lvl 13
    I figured out a fix for this issue yesterday. :)

    1. Add the EdgeSplit modifier to your model, after marking the sharp edges but dont apply it yet.
    2. Duplicate your mesh and scale the whole object along the normals as you would a cage.
    3. Apply the EdgeSplit to both models.
    4. Export your HP, LP and the cage mesh.
    5. Use the cage mesh as the external cage.
    6. Bake!.
    Baked with xNormal and hard edges with an external cage for each model.

    hmm how could I not see this until now....

    Great idea thanks! but wouldnt that still result in the edges beeing split and thus having a not averaged cage since it's got
    "fake smoothgroups" then?
  • CodeFather
    Offline / Send Message
    CodeFather polycounter lvl 15
    Great stuff Earthquake, I really appreciate your mentorship ! :)
  • metalliandy
    Offline / Send Message
    metalliandy interpolator
    HAL wrote: »
    hmm how could I not see this until now....

    Great idea thanks! but wouldnt that still result in the edges beeing split and thus having a not averaged cage since it's got
    "fake smoothgroups" then?
    Sorry for the late reply!

    Yea, the cage and LP have smoothing groups because the edges are still split, but it bakes well with very little error because there is no gap in the cage.
    Its not an averaged, but its the best way i have found to get a cage from Blender :)
  • woody
    Offline / Send Message
    woody polycounter lvl 13
    Hey great tips EQ as usual!

    Decided to do a quick test on baking to gain more understanding...

    baketestwoody.jpg

    crits/suggestions on results much appreciated...

    Was sligtly confused by the inability of using 90° angles. Is this the work around for maintaining UV islands, as opposed to using different smoothing groups then breaking up the UV clusters for each smooth group? The latter makes texturing a pain.

    Also for curiosity, could you modify your low poly and remove 90° angles just for the baking process? while the final in-game model maintains those 90° angles? Is this standard practice?
  • Frankie
    Offline / Send Message
    Frankie polycounter lvl 20
    I was just reading generally up after not having made any normal map assets for a while and found this thread a bit confusing. I always thought that the waviness was caused by off perpendicular normal traces where the high poly model was at varying distances from the low poly. EG the in this example diagonal line has to go further to hit the detail.

    http://dl.dropbox.com/u/26016303/nmp.jpg

    here we see the central line being perfect as its normals are tracing perpendicular to the face, where as the second lines are bowing out towards the largest distance difference and then the ends are twice as bad as the tracing angle is twice as much. If this is the case the 90 deg angle on the first example seemed to be a red herring especially as it looked like you hadn't adjust the high poly model so had a larger lo/hi difference at the making it appear worse.

    Knowing this you can choose if you want double the frequency and half the wavelength depdening on if you put the low poly model inside/outside or intersecting the high poly.

    Bevels on the end are also not so important as you can split the verts as the uv is usually on a different island.
  • EarthQuake
    Frankie wrote: »
    I was just reading generally up after not having made any normal map assets for a while and found this thread a bit confusing. I always thought that the waviness was caused by off perpendicular normal traces where the high poly model was at varying distances from the low poly. EG the in this example diagonal line has to go further to hit the detail.

    I'm not sure where the confusion is coming from, I dont think that I ever said contrary to that. As you'll note in this example image, plus the explanation that went along with it early on in the thread:

    waviness05.jpg
    http://dl.dropbox.com/u/26016303/nmp.jpg

    here we see the central line being perfect as its normals are tracing perpendicular to the face, where as the second lines are bowing out towards the largest distance difference and then the ends are twice as bad as the tracing angle is twice as much. If this is the case the 90 deg angle on the first example seemed to be a red herring especially as it looked like you hadn't adjust the high poly model so had a larger lo/hi difference at the making it appear worse.
    The central line is fine because the normal is averaged across the face, in the middle of the face, the normal is pointing straight up, so the ray isn't seeing the sort of curvature difference it sees when looking at an angle, like it does on the ends.

    Honestly I dont get what you're saying here, I could have made my example even worse like this example? I dont feel like you're actually making a contrary statement here, just agreeing with me but in different terms.
    Knowing this you can choose if you want double the frequency and half the wavelength depending on if you put the low poly model inside/outside or intersecting the high poly.
    No, not really. Show some examples if you think this is true. Because the way a cage works, it is going to be expanded to be larger than the high, so if the low is smaller than the high, or larger, it doesn't really have any relevance. The biggest difference this will make is how your detail on your end caps are projected, ie: if you're not matching as close as possible, that detail will trace either too far down the cylinder, or too far into the cap.

    Matching the surfaces as closely as possible is always going to be the best option, not only for skewing but just general accuracy when baking.
    Bevels on the end are also not so important as you can split the verts as the uv is usually on a different island.
    This again is only true if you have a broken bake, hard edges/smoothing groups will have no affect on a properly averaged cage(ie using the cage in max, not the offset method). The cage should always be average, otherwise you'll get gaps in your project which will cause seams. Again this was explained in first few posts as well.
  • EarthQuake
    Ok, some examples.

    First off we look at what happens when we have a smaller, closest matching, and larger lowpoly model.

    cyltest01.jpg
    A. On the smaller example, we see that the edges start to project quite a bit up the side of the cylinder, this looks worst from the side view, and looks strange from the end as well.
    B. On the "closest" example, we get the most accurate bake, and our end cap is rendered as well as it can be. From the end it looks excellent, and from the sides it looks okish.
    C. On the largest example, some might say that the end cap looks best here, but you entirely miss the bevel. And from the end view, you can see the obvious bake error of the entire cap being rendered smaller than the endcap geometry.

    You'll note being larger/small has absolutely no affect on the waviness of the grooves running along the cylinder, this only affects how the detail is rendered onto the endcaps.

    Now, if we break our cage:
    cyltest02.jpg

    We see obvious seams. The "smallest" example here may be preferable to some, but at this point, you might as well just create a bump map and apply it to your cylinder instead. Also, this is not a viable solution for any mesh more complex than this.

    The closest and larger examples show clear seams from the gap in the broken cage.

    So, what conclusions can we make?

    A. It is generally best to match the high as closely as possible.
    B. Breaking your cage isn't a "fix" it just causes different problems.
    C. Adding more geometry to either the roundness of the cylinder, or as bevels at the ends(roundness is generally preferable) to lessen the extremes of either the surface variance(roundness) or projection normal direction(bevels) are the best ways to deal with waviness, using your geometry.

    Now, if you want to break these "rules" because you understand them fully and are looking for a specific effect, at a specific angle or something, go right ahead. It is however very important to fully understand it all first though. In most cases, just making a nice round cylinder that matches your high as close as possible will not only make your lowpoly model look nicer, but your bake as well. We're not dealing with super low polycounts anymore, so it really isnt worth it to get obsessive about the amount of sides in a cylinder.
  • Frankie
    Offline / Send Message
    Frankie polycounter lvl 20
    Yes not really conflicting. Sorry like I said I've not done it for a while so was just reading up to make sure I could remember everything. I've been making racing game environment assets so not exactly cutting edge.

    I tested this
    Knowing this you can choose if you want double the frequency and half the wavelength depending on if you put the low poly model inside/outside or intersecting the high poly
    and yeah I got it slightly wrong to the point where it hardly makes any difference :)

    Although I'm still not sure that the ray curvature is the best description but the ray angle combined with the distance between the high and low poly model is the factor. Although I know that's what you meant I just didn't read it that way first time.
  • EarthQuake
    Sure sure, its actually good to bring up a few of these issues, like the larger/smaller thing, a lot of people still think that, "it should always be larger" or "it should always be smaller", because someone told them that at some point, so its good to show what sort of differences that causes when baking.

    Yeah the surface curvature thing, just wording I guess, when I read over that bit it makes sense to me, but the math aspect of all of this isn't my strong suit, just the practical application. =P
  • Frankie
    Offline / Send Message
    Frankie polycounter lvl 20
    Cool stuff anway, all the Brink guns looked great and threads like this and the shapes one have obviously been great reference for loads of people including me, who would have thought you would have turned into such a helpful human being. :D Haha sorry.
  • MrOneTwo
    Offline / Send Message
    MrOneTwo polycounter lvl 12
    I think someone before me asked this question but I didnt see answer. Can you for example bake cylinder with supporting edges to remove skewed details. Then remove those supporting edges ? Ending with less geometry but with good normal map ? Or are those still needed so the normal map would still look good ?
  • EarthQuake
    MrOneTwo wrote: »
    I think someone before me asked this question but I didnt see answer. Can you for example bake cylinder with supporting edges to remove skewed details. Then remove those supporting edges ? Ending with less geometry but with good normal map ? Or are those still needed so the normal map would still look good ?

    Baking and then removing geometry is generally a very bad practice. Because you're altering the mesh normals, the normal map should always be rebaked after altering the mesh.

    If you can manage to remove the loops, but keep the mesh normals exactly the same, it will work.

    When you get to more complex meshes than just a simple cylinder, this will virtually never be an option, so its not really a good method to rely on.
  • Vapor
    Hey everyone, just read through the entire thread and looked up some tutorials to make my own normal maps, but they all turn out looking like this:
    Does anyone know why this is happening? I followed this tutorial to the letter, but my result didn't turn out that way http://wiki.tesnexus.com/index.php/Modelling_and_texturing_tutorial

    DlK77.png
  • MrOneTwo
    Offline / Send Message
    MrOneTwo polycounter lvl 12
    Flipped green channel. When baking in 3ds max set green to + (or minus...just change it from what it was to what its not ;p). Or flip it in photoshop (select green channel and ctrl + i).
  • Vapor
    Nope, green orientation is set to 'up' in Max, I've tried flipping it aswell but it just looks worse.
    My basic workflow looks like this:

    1. Make the lowpoly and unwrap with TexTools, smoothing groups from UV shells.
    2. Make a copy (not instance) of the lowpoly to make the highpoly.
    3. Put a new basic shader to both pieces of geometry.
    4. Assign a projection modifier to the lowpoly and make sure the cage encapsules both shapes.
    5. Pick the highpoly from the 'pick list'
    6. With the projection still marked, press 0 and go to render to texture.

    I think this is where I might be doing something wrong. I select the '3dsmax.scanline.radiosity.high' from the preset menu, enable the global supersampler and tick object and image motion blur on.

    After that I just enable projection mapping and choose what size I want on my map and render, the normal map renders out just fine but when I apply it, I get the result I posted above.
    Every single time, with Xnormal aswell.

    If anyone know, please tell me where I'm messing up.
  • metalliandy
    Offline / Send Message
    metalliandy interpolator
    can you post your UV and normal map please?
  • Vapor
    Sure thing, here's the UV's:

    2PCAw.png

    And the Normals:

    2XdmA.png
  • EarthQuake
    Normal map itself looks fine, how are you previewing the result? To me it looks like something wrong there, green channel flipped or your map is loaded in the wrong slot or a broken shader of some sort.
  • Vapor
    I'm using Xoliulshader in 3ds Max 2010x64, I've also tried plugging it into the bump slot in a basic shader and then rendering with the scanline renderer, aswell as trying with the 3point shader.
    It looks the same in all three, and flipping the green channel makes it look worse.
    I also tried in Max 2009, still no deal.

    Here's my .obj files if anyone wants to take a look at them: http://dl.dropbox.com/u/10712002/Low%20%26%20High%20Poly%20Cylinder.zip
  • EarthQuake
    Importing those objects into max and doing a simple bake gives me perfect results, maybe something is messed up with your max scene? Reset xform etc?
  • Frankie
    Offline / Send Message
    Frankie polycounter lvl 20
    Vapor wrote: »
    I've also tried plugging it into the bump slot in a basic shader

    Sorry if this is a stupid post but did you have to set it up as a "normal bump" rather than just bitmap in the default shader?
  • Vapor
    Frankie: Yeah I did that.

    Here's a quick video I made that shows how I do it from start to finish and the crappy end result I get: http://www.viddler.com/explore/VaporV/videos/3/


    Edit: I think I solved it somehow, adding a smooth modifier and exporting to Xnormal seems to somehow make it work:
    cIIbqa.png
    Although, baking in Max still gives me a bad result.
  • jordan.kocon
    Offline / Send Message
    jordan.kocon polycounter lvl 13
    So I hate posting this, but I am linking my high poly and low poly of a very simple shape. I just finishing baking a whole gun and everything worked fine, except for this one piece. Can anyone try baking it and tell me what happens? I am using Maya's transfer maps. I would be forever grateful if someone could take the time to check this out, been fighting this all day and I just want to finish this last one so I can start texturing!

    File: http://www.sendspace.com/file/vweim4

    barrel-1.jpg

    Edit: One such error;

    error-1.jpg
  • sltrOlsson
    Offline / Send Message
    sltrOlsson polycounter lvl 14
    Mayas baker won't even open for me, but this is baked in xNormal with a sloppy cage..

    Bake.jpg
  • mixeh
    Offline / Send Message
    mixeh polycounter lvl 8
    Thanks for this EQ. I've learned loads. However you've confused me, or should I say, I've confused myself with smoothing groups.

    Using Max 2009, any edge sharper then 90 degrees I've had to harden the edge to get a decent result, however all your cylinders seem to be 1 smoothing group. So basically you're saying you can have an entire model, as one smoothing group. But how can this be achieved - do I need to use Maya to bake my normals?

    Secondly, does that mean in Maya where you split your UV's are you theoretically hardening your edges by doing that?

    I am looking to move to do my bakes in Maya. Is it preferred to match using Surface or Geometry normals? I'm not sure on the difference.
  • EarthQuake
    A. Whether or not you're using SGs/Hard edges is moot when it comes to your cage, as long as your cage is a proper average cage, and not simply a ray distance(ie: offset in max).

    B. Maya displays maya normals in the viewport properly, because the render and baker are synced up. Because it is displayed correctly, hard edges or not are much less important.

    3ps shader with quality mode normals for max: http://www.polycount.com/forum/showthread.php?t=72861

    Big thread on the issue: http://www.polycount.com/forum/showthread.php?t=68173

    C. Maya doesn't "do" anything you're not telling it to do. Surface or Geometry, I dont remember which offhand. I'm sure i've written a few posts on this in the past, but the one that doesn't cause gaps at hard edges in the one you want.

    I have a script that sets all my uv borders as hard edged in maya, for a few reasons i've also written many times about. I do this in max too.

    D. You should use the baker that your engine is synced up with. If your engine isn't synced with anything, you will need to add more geometry, and use more hard edges/SGs to avoid smoothing errors.
  • Mc Fadge
    So, here are my two models (high left, low right):

    http://img204.imageshack.us/img204/8233/barrels1.jpg

    When I bake the normal map, I'm getting waviness where the barrel's ridges come out:

    http://img839.imageshack.us/img839/7865/barrels2.jpg

    http://img88.imageshack.us/img88/2609/barrels3.png

    Now, while I've EarthQuake's posts and feel like I understand most of it, that's obviously not the case because I still need to ask. Is there any way to remove the waviness in this normal map? Or is it just the best I can do with the low poly model?

    Also, another somewhat related question: smoothing groups. What exactly are they? In Maya I use the Normals menu under the Polygon menu set to control the appearance of my models. After a bit of reading I've found that Maya doesn't utilise them, and instead uses the above method instead. Just wondering what the difference is and how it affects me.

    Reply from EarthQuake:
    Well,

    A. The waviness you have there is so absolutely minor, that you would never notice it in a game or whatever, you only notice it by zooming in way farther than you'd ever see. In addition to that, you generally never want to totally eliminate "waviness" as it can help to make your model look more round from certain angles.

    Your map could use some more anti-aliasing, either render 2x the size and size down in PS, or turn up the AA quality in the transfer maps options.

    B. Smoothing groups is a max term for setting hard edges, in Maya, you just click the edge and set it to hard. Max has a convoluted system to do this, but a lot of people use max so its just a common term to use.
  • metalliandy
    Offline / Send Message
    metalliandy interpolator
    Mc Fadge wrote: »
    So, here are my two models (high left, low right):

    http://img204.imageshack.us/img204/8233/barrels1.jpg

    When I bake the normal map, I'm getting waviness where the barrel's ridges come out:

    http://img839.imageshack.us/img839/7865/barrels2.jpg

    http://img88.imageshack.us/img88/2609/barrels3.png

    Now, while I've EarthQuake's posts and feel like I understand most of it, that's obviously not the case because I still need to ask. Is there any way to remove the waviness in this normal map? Or is it just the best I can do with the low poly model?

    Also, another somewhat related question: smoothing groups. What exactly are they? In Maya I use the Normals menu under the Polygon menu set to control the appearance of my models. After a bit of reading I've found that Maya doesn't utilise them, and instead uses the above method instead. Just wondering what the difference is and how it affects me.

    Reply from EarthQuake:

    The closer the LP geometry is to the HP geometry, the less waviness you will get on your map. So the best way to reduce it, is to add more sides to your cylinder. I tend to use something like 22 sides for something the size of a barrel.

    When you apply smoothing groups, you are essentially splitting a designated area of a mesh, so that it becomes non-contiguous, whilst still retaining its position in 3d space. Doing this creates a new vertex and vertex normal around the borders of any hard edge/smoothing group that was set, which tells the 3d application which direction to light it from.

    In Maya you need to use Hard Edges. There is no difference between smoothing groups and hard edges, other than the way in which they are applied and created. :)

    http://www.ericchadwick.com/examples/provost/byf2.html
    http://wiki.polycount.com/NormalMap#Smoothing_Groups_.26_Hard_Edges

    HardvsSoft.jpg
  • EarthQuake
    I tend to use something like 22 sides for something the size of a barrel.

    Maybe i'm anal retentive, or maybe this is a typo, but i always try to use an easily divisible # of sides for cylinders, like:

    6
    8
    12
    16
    24
    32
    36
    48
    64
    etc

    This really helps with LODS and such, with 22, your lod1 is 11 and your lod2 is 5.5... just doesn't work. However, with 24 your lod1 is 12, your lod2 is 6 and your lod4 is 3, can go quite low without any rework, just remove some edges. This can also be very helpful when optimizing a lowpoly mesh. 12 can also quickly turn to 8 with some edge collapsing too and things like that, but when you start using strange # of sides, its just messy.

    Sort of offtopic but this always bothers me when I see someone with a 15 sided cylinder or something, just like... wat

    Not to mention uv/mirroring issues.
  • metalliandy
    Offline / Send Message
    metalliandy interpolator
    Yea, very good point :)
  • hamzaaa
    Offline / Send Message
    hamzaaa polycounter lvl 11
    EarthQuake wrote: »
    Oh, and another thing. Even if your lowpoly's normals look like A, your Cage/Projection mesh normals look like B. That is unless of course your bake is set up poorly(either using "offset" in max, match using "surface normals" in maya, or using the ray distance in XN instead of a proper, welded cage). If your cage is not averaged, you will get seams on all of your hard edges, as the normals will be facing perpendictular along those edges, and cause gaps in the projection.
    waviness07.jpg

    This confuses me somehow. I thought the cage is only the limitation for the rays how far they are cast and the lowpoly normals tell them in which direction to go. But if I understand the stated above correctly, the averaged cage "overrides" everything and handles the raycast as if the whole model has assigned 1 smoothing group? Then what's the point in assigning smoothing groups? Correct me if I am totally wrong.. thanks!
  • DOG-GY
    Offline / Send Message
    DOG-GY polycounter lvl 12
    I'm also confused about the cage, but more specifically about how I go about making a good cage and how to recognize a bad cage. I've always just done distance based in xNormal and it's worked, but of course with a lot of tweaking. What's the best way to do my cage?
  • EarthQuake
    There aren't really any rules for a "good cage", chances are if you need to worry about having a "good cage" you've got a bad lowpoly model. Some people like to spend a lot of time tweaking the cage, when they should just make sure they have a solid lowpoly and understand how averaged normals work, and how that affects the ray projection.

    Using the distance based method in xnormal isn't a cage persay, as your hard edges are breaking the cage etc.

    I'm sure I could give you some tips on what makes a good cage, but that is essentially useless information. Once you understand the technical aspect of raytraced projection and how it relates to your lowpoly meshnormals/cage, the rest should be straight forward.
  • hamzaaa
    Offline / Send Message
    hamzaaa polycounter lvl 11
    EarthQuake wrote: »
    Once you understand the technical aspect of raytraced projection and how it relates to your lowpoly meshnormals/cage, the rest should be straight forward.

    I think this is what I don't fully understand yet.. I will refer to my previous question again.

    waviness07.jpg

    You said that even if you put in smoothing groups and stuff and the meshnormals look like A, the cage will still look like B. So the cage averages all normals which also having everything in one smoothing group does, so whats the point of using hard edges instead of just one smoothgroup for everything? This got me totally confused, after I thought I understand it >_< Especially after watching Racer445's Sci-Fi prop tutorial because there he uses smoothgroups everywhere and almost no bevels. Could you elaborate on that again, for a newbie? Thanks! :)
  • EarthQuake
    hamzaaa wrote: »
    I think this is what I don't fully understand yet.. I will refer to my previous question again.

    waviness07.jpg

    You said that even if you put in smoothing groups and stuff and the meshnormals look like A, the cage will still look like B. So the cage averages all normals which also having everything in one smoothing group does, so whats the point of using hard edges instead of just one smoothgroup for everything? This got me totally confused, after I thought I understand it >_< Especially after watching Racer445's Sci-Fi prop tutorial because there he uses smoothgroups everywhere and almost no bevels. Could you elaborate on that again, for a newbie? Thanks! :)

    When using a proper cage, your lowpoly meshnormals (hardedges, smoothing groups, whatever you want to call it) are ignored. This enables you to project an entirely seamless bake.

    If you're using a non-averaged cage, you're using the mesh normals of the lowpoly, and the vertex' are broken along your hard edges, this means you get gaps in your projection anywhere you have hard edges.

    So, when using a cage, you can use bevels, smoothing groups, etc it doesn't actually matter. The cage has averaged normals, regardless of your lowpoly mesh normals.

    The point of using hard edges/smoothing groups should never be to fix ray projection errors(waviness, skewed details etc) as all that does is create more problems(seams from the gap) but is often used to lesson smoothing errors and other similar artifacts.
  • hamzaaa
    Offline / Send Message
    hamzaaa polycounter lvl 11
    Thanks for your answer, now I understand! :)
  • DOG-GY
    Offline / Send Message
    DOG-GY polycounter lvl 12
    Thanks for the replies. I do have a few more questions, if you can bear with me.

    I understand (the basics of) how the raytracing works and why hard edges cause issues with it. But, from my understanding when you apply a normal map to the low poly the normals of the loware ignored and replaced by those of the normal map. So, why bother having multiple smoothing groups at all? Perhaps I'm just blindly overlooking something here. For all of my models, I've been baking in xNormal with averaged but based on a distance that works for the model (making sure the distances aren't too far out and cause errors). When I bring the normal map back into Max or Unreal or Source, the models look fine with one smoothing group and the map applied.

    Am I just getting lucky?

    Hopefully I'm getting something right.
1356711
Sign In or Register to comment.