Normals Editing in Blender

I want to add the functionality of editing vertex normals to Blender. Before I tackle this my way or the highway, I would like to find out what features the community would want to see from such development?

Personally, I would like the following:

  • Manually edit vertex normals using the rotate tool (DONE)
  • Transferring normals from one mesh onto another (projecting)
  • Differentiating between user-edited and calculated normals (DONE)
  • Keep using edge-split modifier to make hard edges (DONE)
  • Misc complimentary features, e.g. “Set to face”

I already put a bit of thought into each of those points,

1. Manually editing normals
Requirements:

  • Operate on single Vertex (DONE)
  • Operate on multiple Vertices (DONE)

How to do it:
Here some pseudo-code to convey the idea,

If only one vertex is selected:if normal for vertex is locked and if pivot_point is set to active element or individual origins:
[INDENT=2]Rotate vertex’s normal[/INDENT]
else If several vertices are selected:if pivot point is set to “individual origins”:
[INDENT=2]Rotate each vertex’s normal [/INDENT]

2. Projecting normals
Requirements:

  • Project from one or more meshes onto a single mesh (Object mode, Meshes only)

3. Hard Edges (DONE)Hard edges will handled as they are handled now. It enforces people to understand that a hard edge implies 2 vertices, even if most other 3D software (that I have used) abstracts this away.

Requirements:

  • Match Derived Mesh normal calculation, to preserve locked normals after modifiers

4. Differentiation between user-edited and calculated normals
The user should have the option of having his normals re-calculated or not. I already started coding and added a “normal lock”, so the normals stay put no matter what you do (on a per vertex basis) . While this works in most trivial cases, a bit more sophisticated solution should be thought of. E.g. when selecting a set of faces and rotating it, the normals should probably rotate along, even if locked - or maybe a switch for this behaviour? One way I can think of is to not store the absolute vector of the normal, but rather an offset - this however implies that when you mess neighbouring edges, the normals do not stay put completely. (SOLVED: When rotating vertices, faces etc. the normals now rotate along)

Please make this a modifier!
Allowing users to store the vertex normals would be really amazing too.

Thanks for working on this :slight_smile:

Are you thinking of a shrink-wrap modifier for normals? I like this idea a lot. Despite that, I do want to establish a modifier-less way of working with the normals of a mesh. I am sure a lot of the actual “normal transfer” code can be shared here.

Awesome work, excited to see future progress. The addon that I wrote was one of the first extensive things I did in blender python, so it was pretty shallow. However, it looks like a lot of your plans (and accomplishments so far!) are in line with my fantasies from that period for something on the C side. Pretty cool. (:

Regarding projection from one mesh to another, something I did wrong in my addon was to make it rely on the redo panel / f6 functionality. If I were to make it modal (which I have since explored in other python scripts), the scaling of the effect would likely be much faster, more responsive. If that sort of gradual projection functionality is ever desired, modal behaviour may be preferable. (I’m not sure how that’s different in C!)

Wow! I think a lot game modelers waiting for the ability to alter vertex normals in Blender. Including me.

Thanks for coding this! Can’t wait to try it out!

Nice work here! Looking forward to seeing a patch.

Absolutely awesome work - not only essential for 3d game dev, but this will also open up Blender to product visualization work. The automatic recalculation of normals in Blender is a big fly in the ointment for professionals who are interested in Cycles for product viz: the edge split modifier is a patch that insufficiently addresses this issue in Blender.

Long, LONG overdue, and excellent work: this may have more impact than all the “bigger” features added to Blender lately (which are also brilliant).

Thank you!

Herbert123, I am not looking at removing the edgesplit modifier. There is only one normal per vertex. If you need hard edges, you need the edge split modifier. I think to make sth work that is not reliant on the edgesplit modifier is way out of scope on what I am trying to accomplish. In fact, to me, the edglesplit modifier is advantageous as it does not do “magic” like other apps do (e.g. split the verts behind the scenes).

I made a video showing how the feature currently works.

Now it needs some tool to go with it which could be a possible integration into the modifier stack.

Wow that rocks dude!

felixSchl, That looks amazing!

Editing normals is an absolute requirement for most game development these days. I’m really glad to see someone trying to tackle this and succeeding. Thank you.

I’m still making up my mind on the edge split method for defining hard edges. While I understand that once exported to the game a vertex that is along a hard edge will actually be 2 verts, I still think there will be a state of uneasiness from most artists as blender becomes adopted more by the game dev community. As the perception stands right now you will be judged for having holes in your mesh in places where in other software it appears to be closed. Some art directors might not care what software you use, but will probably care if they bring your mesh into their 3d package and it seems “wrong”.

Changing the well established perception of an entire industry might end up being much more difficult than implementing hard edges. But maybe it’s about time for perceptions to be changed.

This is absolutely needed in Blender. Thanks for doing this! Looks great.

Sorry for the late reply. Yea, I was thinking that it would be cool to pick a source mesh that the vert. normals could be transferred from, and having it as a modifier would enable a persistent mesh selection. :slight_smile:
To make this really useful we would need a way stop Blender recalculating the normals though.

Looks great, man! :smiley:

The meshes are split to create smoothing groups when they get into most game engines anyway, but I agree with you that it would be nice to enable the splitting of vert. normals in Blender so that the mesh remains a single contiguous piece.

Wow im so happy i found this ! Thank you felixSchl for this awesome feature you’re working on.Its been so long since this functionality was missing.Kudos +1 googolplex :stuck_out_tongue:

Are you still working on that?

Great job i use this feature extensively in 3ds max for environment work.

Billboard trees would benefit greatly from this if it reach completion!

Gonna be sweet! Blender has needed this as far back as I can remember, at least when it comes to game assets and managing good looking low poly stuff.

Would be nice for editing normals to be able to just set a hardness level (value tied to the edge or vertex similar to crease or bevel weight) of anything selected. Hardness being 0.0 (soft) to 1.0 (hard). It would allow the quickest way to set edges to something between soft and hard.

Dude…DUDE. I was just writing to someone how Blender couldn’t be used in game design because of this. I checked on this 3 months ago and there was nothing available. Beyond the smoothing groups implementation and cage baking this was one of the ‘big three’ that needed implementation. Thanks for this, keep working on it. I will donate money if you need it.

Thank you for doing this, I believe that everyone from game making community is thankful to you.