EdgeFinder

52 votes
Version: 
1.3
Date Updated: 
05/31/2011

Example

I wrote a script that finds the edges of a mesh and creates an edge map and/or creates roughed up edges on the mesh. Just pick a mesh and choose your settings and the script will render out a map for you. The script tessellates the the mesh and colors the vertices black where ever it finds corners, so you can choose if you want the high poly mesh or just bake a edge map to use on the low poly mesh.

Updated!
I did some optimizing and it really paid of. It's much faster now.

Here are some test results with standard settings on:
--Very high mesh complexity--------
NEW EF: 43.786s.
OLD EF: 865.042s.

--Medium mesh complexity--------
NEW EF: 2.484s.
OLD EF: 7.687s.

--Low mesh complexity--------
NEW EF: 1.349s.
OLD EF: 2.852s.

Image of the high complexity mesh I tested it on:

Additional Info: 

GUI

The main settings are the minimum and the maximum angle that decides the threshold for finding an angle to colorize. The tessellations settings decides how detailed the high poly mesh and the edge map will be. Higher values give more cleaner results, but give more heavier meshes and if used with the jagged edges-setting the execution time will be much higher, more on that soon. The edge size-setting controls how large the edges will be on the map and how broad the jagged edges are. See the comparison between tessellations and edge size below:
settingsCollage

I came over make parallel edges script on scriptspot and it is great for isolating the edges. To use this just check on the optimize edges button. This gives a lot more control over the edge size controller. It also gives tighter edges, so you don't have to use a high tessellation count to get a smoother edge map. Comparison here:
optimizeCollage

The high poly mesh after running the script on a standard box with 3 tessellations and edge size 1. Optimized to the left, regular to the right:
optimizedvsregular

The next important setting is the jagged edges-setting. It will create randomized mesh where the edges are. The effect is bumpy-looking edges. Using this on dense meshes with a high tessellation count is not recommended since this method is kind of slow! It creates the same effect as doing this. Jagged edges comparison:

collageJagged

If you want automatically jagged edges but don't need a high poly version of the mesh to do it for you, choose the mix with noise-setting that will blend the edge map with a noise map and put it in the material editor for you. The image on top was generated using this method with some standard mental ray shaders and lightning. For this to work you have to bake the edge map. Select your preferred image size and choose a save path.

A picture of high poly meshes generated from the script and a picture showing different edge maps:
jaggedCollage
noiseVsNoiseless

The object needs to be unwrapped (a simple flatten mapping will do) before using the script if you are baking a map.

I've added falloff to the edges, and a custom falloff editor. It's pretty self explanatory on how to use it. 0 = Black, 1 = White.

Still testing this, would love some feedback!
Download.

Version Requirement: 
Written/tested in 2011. Should work in older versions as well
Video URL: 

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
luxxeon's picture
obaida's picture

Download

here it is .

AttachmentSize
edgefinder.ms 13.15 KB
luxxeon's picture

I used to have this script,

I used to have this script, but lost it when switching to a new workstation. Anyone know where to download this useful script, or something similar? The direct links are broken now unfortunately.

haavards's picture

Hola

LORDOFMAX: I use cocktail greeble, http://folk.ntnu.no/havardsc/site/wordpress/?page_id=27

JokerMartini: What do you mean by creating a map? In the script you can choose if you want it as a baked out map and/or directly on a material.

LORDOFMAX's picture

what that script you use for

what that script you use for creating the greeble..

JokerMartini's picture

QuickDirt

Yeah I was a big fan of the quick dirt but unfortunately is has not been updated in a long long time. It no longer works with the newest version of 3ds max.

John Martini
Digital Artist
http://www.JokerMartini.com (new site)

rs3d's picture

Quickdirt can do something

Quickdirt can do something similar, but it's been very silent around that plugin... http://cuneytozdas.com/software/3dsmax/#QuickDirt

JokerMartini's picture

Cool.

Very cool script. It would be cool to possibly turn this into a Map so people could just put it directly into shaders similar to vrays dirt Map.

At the same time it would allow users to quickly adjust and render there scenes rather than updating the texture maps.

Great work.

John Martini
Digital Artist
http://www.JokerMartini.com (new site)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.