Home Technical Talk

NormalMap baking issue

polycounter lvl 11
Offline / Send Message
SkyGround polycounter lvl 11
Hello guys!
There is a problem, sorry if somebody already talked about it.
Please, see a image - whet bake, details near edge - i think - cuz ray is not perpendicular.
There is a way - make details like this thru photoshop.
Another method - tweak cage points - fix this problem but create new - on edge.
But maybe some one know another way ??

plane01normalsmap.jpg

Replies

  • Piflik
    Offline / Send Message
    Piflik polycounter lvl 12
    You can add additional edges at the corners (similar to the support edges when SubD-Modelling) and then use these edges to adjust the cage...this way all rays will be perpendicular to the surface (as long as they are not between the support edge and the corner) and the details will bake correctly...after baking you can remove these edges (since you're working with Max...add the support edges in a new edit Poly Modifier...then you can just delete it or turn it off)
  • SkyGround
    Offline / Send Message
    SkyGround polycounter lvl 11
    In this example it will work - but when you have coplex mesh with 1 smooth group - there will be gradient on normalmap, but when you add support edges and delet it after bake - there isnt gradient => shading problems on mesh without support edges.
  • MattLichy
    Like I said in another thread, try using Offset set at 2, sometimes more or less, and see what that does.

    You could also make the cylinders not as tall, and then round off the edges a tad more so it catches better in the bake and makes it more apparent in the normal map.
  • SkyGround
    Offline / Send Message
    SkyGround polycounter lvl 11
    MattLichy wrote: »
    Like I said in another thread, try using Offset set at 2, sometimes more or less, and see what that does.

    You could also make the cylinders not as tall, and then round off the edges a tad more so it catches better in the bake and makes it more apparent in the normal map.

    You mean - less height but more first radius ? Yes... it can help. Thx.

    I think, question must be sound like - "Is there way to bake normal map on such thing properly without tweaking hi-poly and low-poly?"
    Really want to know it. Cuz in small terms - dont want to tweak such thing, it will be cool just bake it.
  • EarthQuake
    You can manually adjust the cage to account for these sort of errors, however i generally think it is a waste of time, i know a lot of people like to spend ages tweaking cages but it is a really poor workflow. Generally just fixing it with geometry on your low is the best solution.

    There isn't any magic solution here, you first just need to understand why the issue is occuring, then it will be straight forward to fix it. What happens is the direction the ray casts to "find" the highpoly is averaged along the lowpoly mesh's surface, so your projection mesh normals are skewed, ie: pointing at an angle other than facing directly down onto the high. This will always be the case.

    There are a variety of things you can do (add more geometry, split edges in the cage, manually tweak the cage mesh in max). However unless you're really hurting to meet a particular geometry limit, simply fixing it in the model is the best solution. Everything else either adds more problems(spliting edges will create gaps), setting up a custom cage is a slow and tedius process that must be re-done whenever you edit the model which makes it virtually useless in a production environment where you are likely to do a bunch of test bakes and then do revisions/changes to the mesh later on.

    The sort answer is you simply need to make your lowpoly mesh more accurate to your highpoly mesh, this will solve 99% of baking issues, and more accurate means not only the shape, but the lowpoly mesh normals/surface direction as well. It seems a lot of people only consider half of it.
  • SkyGround
    Offline / Send Message
    SkyGround polycounter lvl 11
    Thx EarthQuake, agree with you at 100%.
    I thought that there is no "MagicButton", but want to be sure.
    So in this situtation the best solution for me is to add such details in Photoshop.
  • Ott
    Offline / Send Message
    Ott polycounter lvl 13
    I agree with EQ 100%. He saved me having to write up the same thoughts :D
    So in this situtation the best solution for me is to add such details in Photoshop.

    You should also realize that it doesn't matter how accurate that cage is, getting a detail that looks that "high" is very unlikely. Normal maps are great, but when you look at the detail at a slight angle it isn't going to change in silhouette whatsoever, no matter how accurate the bake is.

    Also, you can only dedicate so many pixels to that detail on your normal map, meaning that the level of quality is hindered in the first place. If it were a big important piece and you NEED that detail, give it more geo.

    There's always going to be a sweet spot when it comes to floating details like this - in that sometimes you can only get away with so much height, depth, and pixel density to make it work and look convincing.
  • Michael Knubben
    Render once without cage (you won't have this problem) and then comp the resulting bits in. This is made infinitely easier if you use smoothing groups so you don't get very much in the way of harder-to-edit gradients.

    Ofcourse, the other options are all viable ones as well, and could actually be used in conjunction, such as Per's suggestion.
  • EarthQuake
    You will still have the same problem without a cage. A cage does absolutely nothing different as far as ray direction than using offset unless you A. Totally fuck up your cage and have it impolding onto itself or B. Manually adjust your cage to account for errors.

    If his mesh was 2 quads with a hard edge inbetween, doing two bakes would work. However he's got a bevel edge and 1 smoothing group, so cage/nocage projection normals will be identical. Not using cage on a mesh with smoothing groups means there are splits at those hard edges, which is why you always *need* to use the cage on a mesh with hard edges(or do composite bakes as you suggest). If you have 1 smoothing group applied to the entire mesh, you can simply use offset.

    Offset may be slightly more reliable or even accurate than using a cage(on am mesh with NO hard edges), however you're not actually addressing the issue switching between methods in this case.
  • MattLichy
    A cage might work better in some situations, but if offset works, then I'd rather use that since it saves alot of time.

    There's no harm in trying it, it takes literally a check of a box, and then you render. Instead of screwing around with the cage.

    Edit: I'm not saying use the offset in this situation particular, but in general.
  • Michael Knubben
    Eq: I did mention using smoothing groups, but I failed to mention that he'd absolutely need the smoothing groups to fix the issue.

    Ofcourse, doing it in photoshop is a good option as well, but in cases where you have a lot of repeated elements like these, randomising them in 3d makes for a very nice (and fast) effect that you can't just replicate in 2d.
  • SkyGround
    Offline / Send Message
    SkyGround polycounter lvl 11
    Thx to all guys!
    MightyPea Yep, using different smooth groups help. But client ask - use only 1 smooth groups. I also saw screenshots from engine - there is no any trouble with shading - all looks like in proper shader from 3pointlight guys. I think client have engine with same tangent calculation like in 3ds max
  • Mark Dygert
    Isn't it kind of pointless to bake two large high profile nubs to a flat plane? They stick up so high its going to look like ass either way. No amount of normal map wizardry will effect the silhouette of the object... Unless I'm looking at this thing the wrong way?
  • Ott
    Offline / Send Message
    Ott polycounter lvl 13
    That's kind of where I was going with it too Vig hah
Sign In or Register to comment.