Author Topic: Problem with baking normal map  (Read 188 times)

Hey everyone i'm new to SP and normal maps in general and I have had a lot of trouble when trying to bake my normal map.

I made this knife in Maya and exported it as an fbx with tris and all edges softened which i thought was the way to do it?However when i try to bake the normal map i get these results. Anyone know what the problem might be?







Are you baking from a highres mesh? Post a screenshot of the UV layout and baking settings please.
Last Edit: August 08, 2019, 03:36:38 pm



Yes i have a highres and here are the UV's

Forgot the settings


Can you provide the meshes? Is there a reason why you set the baking distances that high?

How did you create the highres mesh, did you simply subdivide the lowres mesh?

So I made several changes including harden some of the edges in Maya, changed the UVs and made a cage. Fixed the the things i first mentioned but now i have these seams after baking the normal. It this something i should fix or will that be okay once i have textured it?

I made the highpoly first and then used a duplicate highpoly before i subdivided it to make the lowpoly.
I attached the lowpoly but it won't allow me to upload the high.




All soft edges
Add the following to MEL to the toolbar
Select poly click to add MEL
Try baking again



///////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////
///                                                                                                                                 ///
/// Procedure Name   :   selectShellBorderEdges.mel   V1.0                                                   ///
///                                                                                                                                 ///
/// Updated             :   24th. Oct. 2006                                                                              ///
///                                                                                                                                 ///
/// Author                :   T.G.Jay                                                                                          ///
///                                                                                                                                 ///
/// All Rights Reserved .                                                                                                ///
///                                                                                                                                 ///
///////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////


///////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////       Mel Starts      //////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////

////All the Vars begin with "$TGJ_SSBE_"

global proc selectShellBorderEdges() {

   int $TGJ_SSBE_Selection_Size = size(`ls -sl -fl`);
   int $TGJ_SSBE_SelectedUV_Size[] = `polyEvaluate -uvComponent`;
   if ($TGJ_SSBE_Selection_Size!=$TGJ_SSBE_SelectedUV_Size[0]) print ("// Error: Please select UV Point //\n");
   else
   {

      polySelectBorderShell 1;
      string $TGJ_SSBE_UVBorders[] = `ls -sl -l -fl`;
      PolySelectConvert 3;
      PolySelectConvert 20;
      string $TGJ_SSBE_EdgeInside[] = `ls -sl -l -fl`;
      select -r $TGJ_SSBE_UVBorders;
      PolySelectConvert 2;
      select -tgl $TGJ_SSBE_EdgeInside;
      select -tgl $TGJ_SSBE_EdgeInside;
      $TGJ_SSBE_EdgeInside = `ls -sl -l -fl`;
      
            
      string $TGJ_SSBE_EdgeBorders[];
      int $TGJ_SSBE_EdgeInside_Size = size($TGJ_SSBE_EdgeInside);
      for ($TGJ_i=0;$TGJ_i<$TGJ_SSBE_EdgeInside_Size;$TGJ_i++) {
         
         string $TGJ_SSBE_EachUVInside_Fold[] = `polyListComponentConversion -fe -tuv $TGJ_SSBE_EdgeInside[$TGJ_i]`;
         string $TGJ_SSBE_EachUVInside[] = `ls -fl $TGJ_SSBE_EachUVInside_Fold`;
         if (size($TGJ_SSBE_EachUVInside)!=2) {
   
            $TGJ_SSBE_EdgeBorders[size($TGJ_SSBE_EdgeBorders)] = $TGJ_SSBE_EdgeInside[$TGJ_i];
   
         }
         
      }
   
      select -r $TGJ_SSBE_EdgeBorders;
   
   }

}

//
//

PolySelectConvert 4;
selectShellBorderEdges;
polyPerformAction "polySoftEdge -a 0" e 0;
FrameSelected;
select -cl  ;

///////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////       Mel Ends       ///////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////

All soft edges
Add the following to MEL to the toolbar
Select poly click to add MEL

not sure if making all edges soft is the right answer here? Or am I getting this wrong?
when baking normal maps, applying soft edges for this kind of sharp angle will always cause issues. It really depends on the engine, but a rule of thumb is, that the maximum angle to bake without adding hard edges or bevels lies somewhere between 60 and 90 degrees.

make sure to add enough padding to your bakes. and you could make use of your UV space in a much better way. why not scale up the smaller parts and get rid of those rings (adding them back to the larger UV shells)?

I never use cages for baking in painter, but adjusting the distance settings instead is a good idea. Best to start with too low values (resulting in empty "islands" in your normal map) and then dial the values up until you get a clean normal bake.

and one last advice: don´t drive yourself crazy by looking at your bakes too close up. Sometimes it´s a good idea to apply some materials and look at it from a reasonable distance to get a better understanding of the visibility/relevance of artefacts.
Last Edit: August 10, 2019, 03:35:29 pm

So i tried some of the things both of you suggested and some other fixes, got the best result so far with the bake. Put on a few materials to see how it looks. Think i'm happy enough with the results and will continue working now and take what i learned with me to future projects. Thank you for the help!