[Bf-blender-cvs] [0de07c98143] master: Docs: describe vertex dirt method
Keith Boshoff
noreply at git.blender.org
Tue Jan 21 18:08:48 CET 2020
Commit: 0de07c98143ad5b3581018b2e7e2e3ffdf3dc828
Author: Keith Boshoff
Date: Wed Jan 22 04:00:21 2020 +1100
Branches: master
https://developer.blender.org/rB0de07c98143ad5b3581018b2e7e2e3ffdf3dc828
Docs: describe vertex dirt method
===================================================================
M release/scripts/startup/bl_operators/vertexpaint_dirt.py
===================================================================
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)
More information about the Bf-blender-cvs
mailing list