Home Technical Talk

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

15791011

Replies

  • amokk_gw
    I haven't used any smoothing groups on the wing and the angles are about 90°, so that should be fine. I always delete all the smoothing groups on a certain point and add them where I want the surface to be smooth, but the wing doesn't have any smoothing groups assigned.
  • EarthQuake
    If you don't have any smoothing groups, doesn't that mean your entire mesh is using the same smoothing group, eg, all edges are soft? I'm getting confused at this point, so please post a shaded with no texture screenshot of the lowpoly.
  • amokk_gw
    No that means, the whole mesh has no smoothing at all. But I solved the problem. You are genius EQ.
    I've removed and set the Smoothing Groups before I unwrapped the model, then I unwrapped the model in UVLayout and reimported it into Max for some Mirroring. Apparently UVLayout has messed up the smoothing groups. So clearing all the smoothing groups again and reset them gave me a clean bake. :)
  • Chimp
    Offline / Send Message
    Chimp interpolator
    This thread has been a great read, saved to PDF for the future. Thank you!
  • pachermann
    EarthQuake wrote: »
    Thanks, maybe I'll condense everything I know and write a book someday. =)

    it will become definitly a bestseller.

    i tried first time to bake a poly object, well of coarse i got lots of artefacts.
    Then finding this thread and reading it very clear.
    I learned that my mesh was the reason for the artefacts.

    But now found the solution straight forward, thx especcialy to EQ!
  • pachermann
    ups sry for this double post
  • EarthQuake
    The lowpoly should match the shape of the highpoly as close as possible. It should be clean in that sense that it visually looks clean with the normal map baked and applied. What you've done here seems reasonable enough, though you may want to add extra sides to the cylindrical shape to avoid waviness in the normal map and make the asset look better in general. This depends mostly on how close you would get to the asset in game.
  • EarthQuake
    Well you can do a test bake first to see if its even an issue.

    Personally since its such a basic shape, I would just remodel it with more sides.
  • SuperFranky
    Offline / Send Message
    SuperFranky polycounter lvl 10
    Shinigami wrote: »
    Hmmm... ive learned on the dem shapes thread that the low poly does not has to be pixelperfect if complicated. "Thats what the cage is for ".any idea how i can add more sides to a cylinder evenly distributed? I mean with swiftloop its gonna be a mess.
    swiftloop is just what you need, just place loops while holding down Shift key. You can also just split your sides evenly with Connect and then apply Set Flow (ribbon menu) to newly created edges and it will reshape them to match the topology. Or split sides and uniformly scale them outwards. It's up to you...
  • Lawrence Preston
    Offline / Send Message
    Lawrence Preston polycounter lvl 5
    Wow, awesome information, thank you EQ!
  • BohSheh
    Offline / Send Message
    BohSheh polycounter lvl 11
    Sry for bringing bk old topic . Recently I face the same problem with superlimited tricount (only can be 8 sided) . I had did some research and foun that eq mentioned this http://www.polycount.com/forum/showpost.php?p=1377980&postcount=18

    any thought?
  • Eric Chadwick
    BohSheh wrote: »
    Sry for bringing bk old topic . Recently I face the same problem with superlimited tricount (only can be 8 sided) . I had did some research and foun that eq mentioned this http://www.polycount.com/forum/showpost.php?p=1377980&postcount=18

    any thought?

    His image is a joke, for humor. It is not a useful method.

    When the four-sided cylinder is rotated, the circle cap will separate from the sides, causing a bad silhouette.

    However this can work OK, if the cylinder is mostly hidden. For example, a car wheel can use this technique, because the wheel axis is hidden.
  • ZacD
    Offline / Send Message
    ZacD ngon master
    I've actually seen older and low spec games use this technique. (I used 6 sided here).

    5tlfyTR.png
  • Maximum-Dev
    Hello

    Reading and reading as a newbie to 3D modeling can someone simply tell me what to do to prevent the waves in a couple lines?
    I'm baking in xNormal. (smoothing groups are ok).

    u87bjp3pviay2pr1tpp2.jpg

    And normal, JPGed to reduce the size

    4vvsg7nggnfydkdjgaz7.jpg


    Thanks.
  • AlecMoody
    Offline / Send Message
    AlecMoody ngon master
    If you are referring to all the banding in your reflection, you can solve that with either increased bit depth or dithering.
  • AdvisableRobin
    Offline / Send Message
    AdvisableRobin polycounter lvl 10
    Long story short. You don't have enough bits per channel to accurately represent the normal map.

    Look at this interactive page, you can clearly start to understand why you are getting those artifacts.
    http://www.cambridgeincolour.com/tutorials/bit-depth.htm

    Solution: Don't save normal maps as JPEG. Save them as TGA. If you still have issues with TGA, then bake as 16bit Tif, bring it into photoshop and reduce it down to 8bit, this will dither the image, which can help reduce the banding.
  • PicSim
    Offline / Send Message
    PicSim polycounter lvl 10
    Hi guys,

    I'm doing a test to bake a football's helmet grid on a simple curved plane low poly. When I bake it appears strange artifacts around the helmet's grid, where there is no background, on the normal map. I tried to load a blocker file and to change the projection's cage but nothing :(

    baking.jpg
    distortion_NM.jpg
  • Quack!
    Offline / Send Message
    Quack! polycounter lvl 17
    That looks like it is picking up stray geo. Tried resetting xforms on the high poly mesh?
  • PicSim
    Offline / Send Message
    PicSim polycounter lvl 10
    Thanks Quack! When I posted this I didn't do Reset Xform but today I did it and nothing changed. I finally solved the problem. I duplicated the low poly piece (acting like a kind of screen), the high poly and I exported these two meshes together as the high poly. And everything worked fine ;)

    Solving_Issue.jpg
  • PicSim
  • mettigel
    Offline / Send Message
    mettigel polycounter lvl 6
    I think i have a little Problem. I have little Waves in my Normal Map.But im not sure where they come from.
    The Mesh is made in 3ds max (the cage too) and baked in xNormal.

    10vjx9.jpg
    2ekjb0.jpg
  • Farfarer
    This is normal behaviour when the low res mesh isn't as round as the high res mesh - the rays from the low poly wind up getting cast above/below the edge you're trying to bake due to their direction and the differing proximity to the high res mesh.

    You can tweak the cage to try and get rid of them - try and have your cage scaled out more horizontally than vertically in this case - to help the rays land as close to the edge as possible.
  • ZacD
    Offline / Send Message
    ZacD ngon master
    @mettigel, They come from having sharp right angles and are just more artifacts from having a high and low poly with sharp angles and a different number of edge loops. The first page of this post talk about this in detail, provides pictures, and offers solutions.
  • WarrenM
    That's bad for iteration. If you bake the normal map again because of mesh changes or whatever, you have to redo all of your hand edits. Fix the bake, it's the only way.
  • metalliandy
    Offline / Send Message
    metalliandy interpolator
    Farfarer and ZacD are correct. It's not an error and is also view dependent.
    Increase the number of sides on the in game asset or Increase the number of sides on the low poly asset> bake to OS normals> remove the sides> convert back to tangent space.

    @Shinigami, As WarrenM said you should never edit normal maps after thay have been baked. Think of a normal map as similar to video encoding (though with encoded data contained within an image). You would never dream of editing a video in notepad, right? Editing normals in an image editor is akin to doing just that, so it's super bad practice.
  • Odeca
    Offline / Send Message
    Odeca polycounter lvl 3
    Going back at the first post, I don't know if this solution has been posted already :

    I went crazy baking the Thompson smg barrel, but after several test bakes I found out that this works pretty well

    pe.png

    I know it might look like a mess, sorry for the bad scheme XD
  • The Visible Guy
    Offline / Send Message
    The Visible Guy polycounter lvl 5
    With being a new member on this forum, I've only just found this but I want to thank you guys for this information :) very good advice and tips. I appreciate it! :D
  • beaver_knight
    Offline / Send Message
    beaver_knight polycounter lvl 9
    Thank you for the guide. Very interesting.

    I have a few questions:

    1)About "Averaged cage":

    I red around (this thread included, i think the last picture in the first post shows it?) averaged cage. But i cant find anywhere what averaged cage is. Is this a cage that was all smoothed? Or it is something else?

    My usual workflow of making cages is Maya: copy the low-poly mesh, select all verts, set Move tool to "Normal" and pull in the "N" direction. This how i make cages. I never smooth it or do anything with its normals, because i didnt know it is important. Is this the correct way?

    2)About supporting edge loops in low-poly:
    I actually never heard about using a supporting edge loops in lwo poly before i red you threads mr. EarthQuake. I'm familiar with supporting edge loops in high-poly modeling, but i didnt even thinked once they are used in low-poly also. Can you please provide mre examples of supporting edge use in low-poly stuff? There is 1 picture in the 1 post, but i would like to see more if it is possible. So i can understand the concept and grasp it better.

    Thank you for the great informative post :)
  • Bek
    Offline / Send Message
    Bek interpolator
    But i cant find anywhere what averaged cage is. Is this a cage that was all smoothed? Or it is something else?
    Yes. An average projection cage is an all-smooth (or no smoothing, depending on how you think of it) cage. Average means the normals are averaged rather than split between two or more directions.
    2)About supporting edge loops in low-poly:
    Can you please provide mre examples of supporting edge use in low-poly stuff? There is 1 picture in the 1 post, but i would like to see more if it is possible. So i can understand the concept and grasp it better.
    There's another example here of placing a vert specifically in the lowpoly to get a better projection (rather than adjusting just the cage)
  • ArtbyV
    Offline / Send Message
    ArtbyV polycounter lvl 8
    Hey all,

    Hoping someone can help me troubleshoot this. I'm working in Maya 2016 and using a script to soften the normals on my low poly (got the script from this thread). I'm baking in xNormal using a custom cage, saving at 2K as a Targa, and the map looks really clean. Still, I'm getting some weirdness in Marmoset. I do have tangent space set as xNormal/Mikk in Marmoset. Not sure what else it could be. Thoughts?




  • Quack!
    Offline / Send Message
    Quack! polycounter lvl 17
    2 seperate things are happening here.

    X-shaped normal errors are because your triangulation changed from when you baked to when you display. This means that you did not triangulate your mesh before you bake. Always force triangulate your mesh before you do any exporting / baking.

    The banding you are seeing is because of poor bit depth. Earthquake made an awesome post over here: http://www.polycount.com/forum/showthread.php?t=148303
    TLDR of that is to author your normal maps at 16 bit TIFF. Then save as 8 bit inside of photoshop so it dithers the result. Export your TGA from there.
  • ArtbyV
    Offline / Send Message
    ArtbyV polycounter lvl 8
    Quack! wrote: »
    Always force triangulate your mesh before you do any exporting / baking.

    Ah, never knew that. Thanks for the tip.
    Quack! wrote: »
    The banding you are seeing is because of poor bit depth. Earthquake made an awesome post over here: http://www.polycount.com/forum/showthread.php?t=148303
    TLDR of that is to author your normal maps at 16 bit TIFF. Then save as 8 bit inside of photoshop so it dithers the result. Export your TGA from there.

    I read about poor bit depth, but I didn't think that was the issue. The examples I saw the banding was visible on the normal map. Anyway, I took your advice and this is where I am at now.



    Everything is resolved except now I'm getting a slight seam at the edges of my UV islands and I didn't have that before. I used the same settings for my other bake so not sure why this is visible now. Couple questions:
    1. Do I run the script before or after I triangulate the mesh or does it even matter?
    2. Also, is it common practice to smooth out the cage or is that unnecessary?

    Thanks again for the help! I greatly appreciate it.
  • Quack!
    Offline / Send Message
    Quack! polycounter lvl 17
    Slight errors at seams can happen, but this appears to be something else.

    1. Make sure any overlapped UVs are offset by 1.
    2. Make sure there is at least 8-16px of space between uv islands(varies based on texture resolution).
    3. Make sure you are using at least 16 pixel of padding when baking your normal map. You can never have too much padding.
    4. Make sure your tangent basis is correct inside of Toolbag2.
    5. Make sure to use an averaged cage.
  • ArtbyV
    Offline / Send Message
    ArtbyV polycounter lvl 8
    Really appreciate all the help man! Turns out the cage wasn't big enough. I really don't understand that because it was fine before I triangulated the mesh prior to exporting, but whatever, I don't understand a lot of this anyway. Just really happy I know enough now to troubleshoot my own issues. Here's the final.



    It'll be nice to work on my own assets now after messing with this crate. It has a lot of geometry problems (look at the indents on the top of the crate for instance).

    Oh, not sure if anyone will ever comes across this, but you can't use GIMP to fix bit depth issues. It can't handle 16 bit files and it fractures the mesh even worse. Just do the conversion in Photoshop.
  • Quack!
    Offline / Send Message
    Quack! polycounter lvl 17
    Yay! Glad you got it working!
  • Justo
    Offline / Send Message
    Justo polycounter
    It's 6:15 am and I stayed up all night but I finally finished these 15 pages and some other related readings. I learned a lot, thank you Earthquake for being so patient with everybody even though they keep and will keep asking you the same questions. Perna could grow two heads and breasts and a mohawk but you would still be cooler. Cheers!
  • noosence
    Offline / Send Message
    noosence polycounter lvl 9
    I want to start off by apologizing. I have read this thread from front to back and back again and my head hurts from trying to figure this out. I have posted some images. I am trying to bake some hard surface stuff ( A table to be exact) and I want to have curved edges, but every time I try to bake I end up with faces that are not flat. I am using an averaged cage and xNormal but I am just not getting the results I want.

    pOnjcS2.png

    My Cage (with averaged normals...I think)

    si3u9K5.png

    My High Poly Mesh

    fhaWpZS.png

    My Low Poly Mesh

    pxatsMN.png

    My Normals...

    RtbS20M.png

    ... and my results =\
  • ArtbyV
    Offline / Send Message
    ArtbyV polycounter lvl 8
    noosence wrote: »
    I want to start off by apologizing. I have read this thread from front to back and back again and my head hurts from trying to figure this out. I have posted some images. I am trying to bake some hard surface stuff ( A table to be exact) and I want to have curved edges, but every time I try to bake I end up with faces that are not flat. I am using an averaged cage and xNormal but I am just not getting the results I want.

    Hey man, don't apologize. I ran into the same issues and I read a bunch of different threads and looked at a lot of different things before I got good results. Take a look at this video:

    [ame]https://www.youtube.com/watch?v=kGszEIT4Kww[/ame]


    I thought this was the simplest explanation I've come across and it really made everything come together in all of the various threads I read. If you still have issues, post again and I'll try and help you out.
  • Bek
    Offline / Send Message
    Bek interpolator
    @nooscence,

    You should have hard edges at UV seams (and, if possible, synched tangent spaces between baker and engine). As for why; http://www.polycount.com/forum/showthread.php?t=107196
  • noosence
    Offline / Send Message
    noosence polycounter lvl 9
    @Artbyv This is the tutorial Im following ATM, and still the same results. I feel it has to do with averaging my cage, in the video he does not average his cage he only pulls the normals out. If I just pull the normals out and leave the normals of my cage hard I get the typical seams along the edges. If I soften the normals of my cage I get this distorted Face problem. My low poly has hard edges/ seperate UV Islands, where as my Cage has Soft edges(This is what I thought an "Averaged Cage" was) and seperate UV Islands (It is a copy of my LP Object).

    @bek

    I thought the point of an averaged cage was to not have hard edges, so that the seam issue could be resolved? And idk about synced normals but this issue happens if I use xNormal or Turtle within maya.

    EDIT

    I just followed the tutorial again, and here's the renders with just pulling the normals out and not averaging them on the cage.

    1pPyFAw.png

    Within Maya (Using Turtle)

    BDgMsjC.png

    and using xNormal

    EDIT

    So this all started because I was trying to bake out some parts for a coffee table I'm working on. But the thin edges looks as though they were collapsing in on themselves when I would bake. So I figured I would do some tests on a simple cube to see what I was missing, and obviously I was missing everything ._. well here are some photos from the table and the normal map showing the collapsing edges.

    muOEZue.png

    Table

    n7cedpq.png

    and the two rectangles that are collapsed.

    Sorry for the long post.
  • Bek
    Offline / Send Message
    Bek interpolator
    noosence wrote: »
    I thought the point of an averaged cage was to not have hard edges, so that the seam issue could be resolved?
    It is. Cage should have averaged normals, but the lowpoly should (generally) have hard edges at uv seams.
  • ArtbyV
    Offline / Send Message
    ArtbyV polycounter lvl 8
    The reason why you are getting the curled in edges on your cube is because your cage isn't big enough. Try making your cage bigger and rebaking. When I did my crate further up in the thread, I didn't do anything with the cage other than making it bigger. I just checked in Maya and the edges are all hardened.
  • ArtbyV
    Offline / Send Message
    ArtbyV polycounter lvl 8
    Bek wrote: »
    It is. Cage should have averaged normals, but the lowpoly should (generally) have hard edges at uv seams.

    Ah, good to know.
  • Dan Powell
    Offline / Send Message
    Dan Powell polycounter lvl 5
    Got an issue with this shape:

    hKsXD.png

    If I've understood correctly, my two options are:

    1) Bevel the edges, fix UVs, bake again
    2) Add more sides to the overall cylinder shape (it's got 32 at the moment)

    Here's the mesh in 3D Studio

    hKthx.png

    hKtjq.png

    The cage looks fine - doing the standard XNormal SBM export.

    UVs should be fine; they are split where there is a hard edge/smoothing group change.

    Any advice? :)

    Cheers
  • Farfarer
    Try expanding the cage more horizontally than vertically. That should help cut down on the wavering edges a little (although it can introduce other issues like more pronounced skewing on the top/bottom of the cylinders - in this case it's all flat anyway so you should be fine).
  • Dan Powell
    Offline / Send Message
    Dan Powell polycounter lvl 5
    Will have a go at pushing the cage out more on the x/y - cheers. :)

    Watch this space for updates.
  • Dan Powell
    Offline / Send Message
    Dan Powell polycounter lvl 5
    Pushing the cage outwards has helped a lot, Farfarer, thanks. :) However, there is still some waviness in it - Do you feel there's anything further that can be tweaked?

    hKv6u.png

    Current cage:

    hKvb6.png
  • Farfarer
    Not easily, no.

    There will always be a slight waviness there unless you add in some bevels to reduce the issues further (but even that can be tricky to nail exactly). It's just the nature of baking.

    You could probably scale the cage out a good bit further on X/Y to reduce the effect some more.
  • AlecMoody
    Offline / Send Message
    AlecMoody ngon master
    If the cylinder waviness is critical you can do some cheaty stuff with handplane to force the result you want. In this case, it will be pretty easy to do. You will probably be better off splitting out the cylindrical part and working with it separately for this.

    Make a copy of your lowpoly model and apply 2 iterations of turbosmooth with the smoothing groups option enabled. Since this mesh has more segments you won't get the waviness artifact. Use the tessellated model to bake to object space. Then load your original lowpoly into handplane and use it to convert the object space map to tangent space.

    With handplane, you are basically decoupling the projection process from the tangent space proecess.
  • Dan Powell
    Offline / Send Message
    Dan Powell polycounter lvl 5
    Thanks Farfarer and AlecMoody - both helped clarify a lot. :)
15791011
Sign In or Register to comment.