92
$\begingroup$

I frequently come to the problem of having a mesh with parts I would like to render smooth and "hard" edges connecting them.

How can I set the mesh to show the sharp edges but render everything else smooth?

In the example I would like the sides of the individual cylinders render smooth but the intersection between bottom and top to be sharp/flat

flat set to smooth

$\endgroup$
1
  • $\begingroup$ Thanks for the answers, I guess both are really good depending on the situation. $\endgroup$ Commented Jun 9, 2013 at 6:39

7 Answers 7

78
$\begingroup$

There are a few ways to do this but the quickest and most efficient (in your case here) is to just smooth it the same way, using Shade Smooth and then adding an Edge Split modifier to the mesh.

From the wiki

The EdgeSplit modifier splits edges within a mesh. The edges to split can be determined from the edge angle (i.e. angle between faces forming this edge), and/or edges marked as sharp.

Splitting an edge affects vertex normal generation at that edge, making the edge appear sharp. Hence, this modifier can be used to achieve the same effect as the Autosmooth button, making edges appear sharp when their angle is above a certain threshold. It can also be used for manual control of the smoothing process, where the user defines which edges should appear smooth or sharp

Here it is as you have it above..

enter image description here

With the modifier added

enter image description here

Additionally, you can see some more tips here for getting good quality on hard surface models. BlenderCookie has a tutorial (archived) on getting nice sharp edges.

$\endgroup$
1
  • $\begingroup$ I love you brah $\endgroup$ Commented Apr 9, 2021 at 21:47
68
$\begingroup$

While what iKlsR says is indeed the most efficient, it's often preferred to either add edge loops on both sides of the hard edge, or bevel it (Ctrl + B). When smooth shaded this produces a more realistic surface since there's seldom any truly sharp corners in reality, and also catches specular highlights nicely showing off the model better.

Beveled corner with wireframe

Close-up

Note that the Edge Split modifier shouldn't be used when beveling or using edgeloops to sharpen corners. Edge Split physically cuts the model to fake a sharp corner, whereas beveling actually creates the corner.

$\endgroup$
2
  • 4
    $\begingroup$ It is perhaps useful to mention to the reader that the EdgeSplit modifier and Bevelling operations are not mutually exclusive techniques. Doing manual bevels helps guide the transition from smooth to flat in those sections where EdgeSplit produces unnaturally abrupt transitions. $\endgroup$
    – zeffii
    Commented Jun 25, 2013 at 14:48
  • 3
    $\begingroup$ For anyone really new to Blender -- Bevel is a modifier. Look for it there. $\endgroup$
    – user15098
    Commented Jun 21, 2015 at 2:25
49
$\begingroup$

As of this commit (will be in blender 2.71), blender has support for split normals.

This is basically like the old Autosmooth, but it works in Cycles and the viewport in addition to BI.

If you don't know what Autosmooth is, it behaves like the edge split modifier, but without actually splitting edges:

enter image description here

There is no edge split modifier used in the above screenshot.

$\endgroup$
4
  • $\begingroup$ This is amazing. It fixed all my shading problems caused by subdiv / 1.0 creases at once. $\endgroup$
    – Ray
    Commented Feb 29, 2016 at 20:03
  • $\begingroup$ This should actually be the top answer, or the accepted answer should be updated. $\endgroup$
    – Ignatiamus
    Commented Oct 13, 2018 at 12:52
  • $\begingroup$ as of 2.80, does this work with Eevee too? $\endgroup$
    – Luciano
    Commented Aug 15, 2019 at 9:28
  • $\begingroup$ @Luciano yes, it should. The setting is in the same place as well iirc $\endgroup$
    – gandalf3
    Commented Aug 15, 2019 at 9:30
20
$\begingroup$

Another thing that you can do is - In Edit mode hit W and there you have Shade Flat and Shade Smooth You can just select the parts of your object that you want them to be smooth and press on Shade Smooth.

enter image description here

Under 2.8+ this is accessible through both Edit Mode and Object Mode Right Click context menu.

$\endgroup$
16
$\begingroup$

The following method is probably best for real-time (e.g. games) and low-poly work in particular.

Gandalf3 mentioned the new Autosmooth feature, but I'd like to add that with it enabled, you can manually select faces, edges and vertices that you would like to be hard - the Autosmooth 'Angle' setting merely creates a base smoothing to work from. If you then go into edit mode and look in Shading / UVs > Shading, there are options to mark vertices, edges and faces. With Autosmooth disabled, you can see the edges/vertices you have marked, but they will not be rendered flat, but when Autosmooth is enabled, they will be rendered correctly.

Autosmooth: Manual marking

As Gandalf3 mentions, unlike the split edges modifier, Autosmooth does not physically split elements in order to get hard edge lighting, so is ideal for low-poly work, and seems to be designed for better compatibility with the FBX and OBJ formats, which are commonly used in games.

$\endgroup$
7
$\begingroup$

Another simple way to do this would be to select the faces that you want smooth (in this case the non-horizontal surfaces) and select Shading: Smooth in the tool panel. Then, select the faces that you want sharp (horizontal surfaces, in this case) and select Shading: Flat.

It probably won't give as nice results as Greg's method, but it might be quicker and simpler.

$\endgroup$
2
  • $\begingroup$ This is a useful method if you need a lowpoly mesh to import into i.e. Unity. Just make sure to import tangents. $\endgroup$
    – Keavon
    Commented Jul 7, 2014 at 12:57
  • $\begingroup$ @NoviceInDisguise It seems to work fine for me in 2.73: i.sstatic.net/4XqVR.png $\endgroup$
    – Keavon
    Commented Mar 4, 2015 at 5:17
6
$\begingroup$

Just to be complete:

The first and original method to achieve that is still there: Autosmooth. It works like an Edge Split set to Edge Angle. The drawback is that the effect isn't visible in the viewport. The modifier is somwhat superior by now.

enter image description here

$\endgroup$
1
  • 2
    $\begingroup$ This answer is now outdated. $\endgroup$
    – Jake Dube
    Commented Apr 22, 2017 at 13:23

You must log in to answer this question.

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