Jump to content

Tutorial - the virtues of normal editing.


Kyrah Abattoir
 Share

You are about to reply to a thread that has been inactive for 451 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

There is a very simple operation that you can use to both reduce polygon count and improve the look of your object when doing hard surface modeling (but this trick is not limited to it!)

Lets take this model i've made. you can see that I have numerous beveled edges, however, if i want to achieve a rounded look, i'm going to need many intermediate steps to round it up. Or do I?

tut1.png.191b41d18d6fbec1f8ec419bc16a0516.png

Lets see how it looks if i set all the polygons to "smooth" shading.

tut2.png.0e16b06144fee5be902c7fd4daaa6ddc.png

Oh no this looks terrible, it is pinching everywhere! surely I'm gonna have to add a lot more geometry or a normal map to make it look right!

tut3.png.b347d6247d7f97b5f6eea601912f6143.png

Wait how did you do this? What do you mean it's the exact same geometry? everything looks nice and crisp!

 

This is the same model, 100% identical, the only difference is the orientation of the face corner normals. Lets turn on normal display and see what is different, and how to do it:

tut6.thumb.png.e5eb1ee1c7cd80997e0a4dd18737d310.png

As you can see on the unmodified model the normal direction (the little purple lines) are jutting directly away from each face corner. And as a result, the lighting of each face is "blended" into the next face.

On our version of the model with edited normals, they are alligned with the flat surfacase they belong to, causing the "bevel" face to appear curved.

This means that holes, cuts and beveled edges do not alter the surface lighting anymore without having to use "mark sharp" and getting a razor sharp edge as a result.

How to do it

tut7.png.e261af3bf5407cc5c8a91eb69d2eb9de.png

You need to create a separate copy of your model and delete all the faces that are part of a bevel, so you only have the "flat" surfaces left.

tut8.png.159d785823ab0c26d2a831f056884bb0.png

You then need to add a "DATA TRANSFER" Modifier to your object (the real one) And configure it to copy the face corner data "custom normals" from your edited object.

And that's all there is to it :)

NOTE: For this to work properly, you also should turn on "Auto Smooth @180°" in your object's mesh data tab (on both objects preferably)

Edited by Kyrah Abattoir
  • Like 6
  • Thanks 10
Link to comment
Share on other sites

  • 1 month later...
1 hour ago, arton Rotaru said:

Don't tick the Generate normals box in the importer. It will override your carefully set custom normals.

Also, note that custom normals only show up if you have ALM enabled.

Edited by ChinRey
  • Thanks 1
Link to comment
Share on other sites

I just can't get this working. I remembered I'm using Avastar 1 to export. The collada exporter included with Blender causes crashes to desktop more often than it doesn't.

Is that going to meddle with my normals?

Edited by Ana Stubbs
Apparently I can't work the enter key properly either - posted before I'd finished typing
Link to comment
Share on other sites

2 hours ago, Ana Stubbs said:

I just can't get this working. I remembered I'm using Avastar 1 to export. The collada exporter included with Blender causes crashes to desktop more often than it doesn't.

Is that going to meddle with my normals?

It's possible that Avastar 1 doesn't export custom normals to Collada. IIRC, @Gaia Clary modified Blenders regular Collada Exporter to export custom normals not so long ago. Which appeared first in Blender 2.78, or maybe 2.79.

Other than that, I would recommend to triangulate the mesh before editing the vertex normals. Edited vertex normals are pretty fragile, and can break easily with changes in the topology. 

Edited by arton Rotaru
  • Like 2
Link to comment
Share on other sites

24 minutes ago, arton Rotaru said:

Other than that, I would recommend to triangulate the mesh before editing the vertex normals. Edited vertex normals are pretty fragile, and can break easily with changes in the topology. 

It is already triangulated, and I've double checked all the possibilities suggested upthread.

I'm starting to wonder if it's my expectations that are the problem instead!

Link to comment
Share on other sites

On 9/21/2018 at 11:53 AM, Raindrop Drinkwater said:

This is brilliant. I've been working on a low-poly mesh path, and I was grumbling to myself that I'd have to add edge loops because of this very issue. Kyrah, you just saved me from a polygonal headache.

Very nice! That's an excellent example!

To those who have problemw with this, personally i keep the data transfer modifier on the top of my modifier list and I don't actually apply it. ChinRei is right, you can very easily break them if you apply the modifier, which is why I don't..

  • Thanks 1
Link to comment
Share on other sites

3 hours ago, arton Rotaru said:

It's hard to post something to compare without knowing how your model looks like. I have edited vertex normals on the most of my meshes, in one way or the other.

That's a fair point. I just wanted some sort of indication of how it should actually look in world, compared to in Blender. I'm still trying to work out if I've mistaken success for failure due to expecting a more dramatic difference.

Here's an example from what I'm currently working on. I can't see any difference between the flat shading and the fixed one.bevel.thumb.png.d509f0540d7f5c508e59fff4b844a759.png

In the interests of transparency, this particular mesh wasn't triangulated before upload, but I see the same thing on ones that have been.

Link to comment
Share on other sites

1 hour ago, Ana Stubbs said:

That's a fair point. I just wanted some sort of indication of how it should actually look in world, compared to in Blender. I'm still trying to work out if I've mistaken success for failure due to expecting a more dramatic difference.

Here's an example from what I'm currently working on. I can't see any difference between the flat shading and the fixed one.bevel.thumb.png.d509f0540d7f5c508e59fff4b844a759.png

In the interests of transparency, this particular mesh wasn't triangulated before upload, but I see the same thing on ones that have been.

You should be using smooth shading with the data transfer. Your "fixed" version seems to be using flat shading, which defeats the point. (Or maybe it just needs an extra level of bevel, not sure.)

Edited by Wulfie Reanimator
Link to comment
Share on other sites

56 minutes ago, Wulfie Reanimator said:

You should be using smooth shading with the data transfer. Your "fixed" version seems to be using flat shading, which defeats the point. (Or maybe it just needs an extra level of bevel, not sure.)

Oooops. Smooth shading on both source and target, or just target?

i tried both - now my bevel looks fine, and the rest of it looks like meeroo cack...

Snapshot_025.thumb.png.bb123c365a41242b3f7edc430b5b1272.png

 

Link to comment
Share on other sites

You have to delete the faces AND the edges composing them so that the "normal source" object only contains the flat surfaces of your object.

Ensure all your faces are in "shade smooth" mode.

Tick autosmooth on both source and target.

Don't use recalculate normals in the uploader (why would you)

Edited by Kyrah Abattoir
  • Thanks 1
Link to comment
Share on other sites

18 hours ago, Kyrah Abattoir said:

You have to delete the faces AND the edges composing them so that the "normal source" object only contains the flat surfaces of your object.

Ensure all your faces are in "shade smooth" mode.

Tick autosmooth on both source and target.

Thank you! I've finally got it working. Perhaps I should have had more than a few weeks of meshing under my belt before trying it...

18 hours ago, Kyrah Abattoir said:

Don't use recalculate normals in the uploader (why would you)

Genuine question. Why WOULD you? I've never used it.

Link to comment
Share on other sites

16 minutes ago, Ana Stubbs said:

Thank you! I've finally got it working. Perhaps I should have had more than a few weeks of meshing under my belt before trying it...

Genuine question. Why WOULD you? I've never used it.

Since this is the process of creating custom normals, "recalculate normals" throws that all away.

Edited by Wulfie Reanimator
Link to comment
Share on other sites

15 minutes ago, Ana Stubbs said:

Right, but why would you ever want to throw your normals away? I'm kind of curious.

...You don't. That's why you're not supposed to recalculate them.

It will override your custom normals and undo the work you've done in Blender with the Data Transfer modifier.

If your question is "Why is there an option to recalculate?" that's for some special cases, and it will prevent flipped normals.

Edited by Wulfie Reanimator
Link to comment
Share on other sites

4 hours ago, Wulfie Reanimator said:

If your question is "Why is there an option to recalculate?" that's for some special cases, and it will prevent flipped normals.

Yeah, that was my question. Sorry I wasn't clear - I figured there must be some significant use case, or the option wouldn't be so exposed, but couldn't see what it was.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 451 days.

Please take a moment to consider if this thread is worth bumping.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...