Resolving Shading Issues

Page Under Construction

Please wait! I'm only drinking decaff! I can't prepare or write tutorials as fast as you can read them!


Before we begin, I need to state that the methods I show you here are by no means the only method for resolving shading issues in your addons. These are simply the ways I have learned how to do it by trial and error, and as such I know they will work 100% of the time. Relying on scripts or an automated process to remove shading issues can often lead to some being resolved while creating others.

This tutorial will cover the following topics:

  1. Identify shading issues

  2. Understand the two ways shading issues are formed in the first place

  3. Learn how to fix shading issues in blender before your first export.

While painting and actually making an addon for YSFlight can take a long time and involve a lot of effort, an amazing addon can be marred by weird shading variations in YSFlight or DNMViewer. These can be extremely distracting from an otherwise beautiful addon.

What is A Shading Issue?

Insert picture here

What I call a shading issue, you may call something else, however it doesn't change the fact that we have something wrong with the model! As you can see in the image above and many images below, we have a 'shadow' that appears where we don't expect it, or a hard crease that appears where there should be a smooth curved surface. There are two main types of shading issues:

  1. Sharp Corner Issues

  2. Small Face Issues

As you might imagine, these two types of shading issues generally come from two different sources. First, sharp corner issues are the result of the raw mesh that the aircraft is made from. If you are importing a model from another 3D file format (.obj, etc.) you may come across this quite frequently. Second, we have shading issues from having really, really small faces in the midst of a whole bunch of larger faces. These usually come from when we are trying to create really cool paint schemes with a lot of detail.

At the heart of all shading issues is how the mesh is arranged and setup. If we take the appropriate steps we can avoid these issues and create very beautiful aircraft that are unblemished.

Here are some examples of different types of shading issues:

Insert pics from jetskit, kuji, others

Understanding Why Shading Issues Form

At the heart of a shading issue are normals. These are directional unit vectors that blender allows us to see coming from vertices and faces. How we tell blender to interpret these normals causes several problems if things are not lined up just right.

First let's look at how we can visualize the normals. In the bottom right corner of the button window in Edit Mode we see this window:


By clicking the normals button we can see the normals of each face. If you rotate the model around you will see the normals coming from the center of each face. Below you can see these normals for my Super Sonic Transport concept jet.


If we press the Vnormals, this will show us the normals applied to each vertex. Note how these normals are pointing halfway between the faces they touch. This will be important later on.


You want your model to look like a hedgehog with every single normal facing the direction you are going to view the face from. If, for example, you have a face on the fuselage of your aircraft that has a normal facing inward, you will be able to see inside your aircraft as if the face wasn't even there. You can notice these errors in the Textured View Mode in blender.


Now that we know a little bit about normals, let's look at the two more common shading issues.

Two Most Common Shading Issues

As I mentioned above we have two main sources of shading issues. The first one you are likely to come across is the sharp-corner shading issue. When we apply the "Set Smooth" option to the mesh, blender looks at the vertex and face normals to determine how to apply the shading. When we have a sharp corner it has a harder time making it look smooth because the mesh is changing angle sharply, rather than gradually.

First I need to define what I mean by 'angle'. In the image below, I have extended the line beyond one of the faces on this sample fuselage cross-section. The angle formed between the extended line and the next face is what I will refer to as the 'outside angle'. The angle in green is the 'inside angle'. For the most part, I will be talking about the outside angle when I mention angles with respect the the sharp-corner shading issues.


Now the sharp-corner shading issue usually forms when we extrude something into the mesh. For simplicity we will use a fuselage as an example. Therefore one of the most common sources of this error will be around doors or landing gear bays. Another extremely common place for the sharp-corner shading issue is on the trailing edge of the wing where the airfoil has a sharp trailing edge. To fix these problems we will have to introduce a mesh feature called a 'double'.

A double is where two vertices that are part of completely different faces occupy the exact same spatial position. Additionally these vertices are not connected in any manner. The following two images show two vertices selected.

How Do You Spot Issues in Blender?

This can be a tricky task, however as you gain experience over several addons, you will be able to see the more subtle indications that a shading error exists. Additionally, after you learn why they form in the first place, you can analyze the mesh and identify likely places where these errors will occur. Don't get frustrated if things don't work out initially and you have to do several trials in DNMViewer or YSFlight. To this day I don't think I've had an addon that doesn't have a single shading issue.

First, let's look at the model in the Solid View Mode. This will show the aircraft in grey scale, and where ever you see the gradient of the color change rapidly around an edge, or face...that is a shading issue. But what causes

THings to talk about:

-overlapping faces