CS 572 Project from Spring 2010 at Cal Poly. A Painterly Renderer for implicit functions.
Painterly Rendering is a
form of Non-Photorealistic used to render 3D
objects as if an artist was 'painting' them. My implementation is
baised off of a paper by Barbara J. Meier, "Painterly Rendering for
Animation". When using painterly rendering (or most forms of
NPR), you must use a certain amount of randomness to give the pictures
a 'hand-drawn' look. This can cause problems with animation, as
random changes from screen to screen stand out. Meier's process
added the randomness into the underlying model and used the same seed
for each frame render. A set of particles are randomly
generated and used as locations for brush strokes, and those particles
contain the information necessary to render, including the 'randomness'. Meiers Algorithm: create particles to represent geometry for each frame of animation create reference pictures using geometry, surface attributes, and lighting transform particles based on animation parameters sort particles by distance from viewpoint for each particle, starting with furthest from viewpoint transform particle to screen space determine brush stroke attributes from reference pictures or particles and randomly perturb them based on user-selected parameters composite brush stroke into paint buffer end (for each particle) end (for each frame) |
Images from the Meier's paper
|
Name |
Aliases |
Usage |
Default |
Description |
Add Object | "AddObject", "addobject", "addObject", "add", "Add" | AddObject name ImplicitFunction AddObject ImplicitFunction |
- |
Adds an object as described by the function. objects automaticly use a marching cubes algorithm (128 sided grid). |
Delete Object | "DeleteObject", "deleteObject", "deleteobject", "delete", "Delete" | DeleteObject name |
- |
Deletes the given object from the screen |
Move | "Move", "move" | Move name x y z |
- |
Moves name to be centered at x y z |
List Objects | "ListObject", "listObject", "listobject", "list", "List" | List |
- |
Lists objects in the scene |
Move Camera | "MoveCamera", "moveCamera", "movecamera", "movec" | MoveCamera x y z |
- |
Moves the camera to x y z |
Move Camera Target | "MoveCameraTarget", "moveCameraTarget", "movecameratarget", "movet" | MoveCameraTarget x y z |
- |
Moves the camera target (where the camera is facing) to x y z |
Move Relative | "RMoveCameraTonight", "rmoveCameraTarget", "rmovecameratarget", "rmove" | rmove name x y z |
- |
Moves an object realtiviely (oldPoints += newPoint) |
Move Camera Target Relative | "rMoveCameraTarget", "rmoveCameraTarget", "rmovecameratarget", "rmovet" | rmovet x y z |
- |
Camera target Relative |
Set Color | "color", "setColor", "setcolor", "SetColor", "Color" | Color num num num |
- |
Set color (0 <= num <= 1) |
ShowGL | "showgl", "showGL", "gl" "GL" | ShowGL |
F |
Displays OpenGL Render output |
Show Paint | "showPaint", "showpaint" "Paint", "paint" | ShowPaint |
T |
Displays Paint |
Show Points | "showPoints", "showpoints", "points", "Points" | ShowPoints |
F |
Displays Points |
Points Per Cube | "PointsPerCube", "pointsPerCube", "PPC", "ppc", "pointspercube" | PPC num |
1 |
Changes how many particles are generated per cube <0 |
Orientation | "Orientation", "orientation", "o" | Orientation num num |
1 0 |
Changes what direction brush strokes are drawn in abs(x) + abs(y) must equal 1. further, 0 <= x <= 1 |
Per Stroke | "PerStroke", "perStroke", "perstroke", "ps" | PerStroke num |
3 |
Changes how many brush images per stroke <0 |