more modelling - hwruth/year4ves/slides11/l10-2.pdf · 2012. 1. 8. · the great outdoors water,...

24
More modelling Ruth Aylett

Upload: others

Post on 28-Jan-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

  • More modelling

    Ruth Aylett

  • Overview

    The great outdoors: fractals– L-systems

    City Models– Procedural generation of models

  • How to make models..

    Interactive modeling– Human with a software modeling tool

    Scanning– Model geometry is scanned from a real world example using

    a laser scanner or similar device

    Computer vision– Scanned from real world example using multiple

    photographic cameras (or video sequences)

    Procedural modeling– Model constructed by automatic procedure that may

    make use of randomness for variety

  • The great outdoors

    Water, fire, rain, snow– Particle system: see later lecture– Included in some games engines like UT

    Trees– Use fractals: Lindenmayer systems (L-

    systems) are method of choice

  • Fractals

    Geometry similar/identical at differentscales

    Often generated from simple rules Frequent in Nature

    – Zoom in on jagged coast• Still jagged however close you get

    – Tree branches that branch

  • L-systems

    A type of fractal– Invented in 1968 by Aristid Lindenmayer to model

    biological growth• ‘The algorithmic beauty of plants’• http://algorithmicbotany.org/papers/#abop

    Constructed from line segments using rulesspecified in drawing commands– Start with an initial string– Axiom, transformation rules are applied a specified

    number of times– Produce the final command string– Which is used to draw the image

  • How it works

    L-systems are parallel rewriting systems. L-systems consist of:

    – an alphabet (V)– an axiom (a non-empty “seed” string V+)– Production rules of the form:

    V => V* (predecessor => successor)

    Rules replace predecessors with successors. Identity production rule is the default.

  • L-system example

    Alphabet:{a, b}

    Axiom (“seed”):b

    Production rules:a => abb => a

  • A variant of the Koch curve which uses only right-angles.– variables : F– constants : + −– start : F– rules : (F → F+F−F−F+F)

    Here, F means "draw forward", + means "turn left 90°", and -means "turn right 90°"

    n = 0: F

    n = 1: F+F-F-F+F

    Example: the Koch Curve

  • n = 2: F+F-F-F+F+F+F-F-F+F-F+F-F-F+F-F+F-F-

    F+F+F+F-F-F+F

  • n = 3:F+F-F-F+F+F+F-F-F+F-F+F-F-F+F-F+F-F-F+F+F+F-F-F+F+ F+F-F-F+F+F+F-F-F+F-F+F-F-F+F-F+F-F-F+F+F+F-F-F+F- F+F-F-F+F+F+F-F-F+F-F+F-F-F+F-F+F-F-F+F+F+F-F-F+F- F+F-F-F+F+F+F-F-F+F-F+F-F-F+F-F+F-F-F+F+F+F-F-F+F+ F+F-F-F+F+F+F-F-F+F-F+F-F-F+F-F+F-F-F+F+F+F-F-F+F

  • A fractal plant variables : X F

    – constants : + −– start : X– rules : (X → F-[[X]+X]+F[+FX]-X),(F → FF)– angle : 25º

    Here,– F means "draw forward",– - means "turn left 25º", and– + means "turn right 25º".– X does not correspond to any drawing action and is used to

    control the evolution of the curve.– [ corresponds to saving the current values for position and

    angle, which are restored when the corresponding ] isexecuted

  • Using L-systems

    Modelling software available– See

    http://www.vterrain.org/Plants/plantsw.html for a list of some

    – E.g shareware xfrog plant modeller• http://www.vterrain.org/Plants/Xfrog/index.htm

    l

  • Procedural models of cities

    Different levels of structure– Street network (only some cities are purely

    grids)– ‘Lots’: 2D spaces where buildings can go– Buildings– Low-level geometry

  • Active Research Area– Procedural Modeling of Cities [Parish and Müller, 2001]

    – Procedural Modeling of Buildings [Haegler et al. 2006]

  • Streets

    Modified L-systems

    Global goals:– Desired type of street pattern (entered by user)

    Local constraints:– Streets must join up; no closed loops etc

    PredecessorIdealSuccessor

    GlobalGoals

    Local

    Constraints

  • City Engine examples

    See www.procedural.comOrganic, radial, raster

    Organic main, rasterlocal

    Radial main, radiallocal

  • Division into Lots

    Road network divided into city blocks andthen building footprints

  • Buildings Shape grammars (1972)

    – Symbols represent shapes– Manipulation rules represent operations on

    shapes• EG: insert (replace one shape with another); split

    (along a plane); scale, translate, rotate;

    – See http://en.wikipedia.org/wiki/Shape_grammar Plus a rule engine to run the rules

  • Applying a shape grammar

    Form: LHS -> RHS– LHS: condition = shape + marker– RHS: LHS shape transformation + new marker

    position

    Grammar– 1 start rule; n transformation rules; 1 termination

    rule (e.g. remove the marker)

    Process:– Working memory holds current state– LHS rules triggered by matching– Conflict resolution if more than one

  • Façade addition to extrudedshape

  • Examples

    Palladian villas– William Mitchell (1990)– 69 rules– fired during eight stages.

    City Engine videos– Commercial engine

    Open source: Shape Grammar Interpreter• http://sourceforge.net/projects/sginterpreter/

  • Applications

    Mainly in games– City Engine a recent startup

    Considerable resistance by real-worlddesigners– Possibly too little user control

    Development of plugins for 3dmodelling packages