Home Technical Talk

normal map pojection issue [3dsmax 2011 to unity]

3vh8e.png


I have tried several cage projection shapes, but I don't get a normalmap that round the edges. Where I go wrong?

Replies

  • Neox
    Offline / Send Message
    Neox godlike master sticky
    what are the import settings of your normalmap in unity? default is texture, if you switch to normalmal the default settings are use greyscale, so import is as normalmap and turn the greyscale stuff off
  • Luxxa
    Yes I have already set import "Normal map" with greyscale off.
    Perhaps the normal not is good enough.
  • Farfarer
    Offline / Send Message
    Farfarer polycounter lvl 17
    Try making your low poly mesh one smooth group and ensure that the UVs are properly welded.

    Looks like there's vertex splits of some kind cropping up which you don't want.
  • Luxxa
    with smooth, it look wrong in a different way
    zPOuE.png
  • Farfarer
    Offline / Send Message
    Farfarer polycounter lvl 17
    You'll need to re-bake the normal map after any changes to smoothing, vertex positions or UVs.
  • Luxxa
    Thanks, it work! With a smooth value of 50 it look fine!

    mTS8r.png
  • GeeDave
    Offline / Send Message
    GeeDave polycounter lvl 11
    Just for clarities sake, this issue is not related to Unity in the slightest. From the first image you posted it was clear that the normal map itself was the problem, not any sort of import settings. You could have tried the same object and normal map in any game engine or real time viewer and it would have yielded the same results.

    The reason you had to use just one smoothing group is because hard edges on angles cast rays in opposing directions, which causes a gap or split in the bake, essentially it "misses" a portion of your high poly model. I'm pretty terrible at explaining these things though, so just have a gander at this:

    http://www.bencloward.com/tutorials_normal_maps10.shtml
  • Farfarer
    Offline / Send Message
    Farfarer polycounter lvl 17
    Good to hear :)

    Generally you don't want smoothing breaks where there aren't UV splits to go along with them. UV splits where there aren't breaks in smoothing are fine.

    So for this prop, the flat top of the bolt(?) could be a separate smoothing group but the rest of it should all be one group.

    This is because along the smoothing break, your normal map has to have a hard split and calculates different normals for each smoothing group but it all ends up being written to the same pixels, meaning that the resulting map will have flaws where that split in smoothing is.

    GeeDave: It's not related to the projection; you can see the projection cage used in the original image is unsplit.
  • GeeDave
    Offline / Send Message
    GeeDave polycounter lvl 11
    Farfarer wrote: »
    GeeDave: It's not related to the projection; you can see the projection cage used in the original image is unsplit.

    I didn't mention projection, but I see why my post is confusing. What I meant by my comment is that having different smoothing groups on the low poly forces the normals of those faces to cast in opposing directions, whereas you'd want that soft edge in the "middle" of two faces in order to receive a correct projection. Like so:

    tutorial_normals34.gif

    That's referring to smoothing groups, and here's the example where you have different smoothing groups on connected (angled) faces:

    tutorial_normals33.gif

    Edit
    I'm trying to explain why you were right, not offering opposing information, just an FYI. I seem to be failing though.
  • Farfarer
    Offline / Send Message
    Farfarer polycounter lvl 17
    Hmm, it's not due to the faces casting in different directions giving a wrong projection, there are no gaps.

    It's just that it tries to reconcile two different results (one for each smoothing group) along the pixels (or many, anti-aliasing depending) that sit on the UVs of the smoothing break. Upshot of which is that you get the wrong result for all of those pixels.

    The images you're showing are what happens when there is no projection cage, meaning the renderer casts out along the interpolated vertex normals (which creates a split at the smoothing break that misses geometry) rather than following the cage.
Sign In or Register to comment.