draft direction shader.

Hi guys, i been trying to create a shader to check the draft direction in mesh models. Then modify in sculpt mode the model to correct it. Ideally the material must to be seen in the 3d view port. the attached file have a very basic test, but i am stuck.

This shader is restricted to the world axes, but i need to change the pull direction with/to a given plane, i really stink in math and nodes, so i can´t figure the setup to associate the pull direction to a plane, or empty. Can you guys help me?

There is a few examples of the draft preview in other software.

Thanks guys.

Attachments

draft.blend (1.8 MB)

This is something difficult to do with shaders/materials… the best approach would be with python, and use vertice colors or vertice groups to store the results…

As for the math, well… that should be not a big problem, but the best algorithm, it’s another point. Do you know any essay regarding this matter?

Anyway, the python scripts forum may be the best place to look for help. :wink: