Date post: | 23-Dec-2015 |
Category: |
Documents |
Upload: | aubrey-nicholson |
View: | 224 times |
Download: | 4 times |
S. Havemann, GML 1Computer Graphics, TU Braunschweig
Generative Mesh Modeling
Sven Havemann Dieter W. Fellner
Institut für ComputerGraphik
TU Braunschweig, Germany
S. Havemann, GML 2Computer Graphics, TU Braunschweig
The “State of the Art”
S. Havemann, GML 3Computer Graphics, TU Braunschweig
A Provocative Statement Great achievements in Computer Graphics…
Appearance: From Solid Textures to Pixel Shaders Shape Processing: Simplification to Wavelets Global Illumination
… but now let’s turn our attention to the people at the end of the food chain: Those who are doing the actual 3D modeling
Without models, there’s nothing to display! Hypothesis:
Lack of easily available 3D model creation facilities greatest obstacle to spread of 3D technology today
S. Havemann, GML 5Computer Graphics, TU Braunschweig
Modeling Problem: “Learn Maya” People (in industry) want to sell goods and services –
not have their own modeling department Roof tiles: ~75 kEuro modeling costs (personal
communication)
… and what do you do with those models? Creation of 3D models should require the same level
of expertise as creation of spreadsheets! Integration into 3rd party applications
Modeling engine as plugin or dll
S. Havemann, GML 6Computer Graphics, TU Braunschweig
Issues with Simplification Increasing need for LOD: More triangles than pixels But
Simplification breaks the modeling history (preprocessing)
Simplification breaks symmetry Highest resolution is limited by input resolution
S. Havemann, GML 7Computer Graphics, TU Braunschweig
Problems with Current TechnologyA. The Modeling Bottleneck
• limited changeability and re-usability of objects• 3D modeling is to large extent a manual task
B. Model File Sizes• Simplification breaks modeling history• Highest resolution limited by input resolution
C. Digital Libraries of 3D Objects• Design variations• Problems: Consistency, versioning, shape matching
D. Virtual Worlds are too static• Basically change only transformation matrices (…)• Careful look at state of the art in computer games!
S. Havemann, GML 8Computer Graphics, TU Braunschweig
3D Modeling – An Abstract View 3D modeling is an incremental process
Interactive application of functions/tools on a shape in order to obtain another
All 3D modeling is procedural modeling! Selection of the next operation is not arbitrary,
but based on a plan in the artist’s mind Often next step depends on outcome of previous step
3D modeling is what other people call programming! Striking similarity: Conditional decisions, loops, etc. Today's artists are in fact programming a shape,
probably without noticing that, and with not much support for it from their system
S. Havemann, GML 9Computer Graphics, TU Braunschweig
3D Modeling – Abstract SolutionA. Computers are fast (500M mul/s) – and they get faster B. 3D Modelers already provide interactive toolsC. Description of modeling process more compact than
description of modeling result
Consequence:Generate geometric primitives only on demand
Look for a different shape representation “smallest common denominator” for the
description of procedural shapes It must be a full programming language! Problem: Artists shall not do literal programming
S. Havemann, GML 10Computer Graphics, TU Braunschweig
Generative Mesh Modeling
Our proposal for a solution that might alleviate some of these problems
S. Havemann, GML 11Computer Graphics, TU Braunschweig
The shape description problem Shape acquisition vs. interactive modeling
Highly regular shapes with slight variations Shapes with self-occlusion
Fundamental question:“What is the right way to describe the construction of a shape or a shape class?”
Different aspects: What are the “essential” degrees of freedom
of a given shape construction? What low-level shape representation? What operations on this representation? How can shape construction be formalized?
S. Havemann, GML 12Computer Graphics, TU Braunschweig
Our Approach: Modeling Engine Low-level shape representation:
Polygonal solids + freeform surfaces Hybrid hierarchical architecture
Catmull/Clark surfaces
BRep meshes
Euler operators
GML
S. Havemann, GML 13Computer Graphics, TU Braunschweig
Bottom Layer: Catmull/Clark After first tesselation: only quads
1 patch per quad Face degree n n patches Quad 3 times subdivided: 9 9 vertices/patch Only 2 possibly irregular points per patch
Adaptive refinement: pre-computed triangle strips
[ Havemann, Visual Computer 2002 ]
S. Havemann, GML 14Computer Graphics, TU Braunschweig
Irregular Vertices: Vertex & Face Rings
Tesselation hierarchy: 22, 33, 55, 99 Down-sampling for free 75400 Patches = 7.4 M / sec on P4 1700 MHz
Tesselation on the fly
S. Havemann, GML 15Computer Graphics, TU Braunschweig
Second Layer: Combined BReps
Unified data structure for shapes with both
polygonal and free-form parts
S. Havemann, GML 16Computer Graphics, TU Braunschweig
red: sharp edgegreen: smooth edge
1. Vertex classification No. of incident sharp edges
< 2 smooth or dart = 2 crease > 2 corner
2. Face classification smooth edge? smooth Only corners? polygonal Otherwise: sharp
Edge Sharpness
S. Havemann, GML 17Computer Graphics, TU Braunschweig
Sharp Faces & Rings Sharp face: BSpline border curve Rings: Trimming of polygonal or sharp faces
S. Havemann, GML 18Computer Graphics, TU Braunschweig
Combined BReps - Performance View-cone culling:
sphere/cone intersection Backface culling:
normal cone per face
Animation on P4 1700 MHz /Geforce 4
16K vertices59K halfedges13K faces54K patches 7M triangles
S. Havemann, GML 19Computer Graphics, TU Braunschweig
Third Layer: Euler Operators and
Progressive Combined BReps
Mesh manipulationwith incrementaltesselation update
S. Havemann, GML 20Computer Graphics, TU Braunschweig
Euler operators Mesh access exclusively
through halfedges Halfedges always come
in pairs (no border) Topologic consistency vs.
Geometric consistency
i. Each Euler operator maintains topologic consistency
ii. Every 2-manifold mesh of any genus can be built
Closed and sufficient set of mesh construction operators
S. Havemann, GML 21Computer Graphics, TU Braunschweig
1. Make vertex edge face shell
Shell: connected component Creates degree 2 face (2 vertices, 2 halfedges)
No face normal – but topologically correct
V-E+F = 2(S-H)+R 2-1+1 = 2(1- 0)+0
Extended Euler-Poincaré:
S. Havemann, GML 22Computer Graphics, TU Braunschweig
2a. Make edge vertex
Creates dangling vertex Good for conversion polygon face
V-E+F = 2(S-H)+R 1-1+0 = 2(0- 0)+0
S. Havemann, GML 23Computer Graphics, TU Braunschweig
2b. Make edge vertex
makeEV: e0,e1 incident to same vertex Also known as vertex split
V-E+F = 2(S-H)+R 1-1+0 = 2(0- 0)+0
S. Havemann, GML 24Computer Graphics, TU Braunschweig
3. Make edge face
makeEF: e0,e1 must be incident to same face Order determines orientation
V-E+F = 2(S-H)+R 0-1+1 = 2(0- 0)+0
S. Havemann, GML 25Computer Graphics, TU Braunschweig
4. Make edge kill ring
Rings: trim polygons in face interior Rings are cw oriented
V-E+F = 2(S-H)+R0 -1+0 = 2(0- 0)-1
S. Havemann, GML 26Computer Graphics, TU Braunschweig
V-E+F = 2(S-H)+R0 -0+1 = 2(0+1) -1
5. Make face kill ring hole(or make face shell kill ring)
V-E+F = 2(S-H)+R0 -0+1 = 2(1- 0) -1
Ring Backside of two-sided quad
S. Havemann, GML 27Computer Graphics, TU Braunschweig
6./7. Geometric operators
Both are self inverse Don’t affect topology
moveV change vertex positionsharpE change edge sharpness
S. Havemann, GML 28Computer Graphics, TU Braunschweig
Log each Euler operator operator sequence Like split sequence from progressive triangle mesh But may also contain destructive operators!
Dependencies between operators: DAG But: Inconsistent intermediate meshes Euler macros: grouping of sub-sequences Dependency DAG on Euler macro level Useful for selective undo/redo, Useful for macro culling using active tree
[ Luebke/Eriksson, Siggraph 97 ]
Euler Macros
S. Havemann, GML 29Computer Graphics, TU Braunschweig
Log each Euler operator operator sequence Like split sequence from progressive triangle mesh May also contain destructive operators
Edge collapse: killEF, killEF, killEV, moveV
Euler Macros
S. Havemann, GML 30Computer Graphics, TU Braunschweig
C++ API: obvious & simpleEdge* makeVEFS (const Vec3f& p0, const Vec3f& p1, bool sharp);bool killVEFS (Edge* e);Edge* makeEV (Edge* e0, Edge* e1, bool sharp, const Vec3f& p);bool killEV (Edge* e);Edge* makeEF (Edge* e0, Edge* e1, bool sharp);bool killEF (Edge* e);Edge* makeEkillR (Edge* eRing, Edge* eFace, bool sh);Edge* killEmakeR (Edge* e);bool makeFkillRH (Edge* eRing);bool killFmakeRH (Edge* eRing, Edge* eBase);bool moveV (Edge* e, const Vec3f& pNew);bool sharpE (Edge* e, bool sharp);
bool moveR (Edge* eRing, Edge* eDest);bool materialF (Edge* e, int matid);
S. Havemann, GML 31Computer Graphics, TU Braunschweig
Top Layer: The GML
Proposal for a “smallest common denominator”
for the description of procedural shapes
S. Havemann, GML 32Computer Graphics, TU Braunschweig
Tokens are pushed on a stack (old pocket calculator)
Operators pop items from the stack, process them, and push the result
Programs are just arrays of tokens Program execution is execution of each token
Stack Based Language: Principle
2 3 add 4 mul2 3 add 4 mul 22 3 add 4 mul 32
2 3 add 4 mul 52 3 add 4 mul 45
2 3 add 4 mul 20
Program
Stack
S. Havemann, GML 33Computer Graphics, TU Braunschweig
GUI Automation Problem with great tools: You must use them Basic idea for automatization:
Put a language behind the GUI
The dialog box turns into
Ideally, this language backend is invisible
10.00 2.80 0.25 5 2 1 createCube
Screenshot from 3DStudio Max
S. Havemann, GML 34Computer Graphics, TU Braunschweig
Automation of Dialog Boxes Different sets of parameters are possible:
Parameter sets can be computed (spreadsheet)
10.00 2.80 0.25 5 2 1 createCube
{ 10.00 2.80 0.25 5 2 1 } /wall def{ 10.00 0.10 0.10 8 1 1 } /rod def{ 1.00 1.00 1.00 2 2 2 } /unitcube defwall createBoxrod createBox
{ dup dup 1 1 1 } /cube def4.82 cube createBox
New menu items
S. Havemann, GML 35Computer Graphics, TU Braunschweig
All Functionality from Operators Example:
Stable extrude, avoiding self-intersections
S. Havemann, GML 36Computer Graphics, TU Braunschweig
All Functionality from Operators Example:
Stable extrude, avoiding self-intersections
S. Havemann, GML 37Computer Graphics, TU Braunschweig
C++ API for GML operatorsclass GMLOpCross : public GMLOp{public: GMLOpPrelude(Cross,cross) GMLOpComment(" u:P3 v:P3 -> w:P3 %n returns the cross product of u and v, so w is perpendicular to both u and v.")
virtual bool apply (GMLInterpreter& inter) { Var* v1 = inter.pop_stack(); Var* v0 = inter.pop_stack_leave(); if(inter.error() || !v0isP3() || !v1isP3()) { return inter.setError(GMLInterpreter::TypeError); } v0->set( v0asP3().cross(v1asP3()) ); inter.commit_pop(); return true; }};
wrapped library function
S. Havemann, GML 38Computer Graphics, TU Braunschweig
Modeling Engine The GML is a library on top of OpenGL Designed as plugin modeler
– or modeling plugin Extensible etc.
S. Havemann, GML 39Computer Graphics, TU Braunschweig
Current State Four-layer architecture works reasonably stable
and with reasonable performance The core engine for modeling is available
PhD
~290 operators in 10 libraries today core, math, vector, geometry, brep, modeling, …
Tutorial just finished, first students work with it http://graphics.tu-bs.de/gml
S. Havemann, GML 40Computer Graphics, TU Braunschweig
GML: Interactive 3D Modeling Spreadsheet modeler: Code generation in background
Create new tools out of existing ones Re-use existing solutions to modeling problems Automated 3D modeling Model evaluation on the fly
Direct manipulation of a multiresolution mesh Model representation: Combined BRep Both polygonal and subdivision surface models using
smooth and sharp edges Undo/redo using Euler operations Built-in adaptive Level-of-Detail (frame to frame!)
S. Havemann, GML 41Computer Graphics, TU Braunschweig
Next steps “Spreadsheet Modeler” Experiments with input devices:
Video tracking, CAVE 3D GUI is needed for certain plugins (ActiveX) modeling tools in digital library, web access Future developer hierarchy
C++ level: create new GML operators (.dll) GML level: domain-specific modeling tools (.genmod) Spreadsheet level: Glue tools together, forming new tools Pure users (code completely hidden)
S. Havemann, GML 42Computer Graphics, TU Braunschweig
Summary & Discussion GML code generation in background
Think of Postscript printer driver Modeling: Create new tools out of existing ones,
re-use existing solutions to modeling problems Style libraries: GML is a functional language! Automated 3D modeling Semantic level of detail
Store tools used, not model created More space efficient
Model evaluation on the fly
S. Havemann, GML 43Computer Graphics, TU Braunschweig
Summary Procedural Modeling uses high-level tools for
(interactive) model manipulation Idea: Store tools used, not model created
More space efficient Computers are fast: Evaluate model description
only on demand – at viewer runtime! GML as low-level description format for all
kinds of procedural models – really?
S. Havemann, GML 44Computer Graphics, TU Braunschweig
More fundamental issues
Different ways to think about shape?
S. Havemann, GML 45Computer Graphics, TU Braunschweig
Theoretical Aspects: Shape Complexity Kolmogorov complexity:
“Given a bit sequence and a computer model, what is the size of the smallest computer program to produce that sequence?”
Depends on the set of available basic operations Intrinsic Shape Parameters:
Explicitly depend on other parameters, are computed Extrinsic Shape Parameters: Degrees of freedom Conversion: In both directions?
We propose as shape complexity measure: The number of GML tokens for a shape / shape class
S. Havemann, GML 46Computer Graphics, TU Braunschweig
Quest for the “Nature of Shape” Investigate existing real-world construction systems
to determine their modeling vocabulary: Lego Fischer-Technik Metal construction kits (z.B. Märklin) Ikea Architecture, Mechanical Engineering…
Which are the domain dependent modeling operations? Is it possible to find underlying set of general shape
construction operations? Now formally in GML terms:
“Find minimal but sufficient set of builtin operators”