Normal map baking - Flat surfaces and edges

Hey guys,

I’m still getting to grips with normal map baking, high res to low res. So today I’ve been working on a US style Mailbox, just for some practice. I started with a high poly model using a basic mesh and subdivisions. After that was finished I took the high poly mesh and stripped it down to a low poly version. Probably not the fastest method… but it did the work.

On to the baking! I grabbed my high res and low res, laid them on top of each other and baked. Didn’t go well at first because all the pieces were quite close together, so I did an explode bake instead. Worked like a charm! So I thought. I’ve got a clean-ish bake but I’ve ran into some problems…

The problem: On my texture bake the flat surfaces don’t appear to be flat. It’s almost as it the bake had picked up each polygon… It’s hard to explain so here’s an image: http://puu.sh/2U860.jpg
As you can probably see, there are dark areas on the front of the mailbox. You can also see some obvious lines in the normal map at the bottom too.

My last issue is only a small one and no doubt can be fixed easily: I’m getting sequential artifacts along my curved edges. This could be due to me not baking it properly, but I thought it’d be worth asking about before I mess it up even more. Here’s an image: http://puu.sh/2U8d7.jpg You’ll notice the problems along the edge of the archs and the strip above them.

Thanks in advance guys.

It has. When you bake normals, always make sure that the low-poly mesh has smooth shading. Your second issue may be a problem with the topology of your high-poly model, giving creases in the subsurfing.

Best wishes,
Matthew

Thanks for the reply Matthew.

I’ve gone over the high poly mesh and cleaned it up, but I’m still having the same issues…

I’ve had a look at my low poly model whilst it’s smooth shaded and it’s not so smooth, so I think that’s what is showing through on my bakes. Is there anyway to smooth it?
http://puu.sh/2UCQW.jpg

For the sake of me trying to explain and anybody not understanding, here’s the .Blend: http://www.pasteall.org/blend/21410

It’s kind of too smooth around the sharp edges, smooth shading on edges with an 90° angle doesn’t realy look too good. Try to add an edge split modifier to retain the sharp edges. I’m not sure how well it interacts with baking though.

Hmm, I’ve tried that but I’m not getting the desired effect…

I can’t see anything wrong with the baked normals. The problem is rather that you are relying almost entirely on ambient occlusion for lighting, and the occlusion is being calculated from the low-poly mesh. If you want to use ambient lighting, you should bake the ambient occlusion map from the high-poly model in the same way as you have the normal map.

Here’s the render with AO directly calculated from the low-poly mesh:



And here is one with AO baked from the high-poly mesh (too much contrast, but it makes the point):

Badly. The smoothed low-poly model does not need to look good before the normal map is applied; it does need to avoid any sharp changes in normal that will cause aliasing problems in the baked map.

Best wishes,
Matthew

I’m very confused. Ambient occlusion aside, as I don’t really need any sort of lighting as of yet. This piece will be dropped into Unity at some point so I can play around with it.

If you render the image without any AO at all, you get something like this: http://puu.sh/2UYi1.jpg
Which still show the horrible normals on the front. That is with the normal map applied, no other maps.

I’m not sure if I actually packed the normal map in my .blend file, so it may have to be rebaked quickly.

Edit: Should I try this? ‘Smoothing groups’
http://www.katsbits.com/tutorials/blender/sword-mesh-smoothing.php

Starting from your .blend, baking the normals, turning off AO, and moving the lamp to approximately where you now have it, I get:


Edit: Should I try this? ‘Smoothing groups’
http://www.katsbits.com/tutorials/blender/sword-mesh-smoothing.php

As I said my previous post, the entire low-poly mesh should be smooth. (Do as you please with the high-poly one.)

Best wishes,
Matthew

Attachments


Ahh, I think something might be wrong on my end. I’m doing the exact same as you are but I’m getting an error.
It’s all set to smooth, baked, AO is off and these artifacts show. I’m beginning to think that it’s maybe a problem with my graphics card, but I’ve no idea.

I’m going to drop this into unity and see how it looks there. Thank you for your time Matthew, you’ve been great help.

Edit:
http://puu.sh/2VhT8.jpg
And there you have it. It’s working fine there. I have the latest Blender version, so I’m not sure why I’m getting these issues. Hmm!

Just a quick post to say that I’m all done and dusted. Here’s the finished piece if anyone is interested.


Thanks again guys.

The first thing you mentioned, the front triangle dark shades… was caused because you flipped the edge orientation after baking, but it could be non intentional, maybe you were working with quads then triangulated it, then blender changed the orientation, then you have a nice artifact on the normals.

You need to take into account all edges orientation, if you change anything in the topology, you better bake again the normals.

Also, it’s a bad idea to triangulate before subdividing. You should use Tris to Quads (alt+j). But honestly, I think we should be able to rotate the edge orientation without triangulating already…

Thanks for the input Zafio. All the normals were calculated properly on both high and low poly meshes, as far as I know. Having dropped the model into Unity and applying the normal maps I’m not having the problem.

MCollett had also tried it out, baking my normals and such. He came out with the same results as me, but better. I can only assume that the problem lies with my PC or my version of Blender (which is the newest version).

So you still see the artifact in Blender but not in Unity? You should try an older version to confirm. It could be a bug worth to submit to the bug tracker.

Although I’ve tested also in latest windows build, and the only way to see the artifact after baking was to rotate those edges.

Hmmm… I’ve been playing around it now that you’ve mentioned that.
For my next model I will keep my eyes peeled for what you mentioned, so I don’t run into the same problem again.

I’ve used alt+J and took away all the tris on both high and low poly. I’ve also rebaked and I’m getting this: http://puu.sh/2Vxut.jpg
I can’t see it if the point light is further away though, it’s not recognisable.

Edit: Ahah! I’ve just triangulated all face on my low poly mesh and now I’ve got clean normals: http://puu.sh/2VxA7.jpg

Can you pack the normal and reupload the blend?

Here you go: http://www.pasteall.org/blend/

I’ve rotated all the edges after triangulation to match the normal map and it works fine now. Thanks for the help!

Having some more trouble with normals, like usual. :stuck_out_tongue: I thought about posting a new thread, but I don’t think it’s worth it, so here goes.

I’ve been having trouble baking normals onto curved edges, from curved edges. Here are some images to show you what I mean:


In the image above you can see my curved edges rather distorted. After baking the normals, they seem to arch in and out, which leaves a nasty effect…

'Tis a steep learning curve when it comes to normals it seems =] Thanks for all the help so far guys.

nice reads:
http://wiki.polycount.com/NormalMap/

Cheers man, I’ll have a read and see what I can find.

No idea about that last issue, but I wouldn’t mind to check out the .blend (just that part of the mesh would be ok)