Page MenuHome

Convert slopes to vertex group weights
Closed, ArchivedPublicPATCH


Project: Blender Extensions
Tracker: Py Scripts Upload
Blender: 2.66
Category: Mesh
Python: 3.2
Script name: slope2vgroup
Author(s): Michel Anders (varkenvarken)
Status: Open

Addon to convert slope (angle between vertex normal and object space z-axis) to vertex weights. Its purpose is to facilitate distributing particles preferentially to relatively flat parts of a mesh.


- select object (inobject mode)
- click 3dview -> object -> slope2vgroup

it will replace the vertex weights of the active vertex group or create a vertex group if none is present yet.

Then add particle system as you normally would and select the vertexgroup in the density field

Event Timeline

now has dual functionality

3dview -> Weights -> Slope will create/replace active vertex group weights
3dview -> Paint -> Slope will create/replace active vertex color layer (red channel)

Has now 4 options

low : slopes with lower angle than this will receive a unit value
high : slopes with steeper angle than this will receive a zero value
power: influences the shape of the mapping curve
mirror: maps slope angles > 90 to 180 - angle

v0.0.3 adds mirror option and the possibility to map the brush curve in vertex paint mode

v0.0.4 adds possibility to calc slope in either worldspace or object space coordinates in both vcol and vweight modes. vcol mode now produces grey scale values for the slope unless normal map is checked in which case the x,y,z components are simply mapped to the r,g,b component of the vcol layer.

Brendon Murphy (meta-androcto) changed the task status from Unknown Status to Unknown Status.Sep 12 2015, 1:31 PM

Closing as archived.
@Michel Anders (varkenvarken)
Feel free to create a fresh task if you intend developing this in Blender. It would be nice to some of this functionality in ant landscape.