210 likes | 364 Views
An Efficient Brush Model for Physically-Based 3D Painting. Nelson S.-H. Chu Chiew-Lan Tai. Benefits Over Existing Models. Brush flattening Bristle spreading Plasticity of wetted brushes Resistance of paper surface. Block Diagram. Artists use a brush connected to several sensors to paint
E N D
An Efficient Brush Model for Physically-Based 3D Painting Nelson S.-H. Chu Chiew-Lan Tai
Benefits Over Existing Models • Brush flattening • Bristle spreading • Plasticity of wetted brushes • Resistance of paper surface
Block Diagram • Artists use a brush connected to several sensors to paint • The movements of the brush are interpreted by the brush, ink, and paper models • The brush and strokes are the rendered on the screen
User Interface • Sensors attached to real brush to provide input • Ultrasound receivers and buzzer provide 6 degrees of freedom • Gyroscopes provide brush orientation information
Actual Brush • Made of animal hairs • Kernel is hard, outer layers are soft • Good brushes are elastic • Tip is less stiff than the root
Brush Skeleton • Brush is modeled by line segments • Spine nodes are made up of consecutively shorter line segments • This makes the brush more flexible at the tip • Lateral nodes are attached to each spine node • Connection points are modeled by bend springs • Lateral line segments are modeled by stretch springs • Columns of spine nodes and lateral nodes represent groups of bristles
Tuft Cross Section • Spine nodes are represented at cylindrical groups of bristles • Lateral nodes are elliptical groups of bristles • Entire tuft is modeled with ellipses at each spinal node
Brush Surface • Lateral nodes allow the simulation of bristle spreading • An alpha map is used for fine bristle splitting effects • Currently a static alpha map is used
Brush Dynamics • Exact Newtonian physics is not practical • Instead, energy minimization is used • An energy function is set up for the system and its steady state is determined by finding a local energy minimum numerically. • The state of the system at the previous time step is used as the new initial value • This is a ‘static contained minimization problem’ • Sequential Quadratic Programming (SQP) is used to solve the energy minimization problem
Energy Minimization • Initialize (θ f , φ f ) = (θ i , φ i ) • Determine if any nodes penetrate the paper • Set minimization constraints for those nodes • Solve energy minimization problem for the state of the system and update accordingly
Energy Functions • E = Edeform + Efrict • Edeform has a spine and lateral component, each of which have bend and stretch components • BendEnergy(θ)=kbend|θ|^3 • Estretch(d,θ)=kstretch|d-(r+s(θ))|^3 • d=distance from node, r=radius of node • S is a function of the bend angle • Efrict= u Sum(F*(kf|Xpar|+(1-kf)|Xperp)) • F=normal force, kf=weighting value • Xpar/perp=distance moved parallel and perpendicular
Plasticity • Brushes have different ‘plasticities’ • Type of brush • Wetness of brush • Plasticity is the amount by which the brush returns to its original shape • BendEnergy(θ)=k|θ-p|^3 where: p=min(θ’, alpha) • Alpha changes according to wetness of brush, larger alpha corresponds to more plasticity
Ink Depositing • Ink and moisture information is stored at each node • The brush footprint is the orthogonal projection of the penetrating portion of the brush onto the paper • Ink is either subtracted from the tuft upon depositing, or maintained to allow continuous painting • If the ink is subtracted the tuft alpha map is modified too reflect this
Specs • System written in Object Pascal using Borland Delphi 6 • Runs real-time at 25 frames per second on a 1GHz Pentium-III with a GeForce2 Pro graphics card • Most time frames require less then 10 SQP iterations