Home Technical Talk

Normalmap baking

Hi,

I'm trying to bake a normal map but something is wrong. The middle pillar is the high poly the right one is the low and you can see the normal map applied on the left pillar.

I think the horizontal creases should have the same color values from top to bottom, to me it looks like the creases look like outward bulges at the bottom, and slowly go to inside creases towards the top. Am i wrong about this?

What could be causing this? I am choosing tangent space for the normal options. I'm also followed a couple of tuts, i cannot figure out what i am missing.

Replies

  • motionblur
    Offline / Send Message
    motionblur polycounter lvl 12
    If you look into your normal map you see that the texture itself includes this "bending". The segments in the normal map should look the same from top to bottom in your example scene.

    My guess would be that you might have baked the map without any phong- or edgebreaks - e.g. a model with smooth normals. Afterwards you applied the texture to a model that did have edgebreaks - like the pillar shown in your example.

    How did you bake your normals?

    As a general rule you always need to bake your normals from a model that contains the same edgebreaks as the model you are displaying the normalmap on later. In most cases that means a comepltely smooth lowpoly model for organic meshes.
  • dirtyhairy
    Offline / Send Message
    dirtyhairy polycounter lvl 12
    are you baking in max?
    Whats happening is that when your cage gets pushed out, it goes out at an angle, so when it references the high poly, its skewed, looking at it from an angle.

    Try this, detach the middle faces, but keep in them part of the same model. This way when you push out the cage, its not attached to the top and bottom parts, so it will push straight out and you will get a clean bake.

    Hope that helps!
  • motionblur
    Offline / Send Message
    motionblur polycounter lvl 12
    motionblur wrote: »
    As a general rule you always need to bake your normals from a model that contains the same edgebreaks as the model you are displaying the normalmap on later. In most cases that means a comepltely smooth lowpoly model for organic meshes.

    Actually I have to correct myself here. What I wrote is only partly correct and might be a little misleading.
    This sticky here explains in more detail and better than I could, here: http://www.polycount.com/forum/showthread.php?t=107196
  • Ghogiel
    Offline / Send Message
    Ghogiel greentooth
    Rather than the hard edge one I think he wants this sticky http://www.polycount.com/forum/showthread.php?t=81154


    dirtyhairy has the right end of the stick. Vertex normal direction controls the direction the cage gets pushed to. Cage is basically the ray cast direction for baking purposes. Hard edges on the low poly don't affect the direction the vertices on the cage will get pushed to, it acts as if the normals are averaged, that's why he suggests actually breaking the geometry before making a cage, as then the middle part of the mesh with those sections the cage would push out perpendicular to the low poly.
  • madmenno
    Interesting, did not have time to test this out but i will asap. One thing that botters me is that this is a simple mesh. What if i have a much larger hard edged model and want to bake that, then i would have to detach all those 90 degree concave parts. Are there other tools for this?

    PS.
    And i'm baking in max with the render to texture.
  • Ghogiel
    Offline / Send Message
    Ghogiel greentooth
    Adding "moar geo" on low poly is another solution often cited.

    But yeah you can always predict this behavior if you understand how the rays are cast.

    check the linked sticky.

    The idea with the breaking of the center bit as suggested is so that the cage ONLY pushes out in the X&Y since the only adjoining faces are the ones that go around the pilar. If it is attached to the top and bottom end caps for example, the cage will use the average normal of all the adjoining faces, and the cage will push out like I have shown on the right>

    cagenormalspushaveraged.jpg


    Each of those cages produce the normal maps under them.

    The other solution, adding moar geo, a couple of supporting edges in this case to control the normal direction, as you can see on the far left, these can actually be removed post bake in this instance due to every face is planar and a separate smooth group/UV shell.
    One thing that botters me is that this is a simple mesh.

    The irony is that is kinda why the issue shows up.
  • EarthQuake
    Ghogiel wrote: »
    these can actually be removed post bake in this instance due to every face is planar and a separate smooth group/UV shell.

    In this case yes, however generally this is not a good idea. With meshes of any complexity removing geometry after baking is likely to cause smoothing errors.

    You can bake an object space map, remove excess edges and then use Handplane to bake out a tangent map though.
  • timotronprime
    Offline / Send Message
    timotronprime polycounter lvl 11
    motionblur wrote: »
    My guess would be that you might have baked the map without any phong

    I don't think the material would affect it.
  • madmenno
    Awesome i got it to work, thanks a lot guys! I indeed had the change the projection cage. Still have two questions about it though.

    n56e.jpg

    Should i really leave space between the 90 degree angled faces on the UV map, it makes things harder to texture properly. I guess i have too since the normal map will bleed a bit i think, or padding is what you call it.

    Also, looking at the current normal map i have a almost orange color on the right of the bottom square. Now i have seen some other normal maps that use these colors called world space normal maps and tangent space normal maps. I created this with tangent chacked but now i am unsure if it really is a tangent space normal map.
Sign In or Register to comment.