diff options
author | Keith Boshoff <wahooney> | 2020-01-21 20:00:21 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-01-21 20:08:30 +0300 |
commit | 0de07c98143ad5b3581018b2e7e2e3ffdf3dc828 (patch) | |
tree | e547d75e84818b8acf6c74f0bab53d7877640c48 /release/scripts/startup/bl_operators | |
parent | 7dc4477784be73220111a1c757ea24a3063aa51a (diff) |
Docs: describe vertex dirt method
Diffstat (limited to 'release/scripts/startup/bl_operators')
-rw-r--r-- | release/scripts/startup/bl_operators/vertexpaint_dirt.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_operators/vertexpaint_dirt.py b/release/scripts/startup/bl_operators/vertexpaint_dirt.py index 39d792bd557..a249599b5d7 100644 --- a/release/scripts/startup/bl_operators/vertexpaint_dirt.py +++ b/release/scripts/startup/bl_operators/vertexpaint_dirt.py @@ -37,6 +37,20 @@ def applyVertexDirt(me, blur_iterations, blur_strength, clamp_dirt, clamp_clean, from math import acos import array + # We simulate the accumulation of dirt in the creases of geometric surfaces + # by comparing the vertex normal to the average direction of all vertices + # connected to that vertex. We can also simulate surfaces being buffed or + # worn by testing protruding surfaces. + # + # So if the angle between the normal and geometric direction is: + # < 90 - dirt has accumulated in the crease + # > 90 - surface has been worn or buffed + # ~ 90 - surface is flat and is generally unworn and clean + # + # This method is limited by the complexity or lack there of in the geometry. + # + # Original code and method by Keith "Wahooney" Boshoff. + vert_tone = array.array("f", [0.0]) * len(me.vertices) # create lookup table for each vertex's connected vertices (via edges) |