Sharpening normals along one edge only

I’m writing an export script from Blender to SMD. I’m having some trouble with sharp edges. Here is my imported and exported mesh versus the original:

Currently I’m using the face normal on all sharp vertices, and the result is those unwanted radial edges (I’ve sharpened the bottom of the vest and the edges of the satchel).

The forums has scaled the image down so it’s harder to see the normals, but it appears that what I should be doing is averaging them on either side of the sharp edge. But how do I detect which side they are on, and what happens if there is an intersection of sharp edges?

I’d really like some help. Just please bear in mind that I’m not actually using OpenGL! :slight_smile:

Blender’s smoothing group systems are really archaic and broken… to the point at which to add them I typically just break the mesh into seperate meshes for seperate smoothing groups and then recombine without removing the duplicate verts. Good luck.

Hmm, yes that does do what I’m after, thanks for that. I’d still prefer to get marking edges as sharp working properly though, as that process should have the same effect without splitting the mesh up.

Blender can’t do explicitly hard or soft edges, only hard or soft per face.

I’m using 2.5, so I guess it’s a new feature. :slight_smile:

http://img833.imageshack.us/img833/4206/sharpedge.jpg

OK, here’s an idea: ignore Blender’s own vertex normal value, and calculate my own from the normals of connected faces. Discard values from faces connected to the current face by a sharp edge.

That’s clearly meant to have sharp edges, yet those look like blended normals?

I worked out the proper way of doing it. Marking edges as sharp is intended as input to the Edge Split modifier, which automates the job of splitting things like NeXEkho suggested - and which does it non-destructively. I don’t need to do any work at all, except to add the modifier if it doesn’t already exist. Excellent!

Too bad this turned out to have nothing at all to do with 3D maths! :wink:

Excellent! Congrats on solving the problem!

Now if only UDK’s importer could maintain split edges. >.<