Page MenuHome

Smooth shading usabilty
Confirmed, NormalPublicTO DO

Description

When adding a mesh primitive in Blender, it is by default flat-shaded without subdivision surfaces. This means that after adding a new object with a smooth surface (like a sphere or monkey mesh), the user almost always has to change some settings.

We could change the default mesh settings to avoid that. However there are two distinct use cases which require different settings.

  • Meshes with autosmooth and/or custom normals. This could be either a low poly model for games, or a high poly model imported from CAD software.
  • Subdivision surfaces with creases to define sharp areas of the model. Custom normals are lost in the subdivision process, and autosmooth can't be combined with GPU acceleration.

Once subdivision surface settings become part of the mesh (T68891: Subdivision surface settings part of the Mesh), we could handle these as more distinct cases in the user interface and implementation.

  • If a mesh is a subdivision surface, no autosmooth or custom normals would be available.
  • Subdivision surface mesh primitives could be in a separate submenu of the Add menu, with all faces smooth shaded by default.
  • Mesh primitives could have smooth shaded faces and autosmooth enabled by default when it makes sense.

Enabling autosmooth by default will negatively impact performance, particularly in edit mode. It's not obvious this is something we want to do. Further optimizations in this area are possible, but there will always be a cost.

Event Timeline

Dalai Felinto (dfelinto) lowered the priority of this task from 90 to Normal.Aug 20 2019, 8:20 PM
Dalai Felinto (dfelinto) created this task.
  • Subdivision surface mesh primitives could be in a separate submenu of the Add menu, with all faces smooth shaded by default.

Can be a checkbox in creation parameters menu?

Creating flatshaded allow to check up geometry polygonage (a "weight"). Indeed, it is very important for gamedev.
We solved autosmooth issue in a simple way - created Set Autosmooth operator that applies 70 degree autosmooth to selected models.

70 degrees allows to keep pentagonal cylinder as flat and hexagonal cylinder as smooth, so it very profound value for most cases we faced with.
So we has got very simple unified workflow:

  • Created flatshaded meshes allow to check up it's density.
  • Set Autosmooth operator (space menu - AU) allow to set proper autosmooth that fits most cases.
  • If it isn't somewhere enough we providing sharp edges.

Using it starting from architecture and ending with baroque modeling and lowpoly assets.

Enabling autosmooth by default will negatively impact performance, particularly in edit mode. It's not obvious this is something we want to do. Further optimizations in this area are possible, but there will always be a cost.

I think we could improve usability here quite a bit without any performance cost.

Let's say we hide the Auto Smooth toggle completely and only have one slider for the smooth shading angle. 0° is exactly the same as flat shaded in every scenario, so internally Auto Smooth would be off. This could be the default with no performance hit. 180° would be the same as smooth shaded, unless edges are marked as sharp. So if no edges are marked sharp, Auto Smooth is also off at 180°. If the angle is anywhere in between or if any sharp edges have been set, Auto Smooth could automatically come on behind the scenes. Setting smooth and flat shading would then not be setting a property of the object but setting a preset for the smooth shading angle.

The benefit of this is never having to think about whether something is set as smooth or flat shaded, or if auto smooth is off or on (warning signs in modifiers, setting sharp apparently doing nothing without any explanation, etc.) - it would all just work as expected and be a faster workflow.

one slider for the smooth shading angle. 0° is exactly the same as flat shaded in every scenario.

Sounds similar to sketchup solution, also, as far as I remember, same behaviour were used in some shader nodes.
So why not, I can’t find cases in which this solution causes problems)
I will ask webgl modellers, such things are always fragile in gamedev/realtime.

Asked webgl artists.
Indeed, smart autosmooth slider seems to be ok, if "shade flat" and "shade smooth" options will be available for mesh editing.
This way, placing smart autosmooth slider to adding object preferences with default=0 seems to be a nice solution both for usability and perfomance issues.

Some apps make it so Smooth Shading is always enabled when using Subdivision Surfaces. If we did that, or had a boolean to enable this in the modifier which was enabled by default, that would make the process of achieving smooth shapes simpler.

Indeed, a boolean can be a nice option.
For instance, in gamedev modeling subd flat shading will allow to percept mesh density, while in organic/hardsurface modeling subd smooth shading will allow to see smooth result immediately to check up for artifacts with zebra shading.

https://youtu.be/mIpJq9y_Qic?t=237

An excellent example of automotive modeling.
Car is made in flat/autosmooth shading, because it allows to feel an actual geometry, and subd with smooth shading option allow to see the final result of every part.

https://youtu.be/757ZnC7bPF4?t=639

Global checkbox that allows smooth shading for subd will be useful, as it's state depends on gamedev or hardsurface workflow type that artist performs.

Wouldn't it be user-friendlier to implement a setting in the preferences where the user can preset the angle value of auto smooth for future projects/assets himself?