synthetic landscapes - uni salzburg · the following images represent a grayscale image height map...

27
Synthetic Landscapes A presentation for the course “Wissenschaftliche Arbeitstechniken und Pr¨ asentation” Kamran SAFDAR Universit¨ at Salzburg January 23, 2009 Kamran SAFDAR (Universit¨ at Salzburg) Synthetic Landscapes January 23, 2009 1 / 27

Upload: letram

Post on 15-Feb-2019

212 views

Category:

Documents


0 download

TRANSCRIPT

Synthetic LandscapesA presentation for the course

“Wissenschaftliche Arbeitstechniken und Prasentation”

Kamran SAFDAR

Universitat Salzburg

January 23, 2009

Kamran SAFDAR (Universitat Salzburg) Synthetic Landscapes January 23, 2009 1 / 27

Table of Contents

http://www.fnbpawhuska.com/images/contents/contents bkg.jpg

1 Landscapes2 Formless Monsters

Formless Monsters3 Landscape Specification

Declarative TechniquesProcedural Techniques

4 Landscape GenerationHeight MapsRecursive Subdivision Methods

Triangular-Edge SubdivisionDiamond-Square Subdivision

Level of Detail (LoD)5 Some Examples6 References

Kamran SAFDAR (Universitat Salzburg) Synthetic Landscapes January 23, 2009 2 / 27

Outline

http://www.squeeky-kleen.co.uk/images/Fotolia 3673319 XS.jpg

1 Landscapes

2 Formless Monsters

3 Landscape Specification

4 Landscape Generation

5 Some Examples

6 References

Kamran SAFDAR (Universitat Salzburg) Synthetic Landscapes January 23, 2009 3 / 27

Landscapes

Artistic landscape painting captures minute details in a scene andmimics moods and environments.

Realism and liveliness remain the merits for computer-generatedlandscapes.

http://www.oilpaintinghouse.com/OilPainting/Landscape/Oph Landscape233.jpg

http://www.sfcamerawork.org/past exhibits/past src/2005/C5/shasta xl.jpg

http://www.sbdev.pwp.blueyonder.co.uk/images/Geomipmapping.jpg

Kamran SAFDAR (Universitat Salzburg) Synthetic Landscapes January 23, 2009 4 / 27

Landscapes (cont’d)

For real-time landscape generations, elements can be stored asproduction rules, parameters, and seeds and can be visualized usingfractal and procedural algorithms on run.

http://i9.photobucket.com/albums/a59/craigory666/heightMapTerrain.jpg

Kamran SAFDAR (Universitat Salzburg) Synthetic Landscapes January 23, 2009 5 / 27

Outline

http://www.squeeky-kleen.co.uk/images/Fotolia 3673319 XS.jpg

1 Landscapes

2 Formless MonstersFormless Monsters

3 Landscape Specification

4 Landscape Generation

5 Some Examples

6 References

Kamran SAFDAR (Universitat Salzburg) Synthetic Landscapes January 23, 2009 6 / 27

Formless Monsters

Nature is complex when it comes to modelling.

Euclidean geometry is not sufficient to model natural landscapes

A cloud, a shoreline, a mount or a bark of tree is not a sphere, acube, a cone, or a straight line that can be produced by some unfussyparameters.

http://anomalyblog.files.wordpress.com/2007/01/cloud3.jpg

http://www.nationmaster.com/encyclopedia/

http://www.mce.k12tn.net/math/math vocabulary/geometry.gif

Image:DirkvdM-cloudforest.jpg

Kamran SAFDAR (Universitat Salzburg) Synthetic Landscapes January 23, 2009 7 / 27

Formless Monsters (cont’d)

Benoit Mandelbrot, being the first mathematician to give newtheoretical basis for study of such “formless” patterns, writes in hisbook:

“... Responding to this challenge, I conceived and developed a newgeometry of nature and implemented its use in a number of diverse fields.It describes many of the irregular and fragmented patterns around us, andleads to full-fledged theories, by identifying a family of shapes I callfractals. ...”

[Mandelbrot, 1982]

Kamran SAFDAR (Universitat Salzburg) Synthetic Landscapes January 23, 2009 8 / 27

Outline

http://www.squeeky-kleen.co.uk/images/Fotolia 3673319 XS.jpg

1 Landscapes

2 Formless Monsters

3 Landscape SpecificationDeclarative TechniquesProcedural Techniques

4 Landscape Generation

5 Some Examples

6 References

Kamran SAFDAR (Universitat Salzburg) Synthetic Landscapes January 23, 2009 9 / 27

Declarative Techniques

Explicitly define position and properties of every object.

Used for real world geographical systems where data is available forevery object.

Huge amount of data but no generation algorithms needed.

Full control over the appearence of landscape.

Exact definition of objects.

Bad storage requirements.

Too much work required for definition of the landscape.

Kamran SAFDAR (Universitat Salzburg) Synthetic Landscapes January 23, 2009 10 / 27

Procedural Techniques

Designs are codified into algorithms which generate patterns.

Varying and realistic objects can be generated.

Perfect when the landscape does not need to match any real-worldlocation.

Small memory footprint and disk storage space.

Very less work required from the designer.

The main focus of this presentation.

Kamran SAFDAR (Universitat Salzburg) Synthetic Landscapes January 23, 2009 11 / 27

Outline

http://www.squeeky-kleen.co.uk/images/Fotolia 3673319 XS.jpg

1 Landscapes

2 Formless Monsters

3 Landscape Specification

4 Landscape GenerationHeight MapsRecursive Subdivision Methods

Triangular-Edge SubdivisionDiamond-Square Subdivision

Level of Detail (LoD)

5 Some Examples

6 ReferencesKamran SAFDAR (Universitat Salzburg) Synthetic Landscapes January 23, 2009 12 / 27

Landscape Generation

We need to be able to:represent a landscape digitally.

A simple implementation is height maps.

generate a grid with height values, if no real world data is available.

Resursive Subdivision defines a discrete grid and generate points.

http://www.crisp.nus.edu.sg/coverages/nature/images/MK 20070216 terrain.jpg

Kamran SAFDAR (Universitat Salzburg) Synthetic Landscapes January 23, 2009 13 / 27

Height Maps

http://www.jkilavuz.com/doc/tutorial/images/variable elevation grid.jpg

http://root.cern.ch/root/html/MACRO THistPainter 43 c2.gif

http://farm2.static.flickr.com/1085/1170921821 cefabcc9bf.jpg?v=0

A computer representation of landscape.

A matrix of heights mapping locations to heights.

Kamran SAFDAR (Universitat Salzburg) Synthetic Landscapes January 23, 2009 14 / 27

Height Maps (cont’d)

A grayscale image is a good example of a height map.

The pixel intensities can be treated as height values for each gridpoint.

The following images represent a grayscale image height map and thecorresponding smooth landscape generated from it.

Image credit: [Macklem, 2003]

Kamran SAFDAR (Universitat Salzburg) Synthetic Landscapes January 23, 2009 15 / 27

Recursive Subdivision Methods

The landscape is defined by subdivision into smaller parts.

Edge grid points define a square.

The square is subdivided into four smaller squares and new gridpoints are generated.

A random offset, proportional to the current edge-length, is added tothe generated vertices.

The process continues until the desired resolution is achieved.

Kamran SAFDAR (Universitat Salzburg) Synthetic Landscapes January 23, 2009 16 / 27

Triangular-Edge Subdivision

Image credit: [Macklem, 2003]

Logically divide each square into two triangles.

The midpoint of each triangle’s edge is randomly offseted resulting infour small squares.

Subdivision is repeated until the desired resolution is achieved.

Kamran SAFDAR (Universitat Salzburg) Synthetic Landscapes January 23, 2009 17 / 27

Diamond-Square Subdivision

Image credit: [Macklem, 2003]

Calculate the midpoint by averaging the four corner of thesurrounding square or diamond.

Randomly offset the midpoint.

Repeat the subdivision until the desired resolution is achieved.

Kamran SAFDAR (Universitat Salzburg) Synthetic Landscapes January 23, 2009 18 / 27

Level of Detail

http://www.tulrich.com/geekstuff/images/puget-1-wire.jpg

The amount of detail to be displayed (texture size, amount ofgeometry, etc.).

Kamran SAFDAR (Universitat Salzburg) Synthetic Landscapes January 23, 2009 19 / 27

Level of Detail (cont’d)

Three basic frameworks[D. Luebke and Huebner, a]:

Discrete LoD

Create LoDs for each object separately.At run-time, pick each object’s LOD accordingto object distance or similar criterion.

Continuous LoD

Create a data structure from which the desiredlevel of detail can be extracted at run time.

View-dependent LoD

Use current view parameters to select bestrepresentation for the current view.Single objects may thus span several levels ofdetail.

Bird’s View

From View Point

http://lodbook.com/course/2003/Luebke ViewDepSimp.ppt

http://lodbook.com/course/2003/Luebke ViewDepSimp.ppt

Kamran SAFDAR (Universitat Salzburg) Synthetic Landscapes January 23, 2009 20 / 27

Outline

http://www.squeeky-kleen.co.uk/images/Fotolia 3673319 XS.jpg

1 Landscapes

2 Formless Monsters

3 Landscape Specification

4 Landscape Generation

5 Some Examples

6 References

Kamran SAFDAR (Universitat Salzburg) Synthetic Landscapes January 23, 2009 21 / 27

Some Examples

http://wwwcg.in.tum.de/Teaching/SS2005/HauptSem/Terrain web.jpg

Kamran SAFDAR (Universitat Salzburg) Synthetic Landscapes January 23, 2009 22 / 27

Some Examples (cont’d)

http://www.crytek.com/fileadmin/user upload/cryengine2/screenshots/11 terrain lod.jpg

Kamran SAFDAR (Universitat Salzburg) Synthetic Landscapes January 23, 2009 23 / 27

Some Examples (cont’d)

http://hlfallout.filecloud.com/img/sized/00/00/41/00004118.jpg

Kamran SAFDAR (Universitat Salzburg) Synthetic Landscapes January 23, 2009 24 / 27

Outline

http://www.squeeky-kleen.co.uk/images/Fotolia 3673319 XS.jpg

1 Landscapes

2 Formless Monsters

3 Landscape Specification

4 Landscape Generation

5 Some Examples

6 References

Kamran SAFDAR (Universitat Salzburg) Synthetic Landscapes January 23, 2009 25 / 27

References

[D. Luebke and Huebner, a] D. Luebke, M. Reddy, J. C. A. V. B. W. and Huebner, R.(a).

In: Level of Detail for 3D Graphics , Morgan Kaufmann.

http://lodbook.com/course/2003/.

[Macklem, 2003] Macklem, G. (2003).

Master’s thesis.

www.gantless.com/programs/macklem.pdf.

[Mandelbrot, 1982] Mandelbrot, B. (1982).

The fractal geometry of nature.

W. H. Freeman, San Francisco.

Kamran SAFDAR (Universitat Salzburg) Synthetic Landscapes January 23, 2009 26 / 27

Thank you very muchfor your attention.

Kamran SAFDAR (Universitat Salzburg) Synthetic Landscapes January 23, 2009 27 / 27