Download

Normal Maps, I feel like I'm doing everything wrong.

Hi!, i have been pulling my hair off, since i dont know if im doing the normals the right way…
i’m using blender and xnormal to make my normal maps.
xnormal 2048x2048, 4aa, 16padding with a cage.
blender exporting as obj only for testing purposes, im getting the same results with fbx.

well here is a screen of a simple cube in blender, it has Sharp Edges and seams(splits) in every edge (autosmooth 180: on).
from far away it looks close to the highpoly, but if i get closer i can se the edge is still visible, im guessing its because the Sharp Edge?(Hard Edge, different Smooth Group), since if i smooth the entire mesh and dont use any sharp edge or seam it gets harder to see that edge, but the shading its ruined.
also in unreal it doesnt look that well, again from far away it looks similar to the highpoly but from close the edge is way more visible…
this is how is supposed to be? i mean i guess since im using a really basic geometry the edge will be visible.
I’m really bashing my head since i don’t know if im doing the normal maps right or not. also using bevels makes it way more dificult to spot those edges but it also uses way more vertices.
so yet again, its inevitable to see those edge/seams or im doing something wrong?
here are the screens, hopefully i could get some help.

f1528ab97c720d932031a284a12dac4c07c3cc0a.png
cube_blender_otherangle.png
cube_unreal.png

hi !
i don’t know how the bake systems works in blender, but in 3dmax, once baked, you have to edit the maps in photoshop,for your exemple, i think that using the blur tool in photoshop on the edges of your faces to smooth them should make this too sharp edge.

My first guess is the highpoly and low poly don’t match up perfectly, make sure the flat sides of the LP and HP are right on top of each other. The other main cause of this type of issue is padding, but it looks like you are using padding already. The hard/soft edges thing shouldn’t matter for this model, but the reason the shading is off when you use soft edges is because you have to bake the LP model with soft edges, you can’t just change the model after baking.

You can also try putting the texture on the model in Blender as either a diffuse map or constant/fullbright material and see if you see if you see anything weird going on where there is an issue. Might not help in this particular case, but it is useful sometimes.

Hi!, thanks for the answers, but i am already using a material on blender, tested in on substance painter (baking it inside painter) and i get the same results :confused: (tried painting it too, and if i get close i can still see those edges)
also im using smoothing groups, is just that in blender u call them sharp edges.
and lastly im using xnormal to bake and tried substance painter, havent tried baking with blender.
here is a screen showing the size and position of every model, i tried making the low bigger but with the cage it doesnt change anything.
08389856823d4792baed9e5c9f0bd54f4f742482.png

Why are your UVs split like that? You should try it again with an unwrap like this: https://www.youtube.com/watch?v=e_dTES_CCbY

Take a look at this video, I think is the best one explaining normal maps baking. It uses 3d max and xnormal, but it should be easy to transport it to blender.

https://youtube.com/watch?v=yoGPs7lKXak

Your LP isn’t matching up correctly with the HP. The the flat sides of the HP and LP should be right on top of each other, but your LP is too far within the HP. Your LP should be much closer to where the cage is positioned, just a bit smaller.

For game engines if there is a hard edge on the model, there has to be a UV spilt, so that UV layout would only work if there was no hard edges on the low poly, or if there were only hard edges on the UV seams. And generally, you probably want hard edges on 90 degree angles because of normal map compression sometimes causing some artifacts.

already tried that, same result.
also i was following this guide, thats why i put the corners of the lp right on the hp corners. http://docs.cryengine.com/display/SDKDOC2/Common+XNormal+Baking+Errors+and+How+to+Solve+Them

also il check the video posted above, thanks!

Everyone should watch this:

https://www.youtube.com/watch?v=m-6Yu-nTbUU

There’s a lot more to normal mapping than just making a hi poly, low poly, and throwing them into xNormal.

Oops, I shouldn’t post at 3am. I forgot that xNormal doesn’t work as well as Substance Designer/Painter for stuff like this. There’s no having to position the low poly within the high poly. But generally those super thin lines aren’t anything to worry about, and if it is, just bevel the cube. Baking a 90 degree angle to a normal map isn’t ideal no mater what you are doing.

And also, if you are worried about the polycount increasing if you add a bevel, having a hard edge on every edge is already increasing the effective polycount of a model in UE4. For example, in UE4, if you have a cube with every edge hard (like yours) vs one with one smoothing group (with a T shaped UV map), the hard edged one is 24 verts, vs 14 verts of the averaged one. A beveled cube is 38 verts, that’s not even double of the cube you are using.

yup you’re right, its just that im ussing this to learn good practices, and i feel like that seam shouldnt be there…
i’ve read lots of tutorials an watched different videos, (included the ones from the handplane guy), but i still feel like i dont get it… zzz

If you want hard edges, yes. But face weighted normals is as good an option. To me baking a normal map for this seems like a waste of time when you can get a perfectly smooth result with 300 tris or so. (maybe even less)

yup it is a waste, but for example when you need to do a bigger model, like a weapon, some simple parts will have to be just an edge (to save geometry).
so i want to know if im doing something wrong, or if its there no way to hide 100% those seams? (i tried even using no seams, no hard edges 1 smooth group, and i still can see those edges on substance painter)

Counting every tri doesn’t matter, and a seam that only shows up at 10x zoom on one part of the model isn’t something to be concerned with. You can play with that bake/lowpoly/UVs/HP and LP alignment all day and eventually get it perfect, or you can move on and actually work on something that matters. No one is going to see that seam in gameplay, if you get a similar seam on a weapon, and it shows up during gameplay or presenting the model, just add more geometry. Shader complexity, draw calls, etc are much bigger issues than adding an extra bevel. For all we can tell, that CryEngine tutorial might have that same edge seam, but you would never know because the author doesn’t zoom up super close.

@cyaoeu Definitely, face weighted normals work great on anything that is basically a few flat surfaces with beveled corners. For example that’s what I did with a model in another thread https://forums.unrealengine.com/showthread.php?109152-Lets-create-a-complex-lightmap-Open-discussion&p=526247&viewfull=1#post526247

sigh… i know you’re right haha, il try to retopo a complex model and deal with the seams or something… i’ve been looking at lots of models at artstation and various of those have this “edge/seam” problem but they hide it with textures, etc…
guess then its normal or something…
i know about the custom vertex normal method, il check it, but i just wanted to see if i was doing something wrong with my baking…

Hi,

I tried to see if I could come up with a fix. I (think) I did. Ironically, I just finished the introductory course for Substance Designer/Painter which involved dabbling in normal maps, and I remembered a few things that ended up helping! Ok, so here’s what I did to replicate your issue (in Maya): Created a cube 100cm in all axis. Automatic mapped it so I would get 6 individual faces (none sewn together) in the UV map. Hardened the normals. Duplicated the mesh, and beveled the edges of the duplicate and gave it about 5 segments so that the edges would be nice and smooth; and then I used smooth normals on that high-res mesh. Froze transforms, deleted history, and then shipped the low and high off to bake. What came out of that was indeed hard-edges at the corner of the normal map, and they poked out unfavorably like your initial pictures.

I managed to find a fix… What I did was, I uniformly scaled the high-res mesh to fully encompass the low res mesh. With the way it was at first, the low-res mesh’s corners were poking outside of the high res, which means the corners weren’t being affected by the normal map. So I scaled the high-res until no part of the low res was intersecting it at all. With that, I re-exported the two meshes back into painter and I baked the maps. It gave me a pitch black normal map. The reason, I’m guessing, is because the high-res mesh was just a bit too large and the baker couldn’t find it (because it was inside it?). So then I started messing with some of the baking settings and I kinda got scared. Luckily, what I changed managed to fix the map baking. The default “Max Frontal Distance” was set to 0.01, so I changed that to 0.02 and that was enough for the baker to detect the larger High-res mesh, and it baked out the normal map. There were no hard edges at all, even after importing to unreal engine and adding the normal map to a basic white material and then applying it to the hard-edged, low-poly model.

So I hope that you can fix your hard edges by following that recreation scenario. I can post pictures to show the settings and everything if you need still need a guide. Hope it helps! PS, I had Anti-Aliasing Subsample 4x4 active, not sure if that made a difference (I doubt it did in terms of the hard edges, but just wanted to let you know) Also, when I set the Max Frontal Distance to 0.015, the map managed to bake, but the normal directions were off entirely, the cube looked like it was trying to be a sphere instead of a cube with smooth edges. When I set it to 0.02 is when it came out perfectly.

Very helpful post Ashern. Thanks a lot!
I’ll try that later.

il try that with substance, also some closeups screenshots like my second and third would be really apreciated!

Unfortunately, I realized I’m not familiar with Maya LT’s viewport options. When I tried to apply the normal map inside Maya, the normals were all messed up. I’m not sure what it is, so I just left taking a picture of the object with normals inside Maya alone. On the other hand, inside UE, looks proper: This one is zoomed out a bit and this one is zoomed as close as possible without clipping into the actual mesh. I’m sure you can see the seam and the outline, but normals can only do so much in terms of illusion. If the low poly cube had even one bevel applied to all of its edges, it would make it close to impossible to tell that it wasn’t as round as it appeared. But since the cube has no bevels, the sharp edges will be visible with one properly placed camera along its silhouette.