Announcement

Collapse
No announcement yet.

Getting weird artifacts in UE4 when baking hipoly mesh to normal map in Blender

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Baking normal maps can be a incredibly tedious process depending on the geometry, here's a couple threads on Polycount that should explain some of the problems you can face.
    How the normals of the low poly affect the bake using a cage (and why you should use bevelled shapes more) : http://www.polycount.com/forum/showthread.php?t=81154
    How you can prevent these problems with smoothing groups and UV-Splits : http://www.polycount.com/forum/showthread.php?t=107196

    Furthermore, different programs can interpret the normal maps differently which requires a synchronized workflow to create a normal map specifically for your software.
    I found Handplane to be the best tool for this problem : http://www.handplane3d.com/
    Handplane will also conveniently fix some smoothing errors you have overlooked. The only requirement is for you to bake the normal map in world space instead of tangent space.
    While it doesn't have a specific UE4 output, UE4 seems to use the same interpretation for normal maps as UDK - so just choose UDK in the conversion options.
    Last edited by BMAliens; 10-31-2014, 06:48 AM.

    Leave a comment:


  • replied
    screenshot

    Another screenshot to accurately convey what I would like to see. Just want that picture to be as better.
    Attached Files

    Leave a comment:


  • replied
    an impossible goal

    Thanks for the reply Tim! I looked at your option, and yes the result was better than I was. I translated the mesh triangles exported corrected green channel corrected TC normalmap place for TC default. And here's the result. Yes already much better but at length from the bottom seen strange shading. It's like a little texture resolution .4096 * 4096 where much more? Why I do not want much stretch UV so the answer is simple, there are other parts that are also necessary to place. Look at the option that gives the blender. I do think it's possible to get a result like this in a blender or UNREAL? Maybe I just want to get something UNREAL simply can not reproduce? Of course you can rebuild the polygons and if not satisfied rebuild again and so on increasing the number .but even so why in the blender without this good result? Just want to understand.

    And the thought came. Why not make your system creating Normal maps in the engine?
    Most of the questions in the network would be lost because of different standards is an attempt to fit a normal map that uses a standard engine UNREAL. Would not have long to sort out the options.
    Attached Files
    Last edited by FoxReinard; 10-30-2014, 03:41 PM. Reason: error

    Leave a comment:


  • replied
    Hi FoxReinar,

    I opened your FBX in 3Ds Max and took just the arm rest and baked out a Normal Map. I ditched the other geometry and only focused on the arm rest. I did increase the UV space for it to get a better bake as well.

    Here are the results I've got. It's still a little messy with the bake though just because I rushed a bit.

    Click image for larger version

Name:	Normal_ArmRest.PNG
Views:	1
Size:	315.4 KB
ID:	1060396

    Here is a link to the asset I tweaked. I didn't change anything with the geometry.

    Ultimately, you may want to redo the topology for the low poly to get better results as this is where the issues appear to be.


    Tim

    Leave a comment:


  • replied
    Here's a link to the file. http://blender3d.org.ua/forum/beginn...rmaltest.blend
    Please help to solve this problem. I did not even know what to do. Already spent so much time and trouble as was and remains

    Leave a comment:


  • replied
    Hello everyone. The problem I have is probably exactly the same. I've tried a lot of different methods and to what it does not. AntonBoiko your advice too tried and nothing! I bake texture in cycles further check in the viewport internal. Exported to fbx with parameters as in the picture.In the picture on top is perfect in a blender and the bottom in UE4. How to get the same result as in the blender?
    Attached Files

    Leave a comment:


  • replied
    There's nothing wrong with the highpoly mesh. But there's only one smoothing group for all polygons in the lowpoly mesh . It gives you to much curvature in the lowpoly surface which is hard for normal map to compensate in the engine. So you get those gradients in the baked normal map which is bad (gives you compression banding artefacts in the engine). I would suggest you try the following:

    1. Select your lowpoly mesh and set Smooth Shading for all the polygons, clear all sharp edges and seams if you have any;
    2. Enter Edit mode > Go to Select > Sharp Edges > Ctrl+E > Mark Seam + Mark Sharp > Exit Edit mode;
    3. Assign Edge Split modifier and uncheck "Edge Angle" so it will sharpen only those edges you marked as sharp. Basically every hard edge needs to have a uv split on it so you get some padding on bake;
    4. Unwrap your lowpoly using the seams you get from previous steps and pack it with enough padding. You'll get lots of pieces but that's Ok so don't worry;
    5. Make a triangulated copy of your low-poly for baking and bake your normal map with padding set to 8 at least;
    6. Export to fbx, make shure to uncheck "Apply modifiers" if you're using Blender 2.71 or newer (daily builds).

    You should get a normal map with almost no gradients for the flat areas which is how it should be. And that's the way hard-surface baking works, eliminating any chance of errors and artifacts. There's much more on that in the Polycount forums, I suggest you visit it. Or post here, glad to help =)

    PS. Save baked textures to targa (.tga). Unreal imports it correctly and applies TC_Normalmap compression, which it doesn't if you use png for example. And there's almost no to none advantage in using 16 bit png, but you'll have to set compression options yourself instead of Unreal doing it for you if you import tga files.

    Cheers, Anton.

    Leave a comment:


  • replied
    I already mentioned that I triangulated the original mesh.

    Wings3D does not have an option to "Export tangents" in either the .fbx or .obj exporters. I'll look for an .fbx plugin for Blender and see if I can get the mesh to UE4 from there.

    [EDIT] That did it, thanks! There's still a few artifacts but they're barely noticeable and can most likely be covered up by texturing.
    Last edited by Shivan Hunter; 09-29-2014, 03:20 PM.

    Leave a comment:


  • replied
    When you imported the mesh did you Import Normals and Tangents or did you calculate them? You always need to export tangents from blender, and import both normals and tangents in UE4. This is because the normal map is generated based on the tangent spaces in blender, and if you let unreal calculate its own tangents then you'll probably end up with different tangent spaces and your mesh will look all wrong. Also, you'll want to add a triangulate modifier on anything you bake to and/or intend to import for two reasons: UE4 may split the quads differently to blender and this will also mess up your tangents, and the exporter doesn't support exporting tangents on faces with more than 4 vertices.

    So do this:
    Add a triangulate modifier to your low poly mesh.
    Re-bake the normal map.
    Export the low poly mesh with Export Tangents checked.
    Import to UE4 with Import Normals and Tangents option.
    Last edited by The Beej; 09-29-2014, 06:45 AM.

    Leave a comment:


  • replied
    Yes, the second Blender screenshot shows the hipoly mesh with an edgesplit modifier.

    Leave a comment:


  • replied
    have you tried applying flat shading to the large flat surfaces of the high poly model before baking the normal map.

    Leave a comment:


  • replied
    Here's the texture: http://i.imgur.com/AzASzyN.jpg (this is 2048x2048 while the source is 4096x4096, there are also jpg artifacts from imgur - if you need to see the source version I'll upload that)
    Last edited by Shivan Hunter; 09-29-2014, 04:26 AM.

    Leave a comment:


  • replied
    can you add a pic of just the normal map texture?

    Leave a comment:


  • replied
    Urgh, firefox ate some of my post. Yes, I flipped the green channel in GIMP (I had also mentioned that the Wings3D model is triangulated so there's no issue with Blender and UE4 doing it differently).

    What do you mean by "texture type"? It seems to have imported as a normal map, since its LOD Group is "WorldNormalMap" and its compression is "TC Normalmap".

    Leave a comment:


  • replied
    Have you already flipped the green channel -> in the texture properties + set the texture type to normal map

    Leave a comment:

Working...
X