Custom Normal Editing

This is an interesting topic and something that I think is very important particularly for NPR and for game assets creation. I’ve made a tool for editing and painting vertex normals in Maya recently and I’m interested in helping out with improving Blender’s normal editing.

As a reference for discussion, here is a link to the gold standard in normal editing (Softimage User Normal Translator):

As well as an unfinished add-on that someone started a while back cloning it for Blender

I am wondering what the best UI would be and how the interactions should work. Also, perhaps more for 2.81 or 2.82, I would like to implement a new mode for painting normals with a brush, much like vertex colour paint.

4 Likes

To summarize what I think would be necessary to make Blender a normal editing powerhouse:

  • Being able to select a vertex and rotate its normal
  • Being able to set any vertex normal to an arbitrary value
  • Being able to select one or more vertices and multiply, add, replace, and smooth their normals
  • Being able to directly paint normals (multiply, add, replace, smooth) with a brush much like vertex colours

I was able to implement all of that in Maya with just a Python add-on. I will try the same in Blender and see how far I get. Then we can rearrange the UI and rethink how the user interaction should work for something that can come by default.

The only thing that might be more complicated is painting normals, as Blender does not have a custom paint context that can be used from Python as far as I know (either way the performance would be better in C for something like that).

1 Like

I’d be happy if I could just select a vertex, and then rotate it to change the normal.

3 Likes

Good point, I added it to the list above. Actually since such a basic thing is not possible yet, there may be some under-the-hood code that needs fixing. Any main blender devs that can explain any roadblocks there may be to implementing custom normals? @brecht

GSoC 2017 - Normal Editing Tools implement that operations, only there is no proper UI/UX

1 Like

You can actually rotate normals in an easier way, too. Start rotating geometry, then press N and it will rotate the normals instead.

1 Like

If implementable as add-on, a custom edit mode for normals might be interesting. Similar to particle hair grooming I see it working so one can select the tip of a normal and move it around. Split it if need be. Etc.

Ultimately having it as a native implementation instead of an add-on would be best of course.

A separate edit mode for it comes with the benefit that the whole interface for it can be kept simpler than it would need to be if it was implemented in mesh editing mode. Switching to the mode would be easy enough after all.

1 Like

Actual blender all that tools and with new tools like modifier.

it could be amazing if we have tools to groom normals like we do with hairs

I believe that custom edit modes can only be implemented in C so it would have to be mainlined rather than an addon. Which is probably better in the long run anyway.

Thanks for linking to the GSoC stuff. If the operations are already implemented it will speed things up considerably. The “only” thing then is to make a better UX.

I think because the paint tools (Vertex Paint, Weight Paint) have a built-in support for linking the selection from Edit Mode to their own mode, having a Normal Paint mode would probably work quite well. For example, here is how Vertex Paint does it:
blender-vertpaint

Although switching modes a lot slows down the workflow so being able to edit normals from the Edit Mode as well is probably quite important. Anyone have any ideas on what that should look like? The current Mesh->Normal menu is rather awkward.

1 Like

In weight-paint you do have the selection tools available and you can use both vertex as well as face selection for masking. No mode switching needed. Would be nice to have it in vertex paint too, to be sure.

YAVNE’s tools are more useful, but
Blender 2.8’s Normal smoothing is something YAVNE doesnt have and it’s really nice.

If I remember… YAVNE don’t have more useful tools than custom normal tools because all tools from yavne were clone, and with new tools.

Oh ya
The only unique tool it has is the Copy normals from object

The one in 2.8 doesnt seem to do the same.

But you can do with other modifiers.

Ah yea
The Data Transfer modifier allows you to copy normals from one object to another

https://docs.blender.org/manual/en/dev/modeling/modifiers/modify/data_transfer.html

And this works by default in 2.80? I am having trouble accomplishing this…

I believe so…
Oh, you need Auto Smooth enabled on the mesh, have you done that?

Definitely not working for me, you sure this is default behaviour not add-on?
I don’t ever recall seeing rotate tooltips saying “press N to affect normals instead” or anything along those lines.