10
$\begingroup$

I'm new with Blender and this seems like a simple thing but I haven't been able to find the answer.

The only way I've been able to find to get smooth edges while retaining flat faces is to add extra edge loops as in the first answer to the question posted here: How to keep flat faces flat when using smooth shading

However, manually adding extra edge loops all over the place just to get smooth edges is not an option for my workflows. I need an entirely automatic way to get smooth edges of a certain thickness, similar to how it's possible to get beveled edges of a certain thickness automatically with the bevels modifier.

Here is a shape with automatic bevels. I need something similar, but with the edges being smooth. Flat shading. Bevels are flat too. How to make edges smooth?

Here it's changed to use smooth shading. This doesn't work since the faces are no longer flat. Smooth shading. Now bevels are smooth but faces are no longer flat.

Note:

  • The "Auto Smooth" setting in the Normals section of the Data pane for the object won't help here. It too will either smooth both edges and faces, or neither, depending on which angle is used.
  • Subdivision surface modifier doesn't work. It requires adding edge loops to control the width/size of the smooth edges so is not automatic.
  • The Smooth modifier doesn't work. This modifies the vertex positions rather than splitting the edges similar to bevels.
  • This is for use in a game, so any solution that produces results with lots of triangles won't work (like just using bevels with a high segment count). I basically need the same geometry as Bevels produce, just with normals that make the bevels smooth while retaining the faces flat.

Is this possible in Blender?

What should this look like:

final

$\endgroup$
9
  • $\begingroup$ So basically you want the Bevel modifier to set the shading of the edges of the mesh to smooth but flat faces that it doesn't touch to stay flat shaded? I'm not sure how to do that, but I'm presuming you would need to make a plugin. $\endgroup$
    – Luka ash
    Jan 2, 2017 at 0:38
  • $\begingroup$ You may want to look into Custom Split Normals $\endgroup$ Jan 2, 2017 at 1:55
  • 1
    $\begingroup$ @Lukaash More or less. I tried applying the bevel and manually marking all the bevel faces as smooth but this actually doesn't give the desired result either, because the edges between the flat original faces and the smooth bevel faces look like creases. Instead, the bevel (or equivalent) would have to explicitly set the normals themselves in a specific way that matches the adjacent original face normals. $\endgroup$
    – runevision
    Jan 2, 2017 at 10:52
  • $\begingroup$ @DuarteFarrajotaRamos The Radial and Directional modes of the Normal Edit Modifier don't seem related to what I need. Are you talking about implementing something new, similar to those but different? $\endgroup$
    – runevision
    Jan 2, 2017 at 10:55
  • $\begingroup$ If I am not mistaken the Blend4Web addon had a relatively capable custom split normal editor that might have what you need $\endgroup$ Jan 2, 2017 at 14:17

3 Answers 3

5
$\begingroup$

From what I have gathered researching, no, it is not currently possible in an automated way inside Blender.

For what it's worth, it would not be hard to implement a solution for this in Blender. I ended up implementing a solution in a Unity AssetPostprocessor instead since that's what I'm familiar with.

The approach I took was to calculate smoothing (smooth vertex normals) using a different weighing method than Blender does. When averaging face normals together in order to calculate smooth vertex normals, it's possible to weight the normals according to the areas of the faces contributing to the vertex normal. This way larger faces contribute more to the normal than smaller faces. This fairly standard weighing approach already produced much improved results.

I ended up going a bit further and kept track of the largest area of the contributing faces. Then when calculating the average, I only included face normals in the average from faces with areas of at least a certain percentage of the largest contributing face. This mostly keeps the bevel faces from influencing the normals at all.

These techniques only work well when the bevel width is small compared to other details of an object. But it worked very well for me in any case.

enter image description here

$\endgroup$
1
  • 6
    $\begingroup$ Wow, does that ever look nice! For what it's worth, I've added a RCS request for an implementation of this in blender. $\endgroup$
    – gandalf3
    Jan 5, 2017 at 8:01
1
$\begingroup$

Try Y.A.V.N.E Addon.

Easily found by searching 'YAVNE Blender' in google.

Thanks to Umdee for creating this addon and sharing it with us for free.

Mark the large faces 'Strong', while keep the corner/bevel on 'Medium' or 'Weak' will give you a result below:

Note: the shading breaks if you use mirror modifier or triangulate the mesh.

Note: works with edge sharp and auto-smooth. May want to turn auto-smooth angle up to 180.

So, you'll have to apply the modifiers and redo the markings again.

Manually assign normal strength

enter image description here

Automatically calculate normal based on face area.

enter image description here

Manually assigned on a complex mesh, works with auto-smooth and edge sharp.

enter image description here

Auto generated based on face area on the same mesh

enter image description here

$\endgroup$
8
  • 1
    $\begingroup$ From the question: "I need an entirely automatic way to get smooth edges of a certain thickness, similar to how it's possible to get beveled edges of a certain thickness automatically with the bevels modifier." - This method is certainly not automatic and it's not working with Bevel modifier. $\endgroup$
    – cgslav
    Jun 19, 2017 at 11:44
  • $\begingroup$ I don't care. This gives the best result with least amount of error and does not take a horrible long time to setup. And plus, YAVNE addon has the ability to automatically do this, less accurate, but is the fastest way. It just doesn't need Bevel modifier. @user105387 Also said it will be used for games. The Bevel modifier has to be applied before it goes into the game engine, doesn't it? $\endgroup$
    – TeaCrab
    Jun 19, 2017 at 12:30
  • $\begingroup$ I also wanted that 1-click retopo unwrap UV packing. Laziness is not a problem I'm going to help solve. $\endgroup$
    – TeaCrab
    Jun 19, 2017 at 12:39
  • $\begingroup$ Maybe try and extend your answer; show some workflow with a little bit more complex mesh. It's not 1-click retopo. Similar approach to weighing normals is used in Houdini. And I didn't say it's not a good method but check once again title and content of this question. It says "automatic" a lot. You have just mentioned about marking faces and... That's all. Show us this automatic method on complex object and maybe this will be the best method. $\endgroup$
    – cgslav
    Jun 19, 2017 at 13:37
  • $\begingroup$ Added some more demonstration. Unfortunately it's not very 'automatic'. But I care not. I believe this has the best quality/efficiency ratio. @runevision's solution is on a different level of automation. "Entirely automatic way". I'm sorry, but not gonna happen. $\endgroup$
    – TeaCrab
    Jun 19, 2017 at 14:51
0
$\begingroup$

You can try with Edge Split Modifier:

enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here enter image description here

Note: Edge Split modifier keeps the polygon count of the object but increases the vertex count.

Second option via

Data Transfer Modifier

enter image description here

On the picture above is the Source object (i.e. before beveling) On the second picture is the beveled copy of the object that has the non-beveled object as source and Data Transfer modifier activated (note the settings!). Orientation of vertex-per-face with Data Transfer modifier You have to add Copy Transforms constraint to the source object and hide it. Both objects should be exactly centered.

In such manner the beveled object can be used inside Blender.

But if you want to apply the Data Transfer modifier, Blender will reset the normals back to default.

$\endgroup$
5
  • $\begingroup$ First of all thanks for your answer, sadly it's not what it supposed to be. Check here why: imgur.com/PCudha2 In your method Vertex-per-face Normals aren't recalculated thus they are producing visible transition between Smooth and Flat faces. $\endgroup$
    – cgslav
    Jun 23, 2017 at 16:09
  • $\begingroup$ I see. The only thing that is close to the look you are aiming to is by using Data Transfer Modifier. The only drawback is that if you apply the modifier Blender resets the normals to default. See the picture below. $\endgroup$ Jun 23, 2017 at 20:06
  • $\begingroup$ Second method was proposed in comments below by gandalf3. If I remember correctly it wasn't working as well as your method here. $\endgroup$
    – cgslav
    Jun 23, 2017 at 23:04
  • $\begingroup$ When you apply the Data Transfer modifier you have to enable autosmooth to see the custom normals created by the modifier. @LukeD I came up with the same solution as gandalf3. He mentioned that the interpolation on edges didn't look quite right, but that's only when using the basic solid shading; with matcaps and Texture/Material shading (GLSL) it looks the way it is supposed to look. $\endgroup$ Jun 23, 2017 at 23:41
  • $\begingroup$ I haven't seen mentioning of Data Transfer modifier anywhere else in this thread. Anyway, it seems that by exporting the object to FBX format and applying DT modifier seems to keep the normals. Here is a more detailed video showing the result of the export in Marmoset: youtube.com/watch?v=oAGEGBulzSU $\endgroup$ Jun 24, 2017 at 6:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .