Sci c i ChinaSer.F InformationSciences 2005Vo1.48 No.3285— 303 Virtual hairybrush fordigital painting and calligraphy xu Songhua 2 LauFrancisC.M.。 . XU Congfu & PAN Yunhe 285 1.StateKey Labof CAD&CG.ZhejiangUniversity,Hangzhou 31 0027,China; 2.Computer Science Department,Yale University,New Haven,CT 06511,USA; 3.Depar tm entofCom puterScience,The University ofHong Kong,Pokfulam Road,Hong Kong,China CorrespondenceshouldbeaddressedtoXuSonghua(email:songhua.xu@yale.edu) ReceivedAugust3,2003;received Novem ber1 9,2004 Abstract The design of user friendly and expressive virtuaIbrush systems for interactivedigital painting and calligraphy has attracted a Iotof attention and efort in both com putergraphics and hum an-com puterinteraction circles fora Iong time.Providing a digitalenvironm entforpaper-less ar twork creation is notonly challenging in term s of algorithmicdesign,but alsopromisingfor itspotential market values.Thispaper proposes a novelalgorithmic framework forinteractive digital painting and calligraphy based a noveI virtuaI hairy brush m odeI.The algorithm s in the kerneI ofoursim ulationframework are built upon solid modeling techniques.Implementing the algorithms,we have developed a virtuaIhairy brush prototype system with which end users can interactively producehigh-qualitydigital paintingsandcalligraphicartwork.(Thelatest progressof our virtuaI brushproject isrepor tedat thewebsite“http://www.cs.hku.hk/^,songhua/e-brush/'’.1 Keywords:virtualhairy brush,digitalpaintingand calligraphy,sim ulation algorithm ,solid modeling,non- phOtOreaIisticrendering. DOI:10.1360/03yf0389 The aItofChinese calligraphy and painting hasevolved incessa n tly overthe long history of Chineseculture.It isabeautifu1 f lower inthegardenof traditional oriental art form s【IJ_Sincetheemergenceof modem computers,todesigna n ddevelopa n interactive a n d userfriendly digitalpainting environmenthasbeen the 1ong cherished dream f or ma n y resea rchersin computergraphicsa n d human.computerinteraction ⋯ W ith the ever-increasing com puting poweroftoday’sha rdwa re,resea rchersca n now m ake the d r eam a reality.This paper proposes a novelsolid modelbased virtualhairy brush system f or interactive digitalpainting a n d calligraphy 一引 . Exper imentresults show t hat enduserscan produceexpressiveelectronicpaintinga n dcalligraphicartwork using our system that runsonver y m odest ha rdwa re.Incomparisonwith otherexistingvirtual br u sh systems ⋯ , oursystem isbetterinter m sofnaturalnessofusercont ro1.system responsetim eandexpressiveness f o r paintingandcallig r aphy. CopyrightbyScienceinChinaPress2005 维普资讯 http://www.cqvip.com
19
Embed
Virtual hairy brush for digital painting and calligraphy hairy brush for... · Virtual hairy brush for digital painting and calligraphy 287 Along another line,the problem of parameterizing
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Sci c i China Ser.F Information Sciences 2005 Vo1.48 No.3 285— 303
Virtual hairy brush for digital painting
and calligraphy
xu Songhua 2 Lau Francis C.M.。. XU Congfu & PAN Yunhe
through brush quality parameter optimi zation.Section 5 presents some experiment re-
sults an dpossible future work.
2 A solid model based virtual hairy brush
To model the geometry of a paintbru sh realistically,we introduce the concept of
Writing Primitive( P).With this concept,the complete geometry of a virtua1 hairy
brush head can be represented by a collection of writing primi tives.And the painting and
calligraphy effects achievable by our virtual hairy brush are essentially the cumulative
effects of the instant painting an d calligraphy effect arising from the interaction between
virtual Paper an d all the writing primi tives in the paintbrush being modeled.In this see.
tion,we will discuss the definition of writing primi tive,followed by algorithms to simu.
1ate the writing primi tives’dynamics and the ink diffusion on the fly.
2.1 Writing primitive(WP)
By our definition,a writing primi tive represents a bundle of bru sh hair threads,which
is the minima1 simulation gran ularity of our system. W e define the geometry mode1 of a
writing primitive as a NURBS surface established through the general sweeping opera.
tion in solid modeling,as shown in Fig.1.A11 the P in a virtua1 hairy brush function
independently.That is.each P dynamically adjusts its modeling parameters according to the external forces it receives and then deposits ink marks onto the virtual paper in.
Virtual hairy brush for digital painting and calligraphy 289
contro1 axis as the skeleton of a writing primitive。we also record the virtualink’s 1oca1
color and wetness in each of the control points on MCA.A11 the discrete points on M cA
form a control point sequence( ).During virtual painting and calligraphy,if the cur—
rent active point(CAP)of a writing primi tive,which is the current intersection point
between MCA and the virtual Paper plane,is not in PS,we will insert the newly gener—
ated intersection point into .The local ink color and wetness for the newly inserted
point are derived through linear interpolation on the corresponding information carried
by cAP’s two adiacent control points in PS.We also estimate McA’s historical deforma—
tion degree as the cumulative displacement of all the control points in PS with respect to
the center of the writing primi tive’s bottom control circle.
(ii Mmdle control ellipse fMCE). The main features of a mi ddle control ellipse are
its major axis and the control ellipse’s location parameter on its corresponding middle
control axis.The orientation of the major axis of MCE is used to represent the asymmet—
fie geometry of a writing primi tive after its deformation due to the friction between the
primitive and the virtual paper.It is easy to observe that if a writing primitive does not
experience an y splitting.the total number Of its hair threads is constant.Based on this
physical property.we assume that the area Qt MCE will remain constan t during the wfit—
ing primi tive’s deformation process as long as the primi tive does not split.
(iii)Tip control line(TCL). Two major modeling features of the tip control line are its length and orientation.W hen a writing primitive is at its initial free state.its tip con—
trol line is degenerated into a point.W hen the geometry of the writing primitive gets
deform ed due to external forces exerted on it,the tip control line would also gradually
be stretched into a real line with a certain length and orientation.Like the use of the ori—
entation inform ation of the mi ddle control ellipse,the orientation of the tip control line is
also used to represent the anisotropy of the geometry of a writing primi tive after its de—
form ation.Factors affecting the tip control line’s deform ation include the displacement
Of all the control points on the tip control 1ine,the writing primi tive’s acceleration.av—
erage wetness,the stifiness of the brush hair and the current 1ength of the tip control line.
2.3 Simulation of deformation and splitting of writing primi tives
During digital painting and calligraphy,pressing a writing primi tive against the virtual
paper wil1 deforli1 its geometry and develop an inner stress.W hen the deform ation ex—
ceeds a certain maximum toleran ce threshold,the writing primi tive will automatically
split into several sub—primi tives.Both the deforming and the spliRing of the writing
primitive are driven by the primi tive’s inner stress,which is estimated by the stiff_
ness/elasticity of the brush hair,the number of hair threads in the writing primitive,the
wetness,velocity,surface smoothness of the virtual paper and the historical deformation
of the writing primitive.We discuss the details behind the dynami cs simulation of a
writing primi tive now
(i)Estimation of the inner stress of a writing primitive. According to the studies in
materials an d fluid dynami cs,the following simplified equation for estimating the cur—
290 Science n China Ser.F Inforrnation Sciences 2005 Vo1.48 No.3 285— 303
rent inner stress developed inside a writing primitive can be used
: ×e×II vecIIx~wet~ Xvolxhi ,
where is the estimated inner stress of the writing primi tive,sm is the surface smooth—
ness factor of the virtual paper,e is an elastic factor of the brush hair,vec is the velocity
vector of a moving writing primi tive,wet is the average wetness of the writing primi—
tive,vol is the volume of the part of writing primi tive currently under the virtual paper,
and his is a factor indicating the historical deformation of the writing primi tive.Here his
is estimated according to the variations of the writing primi tive’s three variable model—
ing attributes(mi ddle contro1 axis,mi ddle contro1 ellipse and tip controI 1ine)with re—
spect to their respective initia1 states.
(ii)Deformation of a middle control axis. During digital painting and calligraphy,if
the end user presses the virtual brush against the virtual paper by a displacement of D,
aU the points on the mi ddle control axis staying above the virtua1 paper wil1 automati—
cally have a displacement of D.For those points under the virtual paper, they will go
through a displacement of D—dis,where dis is a deform ation extent determined by 74. We
introduce this step to simulate the geometric deform ation of the writing primi tive due to
the fricfion between the primi tive and the virtual paper.
A deform ed writing primi tive wil1 also get its deform ation recovered to a certain ex—
tent when the writing primi tive is 1ifted.If a user 1iris the pen by a distan ce of S. all the
previously deform ed points on the middle contro1 axis wil1 have a vertica1 displacement
of the amount,which is also determined by to recover their previous deform ation.
Such a deformation recovery process is mainly triggered due to the relief of the inner
stress of a writing primi tive when it is being lifted.
(iii)Deformation of a mi ddle control ellipse. Driven by the inner stress of the writ—
ing primitive,the major axis of the middle control ellipse will have a rotation by the an—
gle of rot.Meanwhile,the length of the major axis will also extend to be inc times its initial value:
l rot=re× ×(vec·eori), ‘
【inc=iex II vecxeoriI
Here,re and ie are the rotation and prolongation factors of the writing D订mitire respec—
tively.vec is the velocity of the writing primi tive.and eori iS the unit orientation vector
Of the mi ddle control ellipse.As discussed earlier in this paper. the total number of hair
threads inside a writing primi tive always remains constan t, assumi ng that there is no
brush splitting.Therefore during the major axis adjustment process,our system also needs to automatically update the length of the mi nor axis of the mi ddle control ellipse
to satisfy the area conservation assumption.
(iV)Deformation of a tip control line. Like the mi ddle control ellipse,given the in—
Virtual hairy brush for digital painting and calligraphy 3O1
painting software,enabling it to have real·time responses with a very high degree of re‘
alism.When characters in Kai.font,Li—font and most cases in Xing—font are to be written
using our virtual hairy brush,only one writing primitive is enough.To write in Kuang‘
cao·font,50 writing primi tives are more than enough.
(2)In our virtual hairy brush,writing primi tives represented using NURB S surface
replace the simple geometry model in the earlier brush models ’ ’。’ .W ith this enhan ced
geometry modelling capability,the interaction area between the writing primi tives and
the virtual canvas,namely the instant ink mark area,can be of any arbitrary shape rather
than having to be an ellipse as in existing approaches.Providing this sort of diversity in
the instantaneous brush mark makes our simulation more realistic,the brush mark con.
tour more natural,and the resultant paintings more expressive.
(3)Each control point on the mi ddle control axis can CalTy its own ink information.
Such a mechanism makes it possible to represent a fairly complicated ink distribution,
including the variation of ink color and wetness,using only one writing primi tive.In
addition to the merit of compact representation,simulation of ink diflusion is also bene.
fited in terms of representation capability and the effi ciency accessing the data structure
Of the representation.
(4)The process of ink deposition onto the virtual paper is controlled with probability,
which enriches many aesthetic brush painting effects.
(5)During calligraphy and painting,we additionally introduce and simulate an inertial
term as a pre‘processing step before the brush dynami cs simulation for the virtual hairy
bru sh.Th is improves the sense of naturalness when end users command our brush,a1.
1owing the virtual brush to move more fluently.
(6)Since our simulation framework is built on the parametric virtual hairy brush,an
end user no longer has to man ually specify a large number of bru sh geometry parameters
and brush trajectory parameters for the process of painting and calligraphy.Th ese labo. riOUS and tedious tasks are fulfilled automatically in our system by sam pling the six de.
grees of freedoms of the virtua1 hairy brush and running al1 the simulation algorithms
according to the sampled input.Relieving the end users of such burdens help the users
protect an d focus on their creativity during digital painting and calligraphy.
(7)Our system also has an interface to customi ze the quality of the virtual brush
through adjusting its quality parameters,either manually or automatically.
(8)Everything inside our digital painting world is parameterized,including the virtual
hairy brush model,the six degrees·of-freedom user input,and even the final brush
strokes painted.Owing to this parametric nature of representation an d simulation,it is no
longer necessary to store large quantities of bitmaps.M emory space can be saved sub.
stantially.A param etric archiving of the complete digital painting and calligraphy proc.-
302 Science in China Ser F Information Sciences 2005 Vo1.48 No.3 285— 303
ess is also possible,which can be used for many meaningful and interesting applications,
e.g.animation of paintings based on their parametric representations and high level
painting style analysis.
Future work includes developing a computer—aided education environment for on—line
painting and calligraphy tutoring based on our current system.In such an environment,
study materials are no longer confined to just the fina1 artwork in paper form created by
artists;they can also include the detailed and complete information on how the
painter/writer man ipulates his or her brush throughout the painting or writing process.
Such a functionality is impossible to achieve using a traditional physical brush.Devel—
oping an intelligent painting and calligraphy generation system is also quite intrigu—
ing_J 8,191.In the long run,integrating intelligent human—computer interaction techniques
into a digital painting system should be a challenging direction which has many practical
va1ues.
Acknowledgements We are grateful to the fellows and experts of the Chinese Association of Scientists,the
Chinese Academy of Sciences and the Chinese Academy of Engineering for their constructive suggestions and
comments on this project in the past four years.The virtual hairy brush project reported in this paper won the First Prize and the“Edison Cup”in GE Fund“Edison Cup”National Collegial Technology Innovation Contest,
administered by the International Education Committee(US),and the Outstanding Prize and“Challenge Cup”
in the 8th“Challenge Cup”Great China National Collegial Academic.Scientific and Technological Research
Project Contest.administered by the Chinese Ministry of Education and Chinese Association of Scientists
This work was supported by the National Natural Science Foundation of China fGrant No.6O4O2Ol 0)and the
National“973 Plan”fGrant No.2002CB3 l 2 l 06)
References
1. Li Zehou,Trilogy of Aesthetics,History of Aesthetics(in Chinese),Vo1.I,Hefei:Anhui Literature Press,
l999
2. Strassmann,S.,Hairy brush,in Proceedings of SIGGRAPH’86,Dallas,USA,New York:ACM Press,1986,
225— 232.
3. Hsu,S.C.,Lee,I H.H.,Drawing and animation using skeletal strokes,in Proceedings of Siggragh’94,Or—
lando,USA,New York:ACM Press.1 994.1 O9一 l l 8.
4. Schlechtweg,S.,Raab,A.,Rendering line drawings for illustrative purpose,in Abstraction in Interactive
Computational Visualization:Exploring Complex Information Space(eds.Strothotte,T.,Wagener,H ),Berlin