Bubbly
Bubbly. David Doty and Mark Fielbig. What is Bubbly?. Bubbly is an interface proposed for creating 3D models out of 2D strokes. Bubbly uses only OpenGL, GLUT, and the C++ STL. We were inspired by Teddy a 1999 paper in the ACM SIGGRAPH by Igarashi, Matsuoka, and Tanaka.
Bubbly
E N D
Presentation Transcript
Bubbly David Doty and Mark Fielbig Stony Brook University
What is Bubbly? • Bubbly is an interface proposed for creating 3D models out of 2D strokes. • Bubbly uses only OpenGL, GLUT, and the C++ STL. • We were inspired by Teddy a 1999 paper in the ACM SIGGRAPH by Igarashi, Matsuoka, and Tanaka. Stony Brook University
What Can Bubbly Do? • Bubbly supports five operations: • Model Initialization • Model Cutting • Model Addition • Camera Rotation • Camera Zooming • The desired model is “sculpted” by the user through the combination of these operations. Stony Brook University
Interaction With Bubbly • The user is initially presented with a 2D triangle grid to draw on. The user clicks and drags the mouse in order to draw the silhouette of the desired model. • The user then right clicks inside of the silhouette to transform the 2D input stroke to a 3D model. This is what we call inflation. Stony Brook University
Interaction With Bubbly • After the user is presented with the 3D model Bubbly’s camera operations become available. • Rotation around the model’s bounding volume can be achieved by left clicking and dragging. The model will rotate in the direction the mouse is dragged. • The camera can be zoomed in and out using the mouse wheel or the up and down arrow keys. Stony Brook University
Interaction With Bubbly • In addition to camera controls the model can be manipulated with the mouse. • To cut the model the user right clicks and drags across it. • The user combines camera rotation and cutting to project the cutting stroke into the scene and dispose of the smaller portion of the model. Stony Brook University
Interaction With Bubbly • The user can return to creation mode by pressing the middle mouse button or the ‘A’ key.This will repeat the initialization process allowing addition to the model. • The user can press the ‘R’ key to return to creation mode and dispose of the existing model. Stony Brook University
Bubbly’s Algorithms • Input Stroke Creation • To create the input stroke differential line segments are inserted as the mouse is moved along the screen. • The distance formula is used to determine when a new line segment should be added. • When the user releases the mouse the input stroke is closed and then checked for self intersection. • If the stroke is accepted: • The bounding box is computed • The stroke is intersected with the grid Stony Brook University
Bubbly’s Algorithms • Silhouette Filling • At this point the bordering triangles are known but the interior triangles aren’t. • A “seed” is planted within the bordering triangles and a modified flood-fill algorithm is used to determine the interior triangles. • Inflation • The inflation process consists of three steps: • Every vertex has its east most, west most, north most, and south most “fringe vertices” calculated. • Each vertex gets a z value based on its distance away from its fringe vertices. • The second half of the model is mirrored on the opposite side by copying each point and negating its z value. Stony Brook University
Bubbly’s Algorithms • Determining Fringe Vertices • The mesh is traversed in each cardinal direction until a gap is encountered. • Elevating Vertices • Each vertex is then elevated according to a modified circle equation. Stony Brook University
Bubbly’s Algorithms • Mirroring the Model • At this point there is only half a model, the second half is created. • This Completes the Inflation Process Stony Brook University
Bubbly’s Algorithms • Camera Movement • The camera rotates along spherical coordinates. The coordinates are calculated with the following equations: • Mouse movement in the x-axis changes , the y-axis changes . • Zooming in is accomplished by decreasing the value of and zooming out is accomplished by increasing the value of . Stony Brook University
Bubbly’s Algorithms • Model Cutting • Cutting is achieved by projecting the cut stroke to the near and far plane to create an intersection plane. • For every vertex in the mesh a vector is drawn from an arbitrary point on the plane to that vertex. Call this vector . The plane normal, , is then dotted with . • The sign of the dot product tells what side of the plane that vertex lies on. • A count of triangles on each side is recorded and the side with the lower count is removed from the model mesh. Stony Brook University
Bubbly In Action! Stony Brook University