46
Rendering of Rendering of Realistic Landscapes Realistic Landscapes K. H. Ko K. H. Ko Department of Mechatronics Department of Mechatronics Gwangju Institute of Science Gwangju Institute of Science and Technology and Technology October 31, 2007

Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

  • View
    215

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Rendering of Rendering of Realistic LandscapesRealistic Landscapes

K. H. KoK. H. KoDepartment of MechatronicsDepartment of MechatronicsGwangju Institute of Science and TechnGwangju Institute of Science and Technologyology

October 31, 2007

Page 2: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

IntroductionIntroduction

Creating detailed three dimensional Creating detailed three dimensional landscapes manually is a costly and slow landscapes manually is a costly and slow process.process.– Automatic generation of landscapes is needed.Automatic generation of landscapes is needed.

Features in a landscapeFeatures in a landscape– Terrain with a varying topology and surface Terrain with a varying topology and surface

structure : the basisstructure : the basis– Plants : forests, fieldsPlants : forests, fields– Individual buildings, cities, roads, infrastructureIndividual buildings, cities, roads, infrastructure– Rivers, lakes, seas, sky, clouds, the sun, starsRivers, lakes, seas, sky, clouds, the sun, stars– Animals and people, etc.Animals and people, etc.

Page 3: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

IntroductionIntroduction

To create a realistic landscapeTo create a realistic landscape– It is not enough that the elements making up the laIt is not enough that the elements making up the la

ndscape look realistic.ndscape look realistic.– They should also be placed naturally in relation to eThey should also be placed naturally in relation to e

ach other.ach other. Mimicking the way real landscapes are structured.Mimicking the way real landscapes are structured.

– Ecotopes provide a way to achieve this.Ecotopes provide a way to achieve this. A consistent landscape with variation both at local and gloA consistent landscape with variation both at local and glo

bal scales is more interesting than a completely random obal scales is more interesting than a completely random or homogeneous landscape.r homogeneous landscape.

Page 4: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

IntroductionIntroduction

ApplicationsApplications– Flight simulators, computer games, Flight simulators, computer games,

visualization in architecture, land use visualization in architecture, land use planning tools, geographical visualization, planning tools, geographical visualization, landscape design, background generation landscape design, background generation for movies, etc.for movies, etc.

– Dynamic and interactive landscapes but Dynamic and interactive landscapes but could be artificialcould be artificial

Computer gamesComputer games

– Static but accurate landscapeStatic but accurate landscape Geographical information systemGeographical information system

Page 5: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Procedural vs. Procedural vs. DeclarativeDeclarative Declarative ApproachDeclarative Approach

– Define every details and properties of every Define every details and properties of every object in the landscape.object in the landscape.

– The designer has absolute control over the The designer has absolute control over the landscape.landscape.

– It requires a huge amount of storage space.It requires a huge amount of storage space.– Creating a landscape takes time.Creating a landscape takes time.– It is used for real world geographical system.It is used for real world geographical system.

Conformance to the real world geography is Conformance to the real world geography is important.important.

The terrain height and object placement information The terrain height and object placement information can be obtained from measurement data.can be obtained from measurement data.

Page 6: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Procedural vs. Procedural vs. DeclarativeDeclarative Procedural ApproachProcedural Approach

– It generates the landscape using It generates the landscape using algorithms that produce varying, algorithms that produce varying, natural looking data.natural looking data.

– This approach can be used if the This approach can be used if the landscape does not have to match landscape does not have to match any real life location.any real life location. Almost no input data is required.Almost no input data is required. Specialized algorithms are used.Specialized algorithms are used.

– Small disk storage and minimum workSmall disk storage and minimum work

Page 7: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Hybrid Hybrid

Both the procedural and Both the procedural and declarative methods are combined.declarative methods are combined.– Use the procedural approach by Use the procedural approach by

defaultdefault– Allow exact definitions in placesAllow exact definitions in places

The landscape designer can accurately The landscape designer can accurately specify details where they are needed.specify details where they are needed.

Page 8: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Ecotopes Ecotopes

Different areas in an extensive natural landscape may Different areas in an extensive natural landscape may have very different appearances.have very different appearances.– Rocky ground, forests, lakes, etc.Rocky ground, forests, lakes, etc.

Ecotopes are a way to implement this kind of variation.Ecotopes are a way to implement this kind of variation. Ecotopes provide a flexible framework that can be useEcotopes provide a flexible framework that can be use

d to implement both macro and micro scale features d to implement both macro and micro scale features – Macro scale features: forestsMacro scale features: forests– Micro scale features: tall grassMicro scale features: tall grass

They give landscape designers both controls over the They give landscape designers both controls over the characteristics of different types of landscape, as well characteristics of different types of landscape, as well as control over where to apply what type of landscape.as control over where to apply what type of landscape.

Page 9: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Ecotopes Ecotopes

Landscape parameters of an ecotopesLandscape parameters of an ecotopes– Height functionsHeight functions– A number of different plant species and theiA number of different plant species and thei

r densitiesr densities– Rain amounts which affect the number of rivRain amounts which affect the number of riv

ers and lakes generated.ers and lakes generated.– Population densityPopulation density– Number of buildingsNumber of buildings– Etc.Etc.

Page 10: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Ecotopes Ecotopes

Distribution Properties of EcotopesDistribution Properties of Ecotopes– Terrain elevation, relative elevation, slope aTerrain elevation, relative elevation, slope a

ngle, proximity to sea, proximity to a river or ngle, proximity to sea, proximity to a river or lake, etc.lake, etc.

– Randomly generated noise functionRandomly generated noise function

Page 11: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

To Create a To Create a Landscape… Landscape… TerrainTerrain PlantsPlants

– Trees, grass, etc.Trees, grass, etc. BuildingsBuildings CitiesCities The SkyThe Sky

– Clouds, weather, climate, atmosphere, Clouds, weather, climate, atmosphere, celestial bodies, etc.celestial bodies, etc.

Page 12: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Terrain Terrain

It is the basis for a landscape, i.e. the It is the basis for a landscape, i.e. the shape of the ground.shape of the ground.

For efficiency in modeling and rendering For efficiency in modeling and rendering the ground, we may assume thatthe ground, we may assume that– The ground surface has no overhangs.The ground surface has no overhangs.

Any ray from the center of the planet intersects Any ray from the center of the planet intersects the planet surface exactly once.the planet surface exactly once.

Under this assumption, the ground shape can be Under this assumption, the ground shape can be defined by a ground height function.defined by a ground height function.

– When modeling and rendering only a small When modeling and rendering only a small part of the planet surface, we treat the part of the planet surface, we treat the surface as planar.surface as planar.

Page 13: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Terrain Terrain

For rendering a ground surface, it For rendering a ground surface, it is often practical to only store is often practical to only store samples of the ground height samples of the ground height function at some intervals.function at some intervals.– Called an elevation map or height Called an elevation map or height

map.map.– If the height is encoded as colors, it If the height is encoded as colors, it

can be stored as an image.can be stored as an image.

Page 14: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Random Terrain Random Terrain GeneratorsGenerators The simplest way is to assign each The simplest way is to assign each

position on the ground a random position on the ground a random height.height.– The result of that bears little The result of that bears little

resemblance to natural terrain.resemblance to natural terrain.– In fact the natural ground is more or In fact the natural ground is more or

less continuous, while still varying in less continuous, while still varying in height in complex ways depending on height in complex ways depending on the position.the position.

Page 15: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Random Terrain Random Terrain GeneratorsGenerators Stochastic Subdivision AlgorithmsStochastic Subdivision Algorithms

– Iterative subdivision with pseudo-random Iterative subdivision with pseudo-random midpoint displacementmidpoint displacement

– AlgorithmAlgorithm1.1. The terrain starts with a single large square, The terrain starts with a single large square,

with a height value of zero at each corner.with a height value of zero at each corner.2.2. A pseudo-random height offset that is A pseudo-random height offset that is

proportional to the size of the square, is added proportional to the size of the square, is added to each corner of the square.to each corner of the square.

3.3. The square is divided into four smaller ones, The square is divided into four smaller ones, with the height of each new corner interpolated with the height of each new corner interpolated between the heights of neighboring corners of between the heights of neighboring corners of the original square.the original square.

4.4. The algorithm is repeated from step 2 for each The algorithm is repeated from step 2 for each square, until the squares are at the desired LOD.square, until the squares are at the desired LOD.

Page 16: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Random Terrain Random Terrain GeneratorsGenerators

Height Map 3D Rendering

Page 17: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Random Terrain Random Terrain GeneratorsGenerators Stochastic Subdivision AlgorithmsStochastic Subdivision Algorithms

– DrawbacksDrawbacks It often produces unnatural looking It often produces unnatural looking

regularities (sharp ridges or peaks)regularities (sharp ridges or peaks) The random variation varies linearly The random variation varies linearly

with the scale of the features.with the scale of the features.– In nature terrain the amplitude of height In nature terrain the amplitude of height

variation does not depend linearly on the variation does not depend linearly on the scale of the features.scale of the features.

Page 18: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Random Terrain Random Terrain GeneratorsGenerators Stochastic Subdivision Stochastic Subdivision

AlgorithmsAlgorithms– Diamond Square Diamond Square

SubdivisionSubdivision The algorithm divides a The algorithm divides a

square into four smaller square into four smaller squares rotated 45 degrees squares rotated 45 degrees in relation to the original in relation to the original square.square.

It eliminates some of the It eliminates some of the more visible artifacts, but more visible artifacts, but has some quite noticeable has some quite noticeable point-like artifacts of its point-like artifacts of its own.own.

Page 19: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Random Terrain Random Terrain GeneratorsGenerators Stochastic Subdivision Stochastic Subdivision

AlgorithmsAlgorithms– Offset square subdivision Offset square subdivision

It can avoid most of the It can avoid most of the artifacts, but with somewhat artifacts, but with somewhat increased performance cost.increased performance cost.

The smaller squares are The smaller squares are offset from the larger square offset from the larger square corners, and the initial corners, and the initial values for the smaller square values for the smaller square corners are calculated with a corners are calculated with a weighted average.weighted average.– More smooth terrainMore smooth terrain

Page 20: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Random Terrain Random Terrain GeneratorsGenerators Faulting AlgorithmsFaulting Algorithms

– They generate fractal They generate fractal data by repeatedly data by repeatedly dividing the terrain with dividing the terrain with a faulting edge.a faulting edge.

Raising the terrain on one Raising the terrain on one side of the edge and side of the edge and lowering it at the other to lowering it at the other to achieve a height difference achieve a height difference along the faulting edge.along the faulting edge.

– Over time the height Over time the height difference is reduced difference is reduced and when it arrives at and when it arrives at zero the terrain is ready.zero the terrain is ready.

Page 21: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Random Terrain Random Terrain GeneratorsGenerators Faulting AlgorithmsFaulting Algorithms

– Very slowVery slow– Not suitable for applications where Not suitable for applications where

a small visible area of a larger a small visible area of a larger terrain needs to be generated.terrain needs to be generated.

Page 22: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Random Terrain Random Terrain GeneratorsGenerators Perlin NoisePerlin Noise

– It approximates smooth wIt approximates smooth white noise of a given frequhite noise of a given frequency in one or more dimeency in one or more dimensions.nsions.

– Combining several layers Combining several layers (called octaves) of noise (called octaves) of noise at different frequencies aat different frequencies and amplitudes, a natural lnd amplitudes, a natural looking fractal noise can booking fractal noise can be obtained.e obtained.

This combined noise is callThis combined noise is called Perlin turbulence, or just ed Perlin turbulence, or just Perlin noise.Perlin noise. One layer

Page 23: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Random Terrain Random Terrain GeneratorsGenerators

Perlin NoisePerlin Noise– The characteristics of a terThe characteristics of a ter

rain height field can be adjrain height field can be adjusted by changing the numusted by changing the number of octaves, the amplituber of octaves, the amplitude and frequency of each ode and frequency of each octave.ctave.

Page 24: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Random Terrain Random Terrain GeneratorsGenerators Perlin NoisePerlin Noise

– It does not have any regular visible artifacts and It does not have any regular visible artifacts and is fast.is fast.

It is a popular choice for random terrain generation.It is a popular choice for random terrain generation.– One variation of Perlin turbulence is the ridged One variation of Perlin turbulence is the ridged

multi-fractal noise.multi-fractal noise. It uses absolute value functions to produce features wiIt uses absolute value functions to produce features wi

th a ridged appearance.th a ridged appearance.– Approximate eroded mountain ranges.Approximate eroded mountain ranges.

Page 25: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Random Terrain Random Terrain GeneratorsGenerators Successive Mass DepositSuccessive Mass Deposit

– It is based on the idea of repeatedly It is based on the idea of repeatedly adding some mass at a random adding some mass at a random location of the terrain.location of the terrain.

The mass has a Gaussian distribution The mass has a Gaussian distribution profile around the addition point. profile around the addition point.

The addition is repeated with The addition is repeated with successively smaller masses.successively smaller masses.

Page 26: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Geological Effects on Geological Effects on the Terrainthe Terrain A height field that statistically A height field that statistically

resemble the real landscape resemble the real landscape topographies visually lacks many of topographies visually lacks many of the distinct geological features found the distinct geological features found in real world landscapes.in real world landscapes.

– The result of various geological processesThe result of various geological processes Topology building processesTopology building processes

– Move the planet crust or allow magma to rise to Move the planet crust or allow magma to rise to the surface.the surface.

Erosive processesErosive processes– Wear down the planet crust to progressively Wear down the planet crust to progressively

more fine grained particles.more fine grained particles.– Transport these particles and deposit them in Transport these particles and deposit them in

new places.new places.

Page 27: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Terrain Level of Detail Terrain Level of Detail

Level of Detail For Terrain VisualizationLevel of Detail For Terrain Visualization– Easier than arbitrary 3D modelsEasier than arbitrary 3D models

The geometry is more constrained, normally The geometry is more constrained, normally consisting of uniform grids of height values.consisting of uniform grids of height values.

More specialized and potentially simpler algorithms More specialized and potentially simpler algorithms could be possible.could be possible.

– More DifficultMore Difficult It is possible to have a large amount of terrain It is possible to have a large amount of terrain

visible at any point.visible at any point.– LOD techniques are criticalLOD techniques are critical

Terrain meshes can be extremely dense.Terrain meshes can be extremely dense.– The U.S. Geological Survey data: 30-arc-second The U.S. Geological Survey data: 30-arc-second

resolution (roughly 1 kilometer at the equator) – 933 resolution (roughly 1 kilometer at the equator) – 933 million points, 1.8 billion triangles over the entire million points, 1.8 billion triangles over the entire planet.planet.

Page 28: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Algorithms for TerrainAlgorithms for Terrain(Top Down or Bottom Up)(Top Down or Bottom Up)

Top Down: Subdivision or Refinement Top Down: Subdivision or Refinement methodsmethods– Begin with two or four triangles for the Begin with two or four triangles for the

entire region.entire region.– Progressively add new triangles until the Progressively add new triangles until the

desired resolution is achieved.desired resolution is achieved. Bottom Up: Decimation or SimplificationBottom Up: Decimation or Simplification

– Begins with the highest-resolution meshBegins with the highest-resolution mesh– Iteratively removes vertices from the Iteratively removes vertices from the

triangulation until the desired level of triangulation until the desired level of simplification is gained.simplification is gained.

Page 29: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Bottom-up approaches tend to be able to Bottom-up approaches tend to be able to find the minimal number of triangles find the minimal number of triangles required for a given accuracy.required for a given accuracy.

However, they necessitate the entire However, they necessitate the entire model being available at the first step.model being available at the first step.– Higher memory and computational demands.Higher memory and computational demands.

Algorithms for TerrainAlgorithms for Terrain(Top Down or Bottom Up)(Top Down or Bottom Up)

Page 30: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Bottom-up approaches are almost Bottom-up approaches are almost always used during the initial always used during the initial offline hierarchy construction.offline hierarchy construction.

At run-time, a top-down approach At run-time, a top-down approach might be favored.might be favored.– It offers support for view culling.It offers support for view culling.

Algorithms for TerrainAlgorithms for Terrain(Top Down or Bottom Up)(Top Down or Bottom Up)

Page 31: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

The use of regular grid height fieldsThe use of regular grid height fields– Regular (uniform) grids use an array of height valueRegular (uniform) grids use an array of height value

s at regularly spaced x and y coordinates.s at regularly spaced x and y coordinates. Triangulated Irregular Networks (TINs)Triangulated Irregular Networks (TINs)

– TINs allow variable spacing between vertices.TINs allow variable spacing between vertices.

Algorithms for TerrainAlgorithms for Terrain(Regular Grids and TINs)(Regular Grids and TINs)

Page 32: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Advantages of TINs Advantages of TINs – They can approximate a surface to a required accuracy with feThey can approximate a surface to a required accuracy with fe

wer polygons.wer polygons. Large flat regions are represented with a coarse sampling.Large flat regions are represented with a coarse sampling. Higher sampling is reserved for more bumpy regions.Higher sampling is reserved for more bumpy regions.

– They offer great flexibility in the range and accuracy of featureThey offer great flexibility in the range and accuracy of features.s.

Ridges, valleys, coastlines, caves, etc.Ridges, valleys, coastlines, caves, etc. Disadvantages of TINSDisadvantages of TINS

– They make implementing related functions (view culling, terraiThey make implementing related functions (view culling, terrain following, collision detection and dynamic deformation) morn following, collision detection and dynamic deformation) more complex.e complex.

Due to the lack of a simple overarching spatial organization.Due to the lack of a simple overarching spatial organization.– The applicability of TINs to run-time view-dependent LOD is leThe applicability of TINs to run-time view-dependent LOD is le

ss efficient than regular gridded systems.ss efficient than regular gridded systems.

Algorithms for TerrainAlgorithms for Terrain(Regular Grids and TINs)(Regular Grids and TINs)

Page 33: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Disadvantages of Regular Grids Disadvantages of Regular Grids – They tend to be far less optimal than TINs.They tend to be far less optimal than TINs.

The same resolution is used across the entire terrain.The same resolution is used across the entire terrain. Advantages of Regular GridsAdvantages of Regular Grids

– They are simple to store and manipulate.They are simple to store and manipulate.– They are easily integrated with raster databases anThey are easily integrated with raster databases an

d file formatsd file formats DEM, DTED, GeoTIFF, etc.DEM, DTED, GeoTIFF, etc.

– They require less storage for the same number of pThey require less storage for the same number of points.oints.

An array of z values needs to be stored rather than full (x,y,An array of z values needs to be stored rather than full (x,y,z) coordinates.z) coordinates.

Algorithms for TerrainAlgorithms for Terrain(Regular Grids and TINs)(Regular Grids and TINs)

Page 34: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

For these reasons, many contemporary tFor these reasons, many contemporary terrain LOD systems favor regular grids oerrain LOD systems favor regular grids over TINs.ver TINs.

Algorithms for TerrainAlgorithms for Terrain(Regular Grids and TINs)(Regular Grids and TINs)

Page 35: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

For multiresolution representation we use quaFor multiresolution representation we use quadtrees or bintrees.dtrees or bintrees.

Quadtree StructureQuadtree Structure– A rectangular region is divided uniformly into four qA rectangular region is divided uniformly into four q

uadrants.uadrants.– Each of these quadrants can then be successively Each of these quadrants can then be successively

divided into four smaller regions.divided into four smaller regions.

Algorithms for TerrainAlgorithms for Terrain(Quadtrees and Bintrees)(Quadtrees and Bintrees)

Page 36: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

A binary triangle tree structure works the same A binary triangle tree structure works the same way as a quadtree.way as a quadtree.– But it segments a triangle into two halves.But it segments a triangle into two halves.

The root triangles is normally defined to be a right-isoscelThe root triangles is normally defined to be a right-isosceles triangle.es triangle.

The subdivision is performed by splitting this along the edThe subdivision is performed by splitting this along the edge formed between its apex vertex and the midpoint of its ge formed between its apex vertex and the midpoint of its base edge.base edge.

Algorithms for TerrainAlgorithms for Terrain(Quadtrees and Bintrees)(Quadtrees and Bintrees)

Page 37: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Advantages of BintreesAdvantages of Bintrees– They make it easy to avoid cracks and T-junThey make it easy to avoid cracks and T-jun

ctions.ctions.– Exhibit the useful feature that triangles are Exhibit the useful feature that triangles are

never more than one resolution level away frnever more than one resolution level away from their neighbors.om their neighbors.

Algorithms for TerrainAlgorithms for Terrain(Quadtrees and Bintrees)(Quadtrees and Bintrees)

Subdivision progression example.

The root triangle is A

Page 38: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

When adjacent triangles exist at When adjacent triangles exist at different levels of detail,different levels of detail,– It is possible to introduce cracks along It is possible to introduce cracks along

the edge.the edge. The higher LOD introduces an extra The higher LOD introduces an extra

vertex that does not lie on the lower LOD vertex that does not lie on the lower LOD edge.edge.

When rendered, these cracks can cause When rendered, these cracks can cause holes in the terrain, allowing the holes in the terrain, allowing the background to peak through.background to peak through.

Algorithms for TerrainAlgorithms for Terrain(Tears, Cracks and T-Junctions)(Tears, Cracks and T-Junctions)

Page 39: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

When adjacent triangles exist at When adjacent triangles exist at different levels of detail,different levels of detail,– Another undesirable artifact is the T-Another undesirable artifact is the T-

junction.junction. It is caused when the vertex from a It is caused when the vertex from a

higher LOD triangle does not share a higher LOD triangle does not share a vertex in the adjacent lower LOD triangle.vertex in the adjacent lower LOD triangle.

It can result in bleeding tears in the It can result in bleeding tears in the terrain and visible lighting and terrain and visible lighting and interpolation differences across the interpolation differences across the edges.edges.

Algorithms for TerrainAlgorithms for Terrain(Tears, Cracks and T-Junctions)(Tears, Cracks and T-Junctions)

Page 40: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Algorithms for TerrainAlgorithms for Terrain(Tears, Cracks and T-Junctions)(Tears, Cracks and T-Junctions)

Page 41: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

How to deal with cracks…How to deal with cracks…– The triangles around the crack are recursiveThe triangles around the crack are recursive

ly split to produce a continuous surface.ly split to produce a continuous surface. It is often used in bintree-based system.It is often used in bintree-based system.

Algorithms for TerrainAlgorithms for Terrain(Tears, Cracks and T-Junctions)(Tears, Cracks and T-Junctions)

Page 42: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

After generating and rendering the After generating and rendering the geometry of the landscape, we still geometry of the landscape, we still need to texture it.need to texture it.– It means covering the triangles It means covering the triangles

making up the landscape with images making up the landscape with images of the ground in that area.of the ground in that area.

Method 1Method 1– Just repeat a texture over the Just repeat a texture over the

landscape.landscape. Results in visible tiling artifacts, and a Results in visible tiling artifacts, and a

quite boring landscape.quite boring landscape.

Terrain TexturingTerrain Texturing

Page 43: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Method 2Method 2– Use a number of different textures which match eaUse a number of different textures which match ea

ch other along some edges.ch other along some edges. We fill the plane with these textures, making sure adjacenWe fill the plane with these textures, making sure adjacen

t texture edges match each other.t texture edges match each other.– Still somewhat boring landscape.Still somewhat boring landscape.

Method 3Method 3– To make the landscape more varying, we can texturTo make the landscape more varying, we can textur

e different ecotopes with different textures.e different ecotopes with different textures. Mountain tops and hill slopes can be bare while valley floMountain tops and hill slopes can be bare while valley flo

ors can be more lush.ors can be more lush.– We blend between different textures based on the We blend between different textures based on the

strength of different ecotopes.strength of different ecotopes.

Terrain TexturingTerrain Texturing

Page 44: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Texture BlendingTexture Blending– Instead of simply blending between different Instead of simply blending between different

terrain textures, more natural edges can be terrain textures, more natural edges can be achieved by using custom textures for the achieved by using custom textures for the edges between textures.edges between textures.

Terrain TexturingTerrain Texturing

Page 45: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Texture BlendingTexture Blending– The edge tiles can be drawn so that the The edge tiles can be drawn so that the

underlying area is left transparent, allowing underlying area is left transparent, allowing the topmost texture to be simply drawn on the topmost texture to be simply drawn on top of underlying textures.top of underlying textures.

Terrain TexturingTerrain Texturing

Page 46: Rendering of Realistic Landscapes K. H. Ko Department of Mechatronics Gwangju Institute of Science and Technology October 31, 2007

Examples of Terrain Examples of Terrain Rendering & TexturingRendering & Texturing