Abrasion generator script idea

Abrasion (okay, I dont know the good word, cafing? deterioration? fray? wear?) makes the 3d textures very realistic. Making abrasion with script is very easy. In the new Blender there is a edge select method: Select sharp edges (you can set the max angle of the edge sharpness). In the real world, abrasion generation on sharp edges, so maybe we can make good looking abrasion with this select function. But with a script, we can make automatic this thing. And we can play the concave and convex edges. Abrasion generating on convex edge, dirt and rust on concave edges.
I have seen a good plugin for Lightwave that makes very good abrasion, but I dont dont know the name of this plugin. For 3dsMAX I have seen procedural shaders that makes abrasion.
So this is an idea, we can talk about it.
I will make pictures with playing the “select sharp edge” trick.

I like the idea! I can see what you’re saying here, could be very very handy!

a try :slight_smile: very bad :slight_smile:

dirt (or rust) can be simulating with bake occlusion map and use texture or stencil etc. with this we can make dirt or rust in the concave parts of the model

Are you talking about a texturing method, where you get a new map type: edges, that applies a texture based on proximity to edges over a certain degree type; or are you talking about an erode tool that actually changes the mesh?

I describe the method… with my bad english. :slight_smile: No need new map type, this this easily make with script I think.

The method of the scipt:

  1. search the sharp edges
  2. draws pixels (or some procedural “spots”) on the image that are UVed on the modell

I think we need a button that change the search of the sharp edges by concave (rust) and convex (abrasion).

We no need to erode the mesh here.

would just a map for color and a map for abbrasion with a blend map do it?

a vray dirt shader that work as my idea (it uses occlusion map)

a dirt shader that works with the angle of the edge

hmmmm a VERY good example of my idea for dirt-rust shader:

Maybe some dirtier stuff can be pre-baked with ao render like this:

samples: low (depends how dirty you want)
dist: low (e.g. 0.4 … 0.5 depends on scene size)
use distances: on
distF: 10
energy: 1.5
bias: 0.3 … 0.5 (not default 0.05)
use ‘sub’ or ‘both’

then, make the 2nd AO render, with more ‘normal’ settings.


I came to above settings while I was setting up a toon scene and I couldn’t get usable shadows on edges otherwise - plus AO set this way is a couple times faster than ‘by the book’ settings.

I will post the images here:
because here I cant attach files

OH! I have a good idea! We need only one thing: drawing the angle of the edge on the UVed imaga AS GRAYSCALE INTENSITY. After this, we can make what we want to do in Gimp or Photoshop. Sharp edges will make bright lines etc…
Hm… or another idea: copying the angle value TO VERTEX COLOR. After this, we can bake the vertex colors into the UVed image.

so the script:
ob=selected object
ed=edges of ob
for 0 to number of edges
angle=edge angle
vertex color of angle=grayscale of (angle)

:slight_smile: okay, I can not code in python :slight_smile:

I think this kind of edge image would be better exported into a separate image file. It seems to me that it would be more useful as the basis for a mask for other images (dirt, rust, etc.) than something you’d bake directly into an already uv-mapped image.

of course
I do this on the example images

a good link, downloads>Curvature



so that woman statue is the best example of my idea! I think this will very useful in Blender! And very easy to make this script I think.

dust, rust, using grey scale images from photosho and gimp, Does this mean that there will be a possibility for adding realistic scratches aswell or is this impossible for this kind of script?

No need, we need only to sign the angle of the edges. after this, we can make scratches or everythink in gimp from this mask. I think no need more words, the linked woman statue screenshots (and the link to the Maya shader) tells everything.

In new blender release 2.42 you can find scrip which is making AO on vertex colors. It’s fast and you have to do this only once per mesh. Then just use VCol Light.