Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I have a metal drum mesh, and when I bake its normal map, I get the weird colors (see attached pic). I'm talking about the horizontal gradient shift of color. There's no deformation like that on my mesh, how come the colors are like that? I've tried various spaces (camera, world, etc) but it's still bad (though the horizonal gradient changes with each one). Also tangent space returns a blocky blue color all over.

Can someone please tell me how to get a good normal map out of my mesh?

enter image description here

=== UPDATE

Solved, thank you very much Luke B. There's still the question of scaling one of the two overlapping versions a bit (the low res one for example) in order to get really good results, but that's how it's supposed to be done.

enter image description here

=== UPDATE 2

After further following the advices of Luke B, I've used multiresolution modifier on my low-res mesh, and baked from there. It looks much better than before, the color artifacting are down to a minimum, really, with some corrections in GIMP it's quite usable:

enter image description here

share|improve this question
    
I've not baked a normal map before, what is it you're expecting? What you're getting could be correct, since the normals would change gradually over the surface of the cylinder. The colors loop properly and the bands are constant from top to bottom, so just like the normals, they wouldn't change from top to bottom on the cylinder. If you were to map the x,y,z values of the normal to r,g,b you might get something like this... –  Byte56 Feb 22 '13 at 22:07
    
Hey Byte65, thanks for the quick answer (again)! Well ok, you're right, but what I was expecting was color variations only in accordance to the horizontal creases of the drum... I guess... Oh well, thanks anyway. –  Shivan Dragon Feb 22 '13 at 22:14
    
The proper way to bake a normal map is to use a low-poly mesh for reference. You bake a normal map from the high-poly mesh, as it won't be used for real-time, and use the low-poly mesh. Is the barrel in your screenshot the high poly version? You are probably expecting the colors to represent the deviation from a low-poly version but it's not clear if you're actually using a reference model. –  ChrisC Feb 22 '13 at 22:24
    
@ChrisC it's like that: a low-poly mesh, uv-unwrapped, and then I've added a subdivision surfaces modifier and baked the normal map. If I bake in directly on the low poly mesh it looks bad, you can see the creases of the low poly mesh –  Shivan Dragon Feb 22 '13 at 22:27

2 Answers 2

up vote 9 down vote accepted

I am assuming your intention is to use this normal map in a game, as it was explained in other comments, you most likely don't want world space normals since they only work for a fixed world. Your problem with tangent normal baking is that you don't have a mesh with less detail to bake the map to. This is how you do it:

1 - Create a lower-res version of your cilinder: enter image description here

2 - Align both meshs: enter image description here

2a - Remember to uv unwrap your lower-res mesh and create a texture for it.

3 - Select both meshs and make sure the lower-res is the active one (the higher-res should be dark-orange), in the bake panel select the option "Selected to Active" and use Tangent as the normal space: enter image description here

Is that the result you were expecting?

share|improve this answer
    
Thank you so much, I was going nuts over this. I've managed to get decent results, but there's still some artefact colors that show up if the two meshes are not properly scaled. I've noticed that scaling down the low res a bit (so it doesn't extend outside the high res helps). Could you please give some quick pointers on how the low and hi-res meshes need to be aligned for best results (see update on question for the results I get now). Thanks –  Shivan Dragon Feb 23 '13 at 16:01
    
Using this method will give you artefacts if your meshs don't align properly, but you can use another method, baking from a multiresolution mesh. The steps are really simple, you select your lower-res mesh, go to the modifiers panel and add a modifier called "Multiresolution", press the button "Subdivide" as many times as you need, and then set the preview field to 1. Go back to the bake panel and select the "Bake from Multires", you should get a non-artefact result. The problem with this method is that you can't edit the vertices of the higher-res version, you can sculpt it though. –  Luke B. Feb 23 '13 at 16:17
    
Yep, it's even better now. Thank you very very much. –  Shivan Dragon Feb 23 '13 at 16:34

To sucessfuly bake a normal-map you need to make sure of 2 or 3 things.

  • Make sure that your mesh is manifold. (E.g. that there are no double-sided faces.) You can check that in edit-mode by pressing Ctrl+Shift+Alt+M, this will select all non-manifold edges.
  • Make sure to select "Tangent" for Normal Space in the Bake Panel. This is the method usually used in video-games. There are other Normal Spaces and normal maps in that spaces look different.
  • Make sure that the normals face into the correct direction, for manifold meshes you can let them recalculate by pressing Ctrl+N. You can let the normals displayed in the "Mesh Display" panel in the properties thingy (which can be toggled by N). If Ctrl+N calculates wrong normals than there is something seriously broken in your mesh.
share|improve this answer
    
+1 for making sure the normals face the right way in both meshes –  Shivan Dragon Feb 26 '13 at 14:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.