Tutorial: Sharp edges and smooth corners in Blender

  • In 3d graphics there are no real curves, just only straight edges. So it's necessary to use tricks to display cureves properly. Although the Faces are plain and should be enlighted in a even way, there is a possibiilty to interpolate shades between the vertices of a face. These shades create a color gradient, which let the face look curvy.

    There are some steps needed to create this effect in Blender.

    1 If all faces are plain

    If the object has no curvy looking faces (e.g. a cube), the question when importing the x3d file into the Content Tool "Should the object be explicity imported with flat shading?" should be answered with "Yes".

    2 If there are curvy faces

    If the object has some curvy faces the settings to use this mechanism have to be set in Blender.


    The main problem in this case is, that Blender display shades in a different way as they will be exported.

    2.1 Blender internal

    In Blender the type of shades for the specified faces can be set in the Edit-Mode by selecting the face, then press [W] and choose "Shade Flat":



    The result looks like this:




    The cube gets displayed correctly, but the cylinder looks more likely as a dodecagonal pillar. But that is not the result we wanted.


    If the object gets imported into the Content Tool as "explicit flat", the object would look like shown above.


    Instead of choosing "Shade Flat", choose the option "Shade Smooth" and the objecs look like this:




    The result isn't that good either. The cube has shades on it too and the top and bottom face of the cylinder is also smoothed.


    To get rid of these smoothness set the shading for the cube and the two faces of the cylinder to "Shade Flat":


    2.2 Export from Blender

    Unfortunately Blender doesn't export these data into the x3d file. Instead Blender exports every face with smooth shading.


    So when having a curvy looking face in a object, every faces should having the option "Shade smooth" applied:



    Imagine, that all edges of the faces, which share the same vertices, should be curvy.

    2.2.1 Flat shading

    The solution is to "break" these edges, which should be sharp! To do so select the faces, which should be flat in Blender and press [Y] to "seperate" these polygons.


    "Seperating" these polygons means, that at every connection between the selected and unselected faces new vertices will be inflicted at the same position. The mesh will look the same as before, but the flat polygons have their own vertcies, so the shadings are seperated.


    After selecting the top face of the cube and press [Y] the result should look like this:




    Apply the same method to the front face of the cube:




    The left side of the cube is still connected to the down side and back side of the cube, so it is still looking curvy.


    After parting all side of the cube:




    Repeat this method with the lateral surface of the cylinder:





    TODO

    There is another interesting fact: Although the lateral surface of the cylinder is seperated from the rest, it still looks curvy, because the edges heading towards the rest matter most. The edges between the selected polygons are won't be affected at all and remain curvy. On the other hand the top face and the bottom face are flat, although we didn't even do a thing.

    2.2.2 Still curvy

    This method can be done reverse. To do so choose the function "Remove Doubles". Now the vertices with the same position get weld to one vertex. This affects of course the shading: