2
$\begingroup$

I'm making a cartoony wrench for a video game and I'm getting this strange shine on one part of it because of the combination of metallic material and shade smooth. Auto smooth is on and at 35% and changing that value causes other problems. I tried applying a different material to the affected parts but I couldn't find any values of metallicness or material value that seemed to fix it. I'm guessing that something about the sharp angles is causing this So I tried making them less steep but it didn't seem to help. Is there a fix that doesn't involve changing any of the values I've mentioned?

This is what the wrench looks like at my desired material values and circled is the unwanted shine that looks unrealistic imo.

enter image description here

This is what the wrench looks like in Unity. As you can see the problem persists and I don't plan on adjusting models in Unity though if there is a fix from there I'm open to it.

enter image description here

This is the mesh in edit mode.

enter image description here

This is with Split normals.

enter image description here

Aaaaaand wireframe display.

enter image description here

$\endgroup$
9
  • 1
    $\begingroup$ Show us the normals by turning on the normal overlay (edit mode -> Overlays -> Normals -> Display Split Normals -> Increase Size if necessary). $\endgroup$
    – scurest
    Commented Mar 6, 2023 at 6:09
  • 2
    $\begingroup$ could you please share your file? blend-exchange.com $\endgroup$
    – moonboots
    Commented Mar 6, 2023 at 6:50
  • 2
    $\begingroup$ To be honest the question seems a bit pointless, since shading in Blender probably has little to do with shading in whatever game engine you are going to use so solving this in Blender will not necessarily solve the real issues. "Unreasonable" is also not a very certain term. Visually, the geometry itself does not look very reasonable since wrenches usually do not have very sharp edges. Something like this looks more usual visually. $\endgroup$ Commented Mar 6, 2023 at 8:38
  • 3
    $\begingroup$ The topology of your model will be central to the way normals are interpolated across and between faces.. so, at least, please switch on wire-frame display, to show us that. $\endgroup$
    – Robin Betts
    Commented Mar 6, 2023 at 9:29
  • 1
    $\begingroup$ @GordonBrinkmann custom vertex normals (including auto smooth) actually are often exported, and editing them is a common technique in game modeling. $\endgroup$
    – gandalf3
    Commented Mar 7, 2023 at 7:09

3 Answers 3

1
$\begingroup$

Now that I have downloaded your file I see that we have here one of the most common issues: the scale on your object is not applied. Not applying the scale is the cause for many issues, for example when you try to bevel or inset something - but even problems with smooth shading which I didn't about earlier.

I did not see it in the first screenshot because I paid more attention to the images showing the object in Edit Mode, which does not show the scale. Take a look at the difference before and after applying the scale:

  • Your object without applied scale. X and Y are not 1, especially Y is quite low.

    shading with incorrect scale

  • In Object Mode press Ctrl+A > Apply > Scale so that each axis is now 1, and the shading looks much better.

    shading with applied scale

All in all your object has some non-planar faces which can always cause issues with the shading, so this might not be perfect but applying the scale is one of the most important things if you want to make sure tools and shading behave like expected. By the way, the scale on your mouth is not applied either but I don't know if this is intentional to create mouth movements.

$\endgroup$
1
  • $\begingroup$ I just recently learned about applying the scale to my objects but I didn't know it could have a practical use like this I thought it was just to make things more uniform. Interestingly I found another solution just now by adding 2 extra sets of vertices along the sharp inner edges of the wrench (think where the object it grips goes). I was planning on making it more curved to see if that fixed things but your solution is much cleaner! Thank you so much for all of your help! $\endgroup$
    – Sticklad
    Commented Mar 17, 2023 at 4:45
2
$\begingroup$

You have definitely some duplicate geometry there. It is hard to tell for all split normals where they belong to because they are so long and overlapping everywhere, but usually each vertex should show two split normals on each corner. But as you can see, some them show three normals or one normal is pointing in the wrong direction regarding the position of the vertex (actually both are pointing in the wrong direction, like all which are labeled "3"):

wrong split normals

What I would suggest to do first is making sure that there is no duplicate geometry. To do this, select all vertices in Edit Mode with A, then merge them with M > Merge > By Distance.

And while everything is selected, make sure you don't have any custom split normals data on the mesh because they can mess up the shading as well. To do that go into the Object Data Properties and look under Geometry Data. If there is a button Clear Custom Split Normals Data, click it. If the button says Add Custom Split Normals Data everything is fine and you don't have to click it.

custom split normals data

$\endgroup$
0
$\begingroup$

This is likely because the side of the wrench is not perfectly flat. I attempted to reproduce the artifact from your screenshot by moving the selected vertex here slightly:

screenshot showing the shading artifact

And you can sort of see how the tweaked vertex's normal is unsplit and at a funny angle compared to the normals of the tip vertex on the opposite side, which is split into two normals at 90 degrees. It's a little hard to see in your screenshot, but I think I can see the some vertex normal lines at similarly funny angles there too. Here's a side view of my version which shows the difference more clearly:

side view showing the angle vertex normal corresponding to the shading

If this is indeed the same artifact as your model, you have a number of ways to fix it:

  • Just move the vertex back in line. One way to do this:

    1. Enable vertex snapping

    2. Select the unaligned vertices and scale them to 0 along the appropriate axis (for my model, the Y axis) (I only had to move one vertex so I skipped this step in the gif)

    3. Move the vertices along the Y axis and use snapping to align it with the rest:

      gif showing the above steps resolving the artifact

  • If you don't want to change the geometry at all, then perhaps the second easiest way is to adjust the auto smooth angle to be a little lower than the angle between adjacent faces where the artifact is:

    animated gif showing the effects of showing the auto smooth angle

    However finding a value which works will depend on your models geometry and you may have to tweak a few vertices.

Other more advanced options involving normal editing:


To make sure you normal edits are preserved when you export to unity, make sure you're using a format which stores vertex normals, such as gltf. If you are using gltf, also make sure vertex normal export is enabled.

$\endgroup$
1
  • $\begingroup$ I briefly skimmed your answer and will look more into it when I get back to working on it but thank you so much for such detailed help!!! $\endgroup$
    – Sticklad
    Commented Mar 8, 2023 at 3:04

You must log in to answer this question.

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