Hairy Brushes - Semantic Scholar

Report 3 Downloads 120 Views
Hairy
Brushes


by
Steve
Strassmann
 Computer
Graphics
and
Anima7on
Group


MIT
Media
Laboratory
 Cambridge,
Massachuse>s
 ACM
Computer
Graphics
(SIGGRAPH
'86
Proceedings),
1986,
pp.
225‐232


Abstract
 •  Paint
brushes
are
modeled
as
a
collec7on
of
 bristles
which
evolve
over
the
course
of
the
 stroke,
leaving
a
realis7c
image
 •  The
major
representa7onal
units
are

 
(1)
Brush:
a
compound
object
composed
of
bristles
 
(2)
Stroke:
a
trajectory
of
posi7on
and
pressure
 
(3)
Dip:
a
descrip7on
of
the
applica7on
of
paint
to
a
class
of
 brushes
 
(4)
Paper:
a
mapping
onto
the
display
device.


Abstract
 •  This
modular
system
allows
experimenta7on
 with
various
stochas7c
models
of
ink
flow
and
 color
change.
 •  By
selec7ng
from
a
library
of
brushes,
dips,
 and
papers,
the
stroke
can
take
on
a
wide
 variety
of
expressive
textures.


Inspira7on
 Sumi
–
e
Pain7ng


Objects
 1.  Brush
‐
Compound
object
with
bristles
 2.  Stroke
‐
Trajectory
of
posi7on
and
pressure
 3.  Dip
‐
Descrip7on
of
the
ini7al
state
of
a
class
of
 brushes
 4.  Paper
‐
a
mapping
onto
the
display
device
 
Bristles,
which
do
a
lot
of
the
work
of
the
brush,
 are
also
objects
in
their
own
right,
but
their
 descrip7on
and
defini7on
is
in7mately
connected
 with
that
of
the
brush.


Brush
 A
single
bristle
contributes
to
the
image
only
if
two
condi7ons
 hold:
it
is
applied
to
the
paper
with
sufficient
pressure,
and
it
has
 ink
remaining.
 As
the
brush
is
moved
through
the
trajectory
specified
by
the
 stroke,
two
periodic
computa7ons
are
performed:
 •
The
state
of
each
bristle
is
updated.
Upda7ng
the
bristles
 consists
of
evalua7ng
one
or
more
code
fragments
("rules")
 which
modify
the
color,
ink
quan7ty,
rela7ve
posi7on,
or
any
 other
property
for
each
bristle.
 •
An
image
computed
from
the
bristles
is
transferred
to
the
 paper.


Stroke
 A
stroke
is
a
set
of
parameters
(e.g.
posi7on
and
pressure)
which
 evolve
as
a
func7on
of
an
independent
variable.
 Authors
call
this
variable
"7me",
and
represent
it
with
the
 symbol
S.
Its
value
is
an
approxima7on
of
the
distance
along
the
 stroke.


The
Dip
 A
complex
texture
of
color
and
uneven
distribu7on
of
ink
can
be
 applied
to
the
brush.
 If
one
selects
a
par7cular
brush
and
stroke
one
can
experiment
 with
different
dips
to
achieve
exactly
the
desired
effect.


Paper
 The
paper
object
is
responsible
for
rendering
the
ink
as
it
comes
 off
the
brush.
As
each
bristle
decides
to
imprint
itself,
it
sends
a
 message
to
the
paper
indica7ng
its
posi7on
and
other
relevant
 parameters.
 The
paper
concept
is
useful
because
it
presents
an
abstrac7on
 which
allows
the
system
to
run
on
frame
buffers
of
various
 resolu7ons
and
depths.


Implementa7on
 The
stroke
is
defined
by
the
user
as
a
list
of
posi7on
and
 pressure
samples.
Both
posi7on
and
pressure
are
interpolated
 using
a
cubic
spline
to
yield
a
series
of
nodes.
The
width
of
the
 stroke
is
computed
for
each
node
by
a
func7on
of
the
pressure
 at
that
node,
and
the
region
between
two
nodes
is
covered
by
a
 quadrilateral
defined
below.


Implementa7on
 Once
the
quadrilateral
is
found,
a
generalized
polygon
 interpola7on
algorithm
is
used
to
assign
each
pixel
within
that
 polygon
 • 
Its
posi7on
in
"7me"
along
the
stroke
 • 
The
bristle
which
passes
nearest
to
it.
(to
compute
color
of
 each
pixel)
 Conven7onal
Polygon
filling
CANNOT
be
used
(pixel
dependent
 on
7me)


Details
 The
user
first
specifies
the
stroke
path.
This
is
represented
as
the
 N
nodes
(X,Y,P,S)i
for
i
=
0
.
.
.
.
.
(
N
‐
1).
The
values
X,Y,
and
P
 represent
posi7on
and
pressure.
S
is
an
approxima7on
of

the
 distance
traveled
along
the
curve,
where
S0
=
0.
 On
a
system
with
no
con7nuous
pressure‐sensi7ve
input
device,
 the
path
may
be
derived
from
a
cubic
spline
with
‘n’
control
 points.
Each
point
is
a
triple
(x,y,p)j
specifying
loca7on
and
 pressure
at
the
jth
point.


Details
 For
each
segment,
a
quadrilateral
(EFG
H)
is
constructed
which
 has
the
following
proper7es
[Figure
3]:
 • A
bisects
EH
 • B
bisects
FG
 • EH
is
the
width
computed
from
the
pressure
at
A
 • FG
is
the
width
computed
from
the
pressure
at
B
 • FG
bisects
angle
ABC


The
Annoying
case
 One
excep7onal
case
is
when
the
lines
EH
and
FG
actually
 intersect
.
This
can
happen
if
AB
is
rela7vely
short
compared
to
 the
width
EH.
Since
the
polygon
interpola7on
algorithm
used
 insists
on
ver7ces
in
clockwise
order,
one
cannot
simply
pass
on
 the
quadrilateral
EFGH.
 This
is
“Bow‐7e"
case,
and
it
is
handled
by
par77oning
the
bow
 7e
into
two
triangles,
and
rendering
each
one
independently.


Proper7es
 Once
the
polygon's
ver7ces
are
found,
three
proper7es
 are
generated
for
each
pixel
using
2D
interpola7on
algorithm.
 1.
Its
posi7on
on
the
frame
buffer
(X,Y).
This
is
generated
 in
the
course
of
the
interpola7on.
 2.
Its
posi7on
along
the
stroke
(S).
This
is
done
by
interpola7ng
 (SA
SB,
SB,
SA)
on
polygon
EFGH.
 3.
Its
posi7on
across
the
brush
(B).
This
is
done
by
interpola7ng
 (1,
1,
0,
0)
on
polygon
EFGH.


An7‐aliasing
 Although
the
stroke
is
broken
into
polygons,
one
cannot
merely
 an7‐alias
the
polygon
edges,
since
the
brush
could
theore7cally
 change
anywhere,
at
any
7me;
i.e.
every
pixel
could
be
an
edge.
 So,
an7‐aliasing
is
done
by
super
sampling.
The
brush
draws
on
a
 patch
of
virtual
paper
at
a
higher
resolu7on
than
the
frame
 buffer.
 This
is
then
sampled
and
copied
back
to
the
frame.


Efficiency
 The
computa7onal
7me
consumed
by
the
algorithm
can
be
 separated
into
two
parts:
 • 
The
serial
part
‐
This
is
the
computa7on
of
the
stroke
geometry,
 e.g.
computa7on
of
the
polygon
ver7ces
and
edges.
 • 
The
parallel
part
‐
This
can
be
broken
into
two
parts:
 ‐
Each
bristle
executes
the
evolu7on
rules
to
determine
its
next
 state.
 ‐ Each
pixel
consults
the
brush
to
determine
what
color
it
should
 become.
 Computa1on
takes
insignificant
amount
of
1me
compared
to
 the
rendering.


Effects
 Ink
Quan1ty
 • The
quan7ty
is
decreased
as
the
brush
moves
through
the
 stroke,
and
eventually
the
bristle
runs
out.
 • If
the
stroke
is
known
at
the
7me
of
the
act
of
dipping,
its
length
 is
used
to
help
determine
the
quan7ty
of
ink
deposited
on
the
 bristles.
There
are
parameters
which
control
how
many
bristles
 get
short‐changed,
and
by
how
much,
either
as
a
frac7on
of
the
 total
stroke
length
or
in
units
of
absolute
distance.


Different
quan77es:
(A)
50%
of
the
bristles
are
approx.
33%
 dry.
(B)
75%
of
the
bristles
are
approx.
50%
dry.


Effects
 Ink
Color
 • Each
bristle
has
a
color

 • It
is
assumed
that
all
the
ink
on
a
given
bristle
is
of
the
same
 color;
however,
neighboring
bristles
may
be
of
different
colors.
 • The
distribu7on
of
color
across
the
brush
may
be
specified
as
 constant,
or
a
linear
ramp
from
one
value
to
another,
or
as
an
 explicit
list
of
arbitrary
values


Different
colors:
(A)
Constant
(B)
Linear

 (C)
User‐specified


Effects
 Ink
Color
(Some
more
User
Defined
effects)


Evolu7on
of
Quan7ty
and
Color
 • Neighboring
bristles
some7mes
transfers
ink
among
them;
this
 affects
both
t
h
e
quan7ty
and
color
of
the
bristles
concerned.
It
 is
assumed
that
all
the
ink
on
a
given
bristle
is
of
the
same
color;
 however,
neighboring
bristles
may
be
of
different
colors.
 • As
the
brush
moves
across
the
page
a
bit
at
a
7me,
all
bristles
 repeatedly
execute
the
same
rule,
which
can
refer
to
the
 parameters
of
each
bristle
and
its
immediate
neighbors.
(and
 also
be
able
to
modify
to
values)


Effects
 Pressure
 • The
pressure
on
a
par7cular
bristle
is
a
func7on
of
the
 geometry
of
the
brush
and
the
overall
pressure
on
the
brush
at
 a
certain
point
in
the
stroke.

 2
Different
effects
of
Pressure
are
 
1.
Spreading
–
More
pressure,
More
spread
 
2.
Contact
–
More
pressure,
More
bristles
contact
paper


Two
interpreta7ons
of
pressure:
(A)
More
pressure
 spreads
bristles
(B)
More
pressure
brings
more
bristles
into
 contact
(C)
A
combina7on
of
these
two
effects


Effects
 Texture
Mapping
 • Some
interes7ng
effects
can
be
realized
by
mapping
a
texture
 onto
the
image
of
the
stroke


Texture
mapping:
(A)
Textured
paper
(B)
Textured
by
smiley‐ face
paper
(C)
Texture
mapping
with
spreading
bristles

 (D)
Texture
mapping
with
pressure‐threshold
bristles


Thank
you
 Any
Ques1ons
??!??!