Home Technical Talk

Normal Map problem that has been bothering me for ages!

polycounter lvl 12
Offline / Send Message
Hayden Zammit polycounter lvl 12
If someone could help me out with this I'd be eternally grateful. Thats right: grateful forever and ever.

I'm doing some normals for this model:

modelys.jpg

Uploaded with ImageShack.us


However when I bake the normals on the poles at the bottom I have a problem. it looks good from the top.

15655623.jpg



But if I look from a lower angle its like this:
39159039.jpg


heres the low poly and the high side by side.


17635962.jpg



Anyone know what causes this? I'm using Maya by the way.





Replies

  • teaandcigarettes
    Options
    Offline / Send Message
    teaandcigarettes polycounter lvl 12
    Try to adjust your cage as described here:

    http://wiki.polycount.com/Normal%20Map#Solving_Wavy_Lines

    Hope that helps :)
  • Ott
    Options
    Offline / Send Message
    Ott polycounter lvl 13
    Yep yep....can also read Ben's tutorial over at

    http://www.poopinmymouth.com/tutorial/normal_workflow_2.htm

    Bare in mind that if you don't follow the silhouette of the high poly cylinder closer and are hoping for it to pop out, it is still going to look a little "off" at certain angles. Doing it "correctly" and removing the wavy lines will have it look correct straight on, but when you go back to your top example view, you will see a bit of the waviness at that angle instead.
  • Michael Knubben
    Options
    Offline / Send Message
    Ott's spot on. It's impossible for this to look good from all angles due to the shape of the lowpoly. You're going to have to decide which view is most important, and choose your solution based on that.
  • Piflik
    Options
    Offline / Send Message
    Piflik polycounter lvl 12
    Also make sure your Height segments in your Cage and Lowpoly coincide...

    Example (exaggerated):

    Wavy_Lines.jpg
  • Snader
    Options
    Offline / Send Message
    Snader polycounter lvl 15
    Note: since you have a cylinder of only 1 segment (height) you'll need to cut a line in the model to get the extrusion of the HP nicely centered. After baking, remove the cut again.

    bakelow.png
  • Hayden Zammit
    Options
    Offline / Send Message
    Hayden Zammit polycounter lvl 12
    Damn. I was just starting to like normal maps too. Thanks for all the tips guys. I'll go through it all and see if I can fix it. If all that fails for me I can just paint it in Photoshop and use CrazyBump. I just wanted to do it the high to low method to learn it a bit more.

    SNADER, I just tried what you suggested. I re-baked with the extra line and it got rid of the waves, however the the normalled part itself looks less smooth at the edges, and there's a problem with the seams too.

    capturebbp.jpg
  • EarthQuake
    Options
    Offline / Send Message
    http://www.polycount.com/forum/showthread.php?t=73810

    As i said in that thread, Snader's method is a pretty bad idea generally. It can work with a small amount of very specific geometry types, but isn't something i would recommend doing.

    Hayden, the absolute easist/most straight forward thing to do is simply use 8 or 12 sides instead of 6. 12 will probably be enough. The reason this happens is that the projection mesh is averaged around the caps of the cylinder, so when the raytracer "looks" at your highres, it is viewing it from an angle. At an angle the difference between the shape of the high and low is magnified, so you get these wavy lines.

    It looks like you're using maya, so Piflik's method would not apply to you, as editing the cage(envelope) in maya only adjusts the ray distance not direction. In general it is much better to simply understand how your mesh normals will behave and adjust them accordingly using geometry, as everyone seems to have a hack or a tweak or a fix for stuff like this, however they become very slow and clunky when you start dealing with more complex geometry, and in some cases simply do not make any sense/work at all.

    So, to fix your geometry you have basically two choices, you can increase the number of sides on your cylinder to make the difference between the high or the low less extreme, or you can cut in an edge loop or two to make your projection mesh's normals more accurate to the high. Either way what you need to do is simply have a more accurate mesh, i would probably add more sides as this will also improve the silhouette of your mesh and both methods will eat up the same amount of geometry. This likely will not cure your problem 100%, but it should leave you with an "acceptable" amount of wavyness, and that is fine because it is simply not worth your time to be anal retentive about eliminating wavyness entirely, as it can look worse perfectly straight in some cases.
  • Hayden Zammit
    Options
    Offline / Send Message
    Hayden Zammit polycounter lvl 12
    Thanks for the tips, EARTHQUAKE. I tried using 12 sides instead of 6 for the low poly. The waves seemed to actually look worse. All this info will be good to know in future. I think for this piece I might just paint in PS. They're not key element in the game anyway. I just thought I'd try doing it high to low baking just to learn a bit more about the process.
  • Snader
    Options
    Offline / Send Message
    Snader polycounter lvl 15
    @Hayden:
    have you tried my technique with flat shaded sides/every side it's own smoothing group (on the lowpolies). It should fix the seams. Though this (separate smoothing groups) brings some problems of itself I think it will give the best result in this specific instance.

    It won't completely fix your problems, because what a normal map only does is change the lighting on a pixel/texel. It won't actually change the geometry. Having straight lines across (as in your last render) will be the most balanced outcome (between upwards and downwards waves) you can get. To get it to look a bit better/rounder you'll still have to add more sides.

    The easiest in this case though, would be painting it in. This would get slightly less accurate results, but meh, it's a really plain object anyway. And again, more sides = more betterer.



    @EarthQuake:
    I agree with you, I hadn't thought about the effect the vertex normals would have. My solution needs all sides to have a flat base color, which of course isn't going to happen with a bake like this.

    Though, how would you go about fixing this?
    skewed%20bake.png
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    Snader: To fix that, I would say you should change the highpoly :)
  • CheeseOnToast
    Options
    Offline / Send Message
    CheeseOnToast greentooth
    Here's how I would do it usually :

    cylinderNormalsMaya.jpg

    This method looks best from side angles, and looks more "low poly" as you view from a more oblique,top-down angle. This is somewhat alleviated by having more sides to your low poly model though. Please excuse the crappy UV map ; I spent no time fixing it to match the geometry. It still works though.
  • Hayden Zammit
    Options
    Offline / Send Message
    Hayden Zammit polycounter lvl 12
    Cheeseon Toast, yours looks good. Only thing I don't like is how its less smooth on those edges as opposed to my original way.

    capturevy.jpg



    I tried it your way with just having the whole low poly using smoothed normals and it worked out the same.
  • Snader
    Options
    Offline / Send Message
    Snader polycounter lvl 15
    You're not going to get any better results, unless you use more sides, it's as simple as that. A normal map is just a texture applied to a model, it doesn't change the place where texels get rendered. it just changes the lighting information. You have 3 choices, and which one suits you best is dependent on how/where you'll use the model.

    texture_vantagepoints.png
    You see how the waves look good when viewed from one point but horrid from the other? And how straight lines never look perfect? That's where you'll have to decide how to prioritize.

    Edit:MoP, heh. Such a simple solution and it hadn't even crossed my mind once. That's what happens when you're stuck thinking in the box of 'lowpoly' and 'cages'. Thanks.
  • CheeseOnToast
    Options
    Offline / Send Message
    CheeseOnToast greentooth
    Well, that's the compromise. It either looks good from the side or from the top, not both at once. As I said, you can improve the top-down look by adding more sides to your cylinder, but you have to use your judgement as to how important/large the item will be on screen.

    About the all-soft normals : Maya is pretty good at generating and displaying normal maps even over extreme 90 degree+ angles. A lot of game engines aren't quite so accurate, so hardening the edges and splitting the UVs is likely to get you a better result in a wider variety of game engines.
  • CheeseOnToast
    Options
    Offline / Send Message
    CheeseOnToast greentooth
    edit : snader beat me to it regarding number of sides :D
  • EarthQuake
    Options
    Offline / Send Message
    I'm real curious to see the mesh with 12 sides, as you say it looks *worse*? I can't imagine how this could be the case.
  • MR_Verkerk
    Options
    Offline / Send Message
    The main problem here is the lack of mesh definition, the high poly simply differs to much from the low poly to get a good baked normals map. And if you are willing to add a few triangles to make it look better id say, add them like in the attached image (I used 5 sides to make sure the triangle count doesn't get to high).

    I usually make sure that the silhouette of the low poly matches the high poly as closely as possible, the rest can be filled in with the normals map. but a normals map is merely a effect, so it can never add to the silhouette itself.
  • eld
    Options
    Offline / Send Message
    eld polycounter lvl 18
    Great trick I learned from a smart guy:

    smudgetrick.jpg

    Just be sure to know when you can use it and when you cannot, it's usually great and fast for cylinder wobble post-bake fixing.
  • Jonathan
    Options
    Offline / Send Message
    If you know what to look for, you can just marquee select the good area, and drag it out. If you use a smudge tool, I would imagine you're going to break some vector values.
  • Hayden Zammit
    Options
    Offline / Send Message
    Hayden Zammit polycounter lvl 12
    EARTHQUAKE, I didn't save a pic, but it seemed to have a wave per face. No doubt I would've done it wrong. You would know more about this stuff than me I'd imagine.
  • Piflik
    Options
    Offline / Send Message
    Piflik polycounter lvl 12
    Of course it is one wave per segment...but the waves would be smaller with more segments.
  • eld
    Options
    Offline / Send Message
    eld polycounter lvl 18
    Jonathan wrote: »
    If you know what to look for, you can just marquee select the good area, and drag it out. If you use a smudge tool, I would imagine you're going to break some vector values.

    In the case of a cylinder, which should end up with the base of the normalmap surface being completely flat, you only need one pixel row for the smudge to give you a proper result.

    But as I said, you have to know when it works and when it don't, and how normalmaps work in general :)

    one great tool in a huge toolbox.
  • EarthQuake
    Options
    Offline / Send Message
    Piflik wrote: »
    Of course it is one wave per segment...but the waves would be smaller with more segments.

    Right, it will always have a wave per face, the effect comes from this:
    For each face on your low, the edges are pretty close to the high, but the middle of the face is farther away, this is what causes the wavyness. However, if you use more sides, you should get less wavyness on each side as that "middle" of each face is close to the high than compared to using less sides. Like i said it wouldn't fix the problem entirely, however it should be better, within acceptable levels i would hope.
  • Racer445
    Options
    Offline / Send Message
    Racer445 polycounter lvl 12
    It's because there's too much wind around your computer.
  • bluekangaroo
    Options
    Offline / Send Message
    bluekangaroo polycounter lvl 13
    In response to the first post, I would either make the ridge/extrusion a little more shallow in the hi poly or simply add some more geo to the low poly if you insist on that piece sticking out so much. I think a lot of the time these issues are made more complicated than they should be. Also, if that piece is going to far from player view at most times, you can probably get away with less geo. if its going to closer to the player then add more geo.
Sign In or Register to comment.