Getting correct bakes from Blender?

Hello, I modell in Blender and want to bake with xNormal. However I always get ugly seams where my UV seams ( and hard edges) are. What I do: 1.) Set the Lopo up correctly so that it looks right when smoothed 2.) Break the UVs on the hard edges and place them a little bit away from each other 3.) Load the Hipo and Lopo up in XNormal 4.) Get this result Baking in Blender doesnt change this error.

Could you post an image of your normal map? It might help troubleshoot to be able to see all the parts of the problem.

I don’t know for xnormals as i never used it, but when baking with blender, i usually have to increase the “Margin” setting from its default 2 to at least 5 or 6 , so the baked texture bleed more out of the defined UV of the model to avoid ugly visual seams on the model when rendered or from a distance.
And why it’s a good idea to have a few margin between UV islands, and to not have one touching exactly the border of the texture, as with slightly incrreased bleed it could lead into some annoyance.

Could you post just the image, without the UVs? I’m looking for what’s happening at the very edges of the mapped area, and the UVs obscure that. Thanks.

Already deleted XD

Maybe someone knows a tutorial that covers taking an object into a game engine? At least it should cover avoiding smoothing errors and baking.

I did some further research on this but this things do not look good: 1.) If you set your Lopoli smooth before you bake and have NO hard edges set you get some nice smooth corners around your edges. (The Lopoli is set to smooth after the bake as well) Even though this looks good on this simple object,this introduces shading problems on more complex objects, obviously. 2.) If you set your Lopoli up “correctly” with appropriate hard edges ( edge split modifier) or just break them of manually or use flat shading, you get “no” shading issues in the usual way, but introduce the nasty edges. ( Pic also has AO bake) Conclusion for now: Stay away from the edge-split modifier and rather add more loopcuts to the lopoli. However this has some pretty serious impact if you are creating game assets as your vert count increases. Solution: I dont know what the problem is but to me it seems either breaking of geometry ( which is exactely what the edge-split modifier does as well) is to blame or there is a bug in the baker. Please post feedback as this is might be a bug or at least a serious drawback and maybe should be made aware to the coders.

Got a reply from Earthquake at Polycount :yes:
"Blender splits the projection mesh along hard edges. This is the source of your problem.

Max uses an averaged projection mesh(cage) unless you specifically turn it off(use offset).

Xnormal by default uses a simple ray distance from the mesh normals, which like blender results in split normals along your hard edges. You can set up(in the 3d viewer) or import a custom cage mesh in xnormal though.

read this entire thread:

Unfortunately I do not know if there is any way to get an averaged projection mesh in blender, or if you can even export a custom cage without split edges to use with XN from blender. I would suggest simply using Max or Maya to bake, or at the very least to set up your cage and export it to XN."

What’s the result if you bake your normal map with Smooth in place, but apply the Edge Split after the bake is done? Seems that if split edges produce the bake problem, just leave 'em smooth, then harden the edges with edge split afterward. The normal map bakes differences between hi & lo poly surfaces, so if they’re the same smoothed edges, you should get no normal modulation from the smoothed edges, which is what’s causing your current problem.

Of course this does not work because you get wild smoothing artefacts.
What Earthquake says makes perfect sense and that means use another program for baking.

I did a test using a hi-poly cube that had some surface features sculpted in, baked (in Blender) to a lower-poly cube, both cubes having Smooth shading & both using the Edge Split modifier to sharpen up the corners. The tangent normal map baked with no artifacts and the resulting render shows no artifacts at the cube’s corners (or anywhere else). I also applied the normal map to a default cube (faces not subdivided at all) using flat shading and with a different unwrap pattern to the faces, and still no artifacts showed in the render. The extremely lo-poly cube also rendered fine with Smooth shading & Edge Split .

Not sure what the source of your problem is, but if you post the .blend I could take a look. I didn’t try Xnormal for this test as my version is probably outdated.

EDIT: Also tried baking with no Edge Split & smooth shading and did get some baked-in detail at the corners, but no artifacts, just what would be expected from the difference in the surface contours between hi- and lo-poly cubes.