1/5/2014 procedural modeling motivation ipm classification...

14
1/5/2014 1 Bedrich Benes Purdue University Dec 12 th 2013 INRIA Imagine Inverse Procedural Modeling – Bedrich Benes – Dec 12 th 2013 Inverse Procedural Modeling (IPM) Motivation IPM Classification Case studies IPM of volumetric buildings IPM of stochastic trees Urban reparameterization IPM of 2D vector images Conclusions Inverse Procedural Modeling – Bedrich Benes – Dec 12 th 2013 Modeling is an open problem in CG Traditional approaches Manually Scanning (and reconstruction) of real objects By a code Inverse Procedural Modeling – Bedrich Benes – Dec 12 th 2013 System Parameters Structure Rules ݎ ,ݐൌሾ ݎsin ݎ, ݐcos ݐ

Upload: others

Post on 09-Jul-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1/5/2014 Procedural Modeling Motivation IPM Classification ...hpcg.purdue.edu/bbenes/papers/2013-12-12 IPM Inria.pdf · 1/5/2014 4 Inverse Procedural Modeling –Bedrich Benes –Dec

1/5/2014

1

Bedrich BenesPurdue UniversityDec 12th 2013INRIA ‐ Imagine

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

Inverse Procedural Modeling (IPM) MotivationIPM ClassificationCase studies

IPM of volumetric buildingsIPM of stochastic treesUrban reparameterizationIPM of 2D vector images

Conclusions

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

Modeling is an open problem in CG

Traditional approachesManuallyScanning (and reconstruction) of real objectsBy a code

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

SystemParameters Structure

Rules

, sin , cos

Page 2: 1/5/2014 Procedural Modeling Motivation IPM Classification ...hpcg.purdue.edu/bbenes/papers/2013-12-12 IPM Inria.pdf · 1/5/2014 4 Inverse Procedural Modeling –Bedrich Benes –Dec

1/5/2014

2

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

Can we find a code that generates a given structure?

SystemParameters Structure

Rules

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

Kolmogorov complexity

Minimal grammar problem

Inverse problems in mathematics

…and others

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

A) Nothing is givenFind the system, the rules, and the parameters

?? Structure

?

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

B) The system is givenFind the rules and their parameters

System? Structure

?

Page 3: 1/5/2014 Procedural Modeling Motivation IPM Classification ...hpcg.purdue.edu/bbenes/papers/2013-12-12 IPM Inria.pdf · 1/5/2014 4 Inverse Procedural Modeling –Bedrich Benes –Dec

1/5/2014

3

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

C) The system and the rules are givenFind the parameters

System? Structure

Rules

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

D) The system and the parameter are givenFind the rules

SystemParameters Structure

?

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

B) The system is givenFind the rules and their parameters

Vanegas, C.A., Aliaga, D.G., and Benes, B., Building Reconstruction using Manhattan‐World Grammars, Proceedings of IEEE Conference on Computer Vision and Pattern Recognition (CVPR) 2010

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

Automatically generate a 3D model of a Manhattan‐world building

Input:Geo‐referenced bird’s‐eye view photosBounding box of the building footprint

Output:3D model of the building represented as a grammar

Page 4: 1/5/2014 Procedural Modeling Motivation IPM Classification ...hpcg.purdue.edu/bbenes/papers/2013-12-12 IPM Inria.pdf · 1/5/2014 4 Inverse Procedural Modeling –Bedrich Benes –Dec

1/5/2014

4

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013 Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

A building consists of a sequence of floors , , … ,

The external profile of  is a 2D polygon 

Can be represented by a string of attributed letters produced by a grammar

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

Generalized Rewriting Rule (GRR)

l a

l‐a‐b

b

cc

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

Particular casesU‐shape ( 0 and  0 and  0) Corner ( 0 or  0 and  0)Pushback ( 0 and  0and  0)

Page 5: 1/5/2014 Procedural Modeling Motivation IPM Classification ...hpcg.purdue.edu/bbenes/papers/2013-12-12 IPM Inria.pdf · 1/5/2014 4 Inverse Procedural Modeling –Bedrich Benes –Dec

1/5/2014

5

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

By image‐to‐geometry matching we detect “turn signals” that represent corners

For each floor the parameters  , ,and  are found via optimization (it converges to one solution)

The building is then represented by a sequence of GRR  , , … , and their parameters

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013 Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

Page 6: 1/5/2014 Procedural Modeling Motivation IPM Classification ...hpcg.purdue.edu/bbenes/papers/2013-12-12 IPM Inria.pdf · 1/5/2014 4 Inverse Procedural Modeling –Bedrich Benes –Dec

1/5/2014

6

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

C) The system and the rules are givenFind the parameters

Stava, O., Pirk, S., Benes, B., Mech, R., and Deussen, O., Inverse Procedural Modeling of Trees, In Computer Graphics Forum (2014)

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

LiDAR

Xfrog

SpeedTree

. . . 

InputParameters

Developmental Model

SimilarityMeasure Optimization Convergence?

No

Yes

Stop

L‐systems

Input Model

GeneratedModel

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013 Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

The output is a 3D model that is “alive”

Page 7: 1/5/2014 Procedural Modeling Motivation IPM Classification ...hpcg.purdue.edu/bbenes/papers/2013-12-12 IPM Inria.pdf · 1/5/2014 4 Inverse Procedural Modeling –Bedrich Benes –Dec

1/5/2014

7

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

Novel (complicated) growth model

Endogenous and exogenous flow

Uses 24 parameters

Good modeling capability

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

Monte Carlo Markov Chain optimizationwith Metropolis‐Hastings sampling strategy

Similarity measure of two treesGeometric similarity metricsGraph distanceVisual similarity

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

The output allows for random variations

The complex 3D geometry is represented by a set of 24 parameters of the procedural model(good compression)

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

Page 8: 1/5/2014 Procedural Modeling Motivation IPM Classification ...hpcg.purdue.edu/bbenes/papers/2013-12-12 IPM Inria.pdf · 1/5/2014 4 Inverse Procedural Modeling –Bedrich Benes –Dec

1/5/2014

8

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

C) The system and the rules are givenFind the parametersUse them to re‐generate a city

Vanegas, C, A., Garcia‐Dorado, I., Aliaga, D., Benes, B., and Waddell, P., (2012) Inverse Design of Urban Procedural Models, in ACM Transactions on Graphics (TOG) 28 (5), 111

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

The objective is urban layout editing

The user is shielded from the procedural model

High‐level editing changes by indicatorsAverage distance to a parkSun exposureLandscape visibility

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013 Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

A combination of two approaches1) Forward procedural modeling 

by changing parameters, rules, and performing local changes

2) Inverse procedural modelingby editing indicators

Page 9: 1/5/2014 Procedural Modeling Motivation IPM Classification ...hpcg.purdue.edu/bbenes/papers/2013-12-12 IPM Inria.pdf · 1/5/2014 4 Inverse Procedural Modeling –Bedrich Benes –Dec

1/5/2014

9

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013 Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

What is the acceptable amount of changes?

Can we provide a better local control?

Can we predict the changes?

Is it too high‐level?

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

B) The system is givenFind the rules and their parameters

Stava, O., Benes, B., Mech, R., Aliaga, D.,G., and Kristof, P., Inverse Procedural Modeling by Automatic Generation of L‐systems, Computer Graphics Forum (Eurographics), 29:2, 10 pages, 2010.

Page 10: 1/5/2014 Procedural Modeling Motivation IPM Classification ...hpcg.purdue.edu/bbenes/papers/2013-12-12 IPM Inria.pdf · 1/5/2014 4 Inverse Procedural Modeling –Bedrich Benes –Dec

1/5/2014

10

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

Input: 2D vector image

Output: an L‐system

Inspired by the previous work in symmetry detection

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

2D Vector Image Analysis L‐system Modifications

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013 Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

d

α

3. Analyze clusters and calculate 

cluster significance

Update the affected clusters

4. Create non‐terminal 

symbols and L‐system rules

2. Calculate transformations, fill 

transformation spaces, and perform clustering

1. Calculate terminal symbols by inverse 

instancing

Similarity

Distance

Cluster size

Seq. length

Scaling

P(m) →A f(1) ‐(30) P(m‐1)

P(3)

Page 11: 1/5/2014 Procedural Modeling Motivation IPM Classification ...hpcg.purdue.edu/bbenes/papers/2013-12-12 IPM Inria.pdf · 1/5/2014 4 Inverse Procedural Modeling –Bedrich Benes –Dec

1/5/2014

11

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

cluster analysis

L‐system generation

transformationanalysis

inverse instancing

Deinstancing– Similar vector elements are coded as terminals

A2

A3

A4

B1A1

B2

B3B4

L‐system  2P1(m)→ [A] T 1 [B]

S → T s [P2(3)]

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

• Compute similarity between all input elements• Similar elements are represented by a terminal

A2

A3

A4

B1A1

B2

B3B4

L‐system  2P1(m)→ [A] T 1 [B]

S → T s [P2(3)]Terminals

A :

B :

cluster analysis

L‐system generation

transformationanalysis

inverse instancing

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

cluster analysis

L‐system generation

transformationanalysis

inverse instancing

• Transformation between two symbols

A2

A3

A4

B1A1

B2

B3B4

L‐system  2P1(m)→ [A] T 1 [B]

P2(m) :m>0 → [P1] T 2 P2(m‐1)m=0 → [P1]

S → T s [P2(3)]Terminals

A :

B :−(α) f(d)∗(s)−(β) 

Transformation between two coordinate systems

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

cluster analysis

L‐system generation

transformationanalysis

inverse instancing

• Find significant transformations– Put all transformations into Transformation space

Transformation = 4D Vector (2D transl., rotation, scale)

A2

A3

A4

B1A1

B2

B3B4

Terminals

A :

B :d

α

0

4D Transformation Space

Page 12: 1/5/2014 Procedural Modeling Motivation IPM Classification ...hpcg.purdue.edu/bbenes/papers/2013-12-12 IPM Inria.pdf · 1/5/2014 4 Inverse Procedural Modeling –Bedrich Benes –Dec

1/5/2014

12

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

cluster analysis

L‐system generation

transformationanalysis

inverse instancing

• Clustering in the transformation space– Large clusters ~ significant transformations

A2

A3

A4

B1A1

B2

B3B4

Terminals

A :

B :d

α

0

4D Transformation Space

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

cluster analysis

L‐system generation

transformationanalysis

inverse instancing

• One transformation space for each pair of terminal symbols 4x 4D Transformation Spaces

d

α

0

A‐A

d

α

0

A‐B

d

α

0

B‐A

d

α

0

B‐BA2

A3

A4

B1A1

B2

B3B4

Terminals

A :

B :

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

cluster analysis

L‐system generation

transformationanalysis

inverse instancing

• Cluster = Transformations between the same symbols

4x 4D Transformation Spaces

d

α

0

A‐A

d

α

0

A‐B

d

α

0

B‐A

d

α

0

B‐BA2

A3

A4

B1A1

B2

B3B4

Terminals

A :

B :

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

cluster analysis

L‐system generation

transformationanalysis

inverse instancing

C1

C2

C3

C4

• New rule ~ new non‐terminal symbol

Terminals

A2

A3

A4

B1A1

B2

B3B4

Non‐TerminalsC :

A :

B :d

α

0

A‐A

d

α

0

A‐B

Page 13: 1/5/2014 Procedural Modeling Motivation IPM Classification ...hpcg.purdue.edu/bbenes/papers/2013-12-12 IPM Inria.pdf · 1/5/2014 4 Inverse Procedural Modeling –Bedrich Benes –Dec

1/5/2014

13

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

cluster analysis

L‐system generation

transformationanalysis

inverse instancing

C1

C2

C3

C4

• Clusters no longer valid– Update them using the new non‐terminal symbol– Compute importance of updated clusters

Terminals

Non‐TerminalsC :

A :

B :d

α

0

A‐A

d

α

0

A‐BC‐C

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

cluster analysis

L‐system generation

transformationanalysis

inverse instancing

• Generate new rules until there are no clusters– Axiom → Last non‐terminal

Terminals

C1

C :

C2

C3

C4

D :

Axiom: S → TS D(3)D1

A :

B :d

α

0

C‐C

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

cluster analysis

L‐system generation

transformationanalysis

inverse instancing

• Final L‐system 

Terminals

A :

B :

L‐systemC(m)→ [A] T 1 [B]

D(m) :m>0 → [C] T 2 D(m‐1)m=0 → [C]

S → T s [D(3)]

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

Page 14: 1/5/2014 Procedural Modeling Motivation IPM Classification ...hpcg.purdue.edu/bbenes/papers/2013-12-12 IPM Inria.pdf · 1/5/2014 4 Inverse Procedural Modeling –Bedrich Benes –Dec

1/5/2014

14

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

A complex scene can have thousands of rules

A post processing may be required

A weighting function to give some preferences

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

What is a set of good procedural rules?Minimal grammar problemGood editing properties

What is the expression power of the IPM?

What PM system should be used?

Can the A case be solved?

Inverse Procedural Modeling – Bedrich Benes – Dec  12th 2013

Procedural modeling is a very strong conceptDozens of different PM for different casesHindered by the complexity of the rulesInverse methods can bring it to practical usage

… take a photograph of a tree/building/cloudan app will fina a PM that generates it …