mmToonLines documentation
(c)2002 Matthias Melcher for MatthiasM.com
mmToonLines is a Render Node for Maya 4.0 that creates cartoon
style outlines for mesh objects in a Maya scene.
mmToonLines renders Outlines, Folds, Wrinkles and intersections:
- Outlines are defined as the edge between the surface of a mesh
and the background as seen by the camera.
- Folds are "local" outlines. A fold appears when a surface becomes
invisible to the eye, then visible again.
- a Wrinkle is an edge that becomes visible because the surface
changes rapidly from one angle to another
- an intersection is the line where object of different color
touch another in the 2d image plane
Installation
Unpack the mmToonLines archive onto your desktop using some unzipper like
WinZip. Move mmToonLines.mll into you Maya plugin folder (by default, this
is c:\AW\Maya4.0\bin\plug-ins) and render_mmToonLines into your icon folder
(c:\AW\Maya4.0\icons).
To load mmToonLines from within Maya, go into the main menu:
[window->settings/preferences->plug-in manager...],
click on
[Browse]
and find the file mmToonLines.mll .
Usage
To add mmToonLines to a scene, open the Hypergraph dialog:
[Window->Hypergraph...]
and create a render node:
[Rendering->Create Render Node...]
In the Utilities tab, click on Mm Toon Lines in the General Utilities section.
To render outlines, z-buffering MUST be enabled.
Check: [Window->Rendering Editors->Render Globals...->Depth Channel]
Scene Parameters
To change global mmToonLine parameters, open the Attribute Editor for Toon
Lines. The Attributes are:
- mmDefLineWidth (dlw,float): the default line width for
meshes that don't have a defined line width. If this is zero, only meshes
with the Mm Line Width argument will be outlined.
- mmSectLineWidth (slw, float): the default line width
for intersections is 0. To draw intersecting lines, mmSectLineWidth must be
set greater than 0. MmToon will draw lines wherever the rgba value of the
image changes by more than 5 units per component. Best effect is accomplished
with the Incandescence set to differen color for intersection objects, and
all other color attributes set to black. The resulting image will be white
with touching lines in mmDefLineColor.
- mmRelLineWidth (rlw,float): the relative line width.
All lines widths will be multiplied by this value. They will also be multiplied
by the length of the render image diagonal.
- mmDefLineColor (ic(r,g,b),color): the default line color
for all meshes in the scene.
Object Parameters
To change parameters for individual meshes, open the Attribute Editor for
that particular object and add one or more of the following optional attributes:
- mmToonLineWidth (float): the individual line width that
will override mmDefLineWidth
- mmToonFoldWidth (float): width of outlines that are
seen as folds, without this attribute, folds will be the same width as outlines.
Setting this to something other than 'outline width' can slow mmToonLines
down somewhat.
(default: LineWidth )
- mmToonColor (float vector): override mmDefLineColor.
Either create a vector of floats named mmToonColor which in turn creates mmToonColorX,
mmToonColorY and mmToonColorZ, or create the corresponding mmToonColorR,
mmToonColorG and mmToonColorB.
- mmToonCamAng (float): set the angle between the camera
and the surface normal that must be crossed to draw an outside line.
Default is 90 deg.
- mmToonCamMin (float): exclude edges which are in a very
flat angle toward the camera.
(default: 90 = show all, typical values are in range of 89.5
to 89.99)
- mmToonMinWrinkle (float): minimum angle between two
triangles to for a wrinkle.
(default: 180 - no wrinkles, but 60 is a very useful value!)
- mmToonWrinkleWidth (float): line width for wrinkles
(default: copy from FoldWidth )
- mmToonSelfWidth (float): line width for self-intersection
of mesh objects. Caution! Intersections are expensive to calculate and calculation
time EXPLODES with the number of triangles in your mesh!
(default: 0)
- mmToonZTolerance (float): change the z-buffer tolerance
for drawing outlines.
(default: 0.00001, a value of 1 will draw all lines ignoring
the z-buffer)
Considerations
- toon lines are not rendered into the z-buffer. This might have
an effect on later compositing.
- AA for very wide and very narrow lines is not perfect. If those
lines are used in a scene, it is recomended to double render resolution
and scale the image down in post.
Planned Features
- mmToonLineSloppy: lines can extend over the objects boundaries
- ToonLines support for collorbuffers deeper than 24 bit
|