Hello everyone! My name is David, I am an avid Blender user and a soon-to-be Games Design student.
I have done a series of tests to see what is the easiest way to set up smoothing in Blender and how to correctly export that smoothing information in FBX format for later use in Unreal Engine 4. I would like to share the results with you and hopefully it will be helpful for some of you:)
I am using Blender 2.75a and Unreal Engine 4.8.1. I also did the same testing with Blender 2.74 and Unreal Engine 4.7.6 a few days ago and the results seem to differ slightly - more on that in the test results section. The goal is to look at what we start with in Blender, export it as FBX, import it into UE4 and see the result and how it changes the vertex count of our model.
Feel free to scroll down to the bottom for a summary / TL;DR version!
First things first, here is the model that I am using for this guide:
And here you can see the most common results that we can get:
We don't really have to worry about result (A) as this can only happen if you completely omit any kind of smoothing in your model, i.e. it is Shaded Flat.
We will also deliberately try to avoid (B). Please note that in some cases (B) may be exactly what you need. I am not saying that it is wrong, simply it is not what we are working towards in this tutorial. To get result (B), simply Shade Smooth your object and you are done so it does not require any further explanation.
To try to achieve result
(C), we are going to look at 4 main scenarios and then export each of them with 3 different settings for a total of 12 tests.
On import into UE4 the only thing you need to make sure is that you enable "Import Normals and Tangents", although probably only "Import Normals" will also work.
Scenario #1: Smooth selected faces in Edit Mode, no sharp edges or modifiers
Scenario #2: Shade Smooth object, mark sharp edges, no modifiers
Scenario #3: Shade Smooth object, mark sharp edges, use Edge Split modifier without applying it
Scenario #4: Shade Smooth object, mark sharp edges and apply the Edge Split modifier
FBX Export settings - most important thing here is the Smoothing type
(Intentionally cropped - consider everything below "Tangent Space" unticked.)
Onto the test results:
Scenario #1 (Smooth selected faces in Edit Mode, no sharp edges or modifiers) - This method always works, regardless of export settings used. It does have its limitations though, if you want to smooth 2 adjacent regions in Edit Mode while maintaining a hard edge between them, this will not work and you will have to use a different method.
Original vertex count in Blender: 274
Vertex count after importing into UE4: 330
Smoothing result: Always (C)
Scenario #2 (Shade Smooth object, mark sharp edges, no modifiers) - This method "never works", as in always resulting in averaged smoothing (B).
I must say it is very strange, that when I used Blender 2.74 I managed to achieve smoothing result (C) in UE4, even though in Blender the mesh looked like (B). In that case I was using Export settings #2 (FBX Smoothing: Edge) but this does not seem to work anymore.
Original vertex count in Blender: 274
Vertex count after importing into UE4: 274
Smoothing result: Always (B)
Scenario #3 (Shade Smooth object, mark sharp edges, use Edge Split modifier without applying it) - Getting the exact same results as in Scenario
#2.
Again, with Blender 2.74 using 'Smoothing: Edge' during export seemed to work. It seems that either it was never meant to work that way or 2.75a FBX export is buggy.
Original vertex count in Blender: 274
Vertex count after importing into UE4: 274
Smoothing result: Always (B)
Scenario #4 (Shade Smooth object, mark sharp edges and apply the Edge Split modifier) - It does not matter whether you apply the Edge Split modifier first and then export or choose 'Apply Modifiers' during export. In both cases this method always works with any of the export settings mentioned above.
Again, inconsistent result compared to 2.74 where I was only able to get this method working if I was using 'Smoothing: Normals' during export.
Original vertex count in Blender: 274
Vertex count after importing into UE4: 330
Smoothing result: Always (C)
On a side note, I also checked vertex counts if I add UV seams instead of sharp edges and the vertex count increase is the same. Of course this is nothing surprising.
Summary / Conclusion / TL;DR / What works:Method #1: Select faces in Edit Mode, press space bar and look for Shade SmoothMethod #2: Shade Smooth whole object, mark edges sharp where necessary (Select Edges, press CTRL+E, choose Mark Sharp), add Edge Split modifier, untick "Edge Angle" and make sure to APPLY Edge Split modifier either before or during exportMethod #3 (Suggested by Rawzombie in the comments - Thank you): Shade Smooth whole object, mark edges sharp where necessary (Select Edges, press CTRL+E, choose Mark Sharp) and enable "AutoSmooth" under Object Data (If no edges are marked sharp, it will use the angle setting instead.)In Blender 2.75a these methods will result in correctly exported smoothing (C) regardless of export settings. It is also interesting to see that even though the first method does not use sharp edges or the Edge Split modifier, upon export the vertices will still be split as we can see from the resulting vertex counts.
I did this testing because I was wondering if it was in any way possible to export a smoothed object that has hard edges without increasing the vertex count. From what I've found on the internet, it seems that this is technically not possible and even other 3D packages, such as 3DS Max, where Smoothing groups are available, will eventually increase the vertex count of the mesh to make up for the hard edges.
Thanks for reading and any critiques are welcome. I am by no means a pro and the last thing I want to do is spread false information, so please correct me immediately if something is false or confusing.
Replies
I fear that the original title was not on point at all :[
Is anyone able to import Edge Weighting into Maya somehow using Rawzombies method?
I do not want to use the edge split modifier since I need to Subdivide the Mesh inside Maya.
Or if there is another way to import Edge Creasing into Maya please let me know!!
Cheers Christian
In my experience, the smoothing option you get in the current version of blender does not influence shading in UE4. I might miss something here, though. Did you mean that?
Maybe I should clarify that I was talking about the smoothing options in Blenders fbx exporter, as well.
Nice model, btw. Nice, clean normal map on a very low-poly mesh.
It's worth having a look if you have access to Substance Designer (although I'm pretty sure the same masking process could be reproduced in Photoshop as well)