520 likes | 660 Views
INTERACTIVE EDITING OF COMPLEX TERRAINS ON PARALLEL GRAPHICS ARCHITECTURES. Ufuk Gün. Terrain Editing. What is terrain editing? Implementation Editing on paged data. Terrain Editing – What is it?.
E N D
INTERACTIVE EDITING OF COMPLEX TERRAINS ON PARALLEL GRAPHICS ARCHITECTURES Ufuk Gün
Terrain Editing • What is terrain editing? • Implementation • Editing on paged data
Terrain Editing – What is it? • Terrain editing is the manipulation of terrain mesh which is controlled by the user of the application. • There are several brushes like: • Raise, Lower, Flat, Smooth, Noise • Paint Color • Paint Texture
Implementation (1)Changing the primitive set data • Advantages • Easy to implement • Disadvantages • Slow because it needs to be recompiled.
Implementation (2) Sending height data as texture to the shaders. • Advantages • Easy to implement • No recompilation • Disadvantages • Unefficient data transfer to GPU • Culling mechanism fails
Implementation (3)Editing vertices using Vertex Buffer Object (VBO) • What is VBO? • A vertex buffer object is a feature that allows the program to store data in application memory.
Implementation (3)Editing vertices using Vertex Buffer Object (VBO) • Why it is chosen? • This method enables accessing and changing the vertex data from the application side • Decreases the amount of unnecesarily changing data • Faster because does not need to recompile
Terrain Editing on Paged Data • Terrain Paging • Number of All Pages : 6x6 • Number of Viewing Pages : 3x3 • Number of Active Page : 1x1
Terrain Editing on Paged Data • Terrain Paging on Borders • Number of All Pages : 6x6 • Number of Viewing Pages : 2x2 • Number of Active Page : 1x1
Terrain Editing on Paged Data • Moving the active page • Number of All Pages : 6x6 • Number of Common Pages : 1x3
Terrain Texturing • Texture Painting • Slope Based Texturing • Procedural Texturing • Texturing with Satellite Image • Lightmap • Other Colorings
Texture Painting – Brute Force Approach • Brute force aproach is texturing all the terrain with a very large image • Terrain size = 1024m x 1024m • Texture Resolution = 256 x 256 per meter^2 => • Texture Size = 262144 x 262144 • Size on Disk ~= 95GB
Texture Painting – Alphamap Approach • Alphamaps are textures that shows the placement of detail textures • Each channel of alphamap image represents one detail texture placement
Texture Painting – Alphamap Approach Result Image • Red : Grass.jpg • Green: Sand.jpg • Blue : Water.jpg
Texture Painting – Base Texture • Color terrain roughly • Decrease the effect of repeating detail textures After Before
Texture Painting – Base Texture Alphamap Base Texture Detail Textures Result
Slope Based Texturing • Slope Texture is used on terrain regions where slope is close to perpendicular to ground • Applied on shader with the normal value of vertices
Precedural Texturing • Terrain texturing with the height values • Top : Snow.jpg • Middle : Sand.jpg • Bottom : Grass.jpg • Applied on CPU side
Texturing with Satellite Images • Tiling texture with a satellite image • Satellite image can be retrieved by GIS tool
Lightmaps • Problem: • Light calculation is an expensive process especially when there are more than 8 lights • Solution: • Using a lightmap for static lights • Lightmap is a precalculated image that shows the illumination of the terrain
Lightmaps Lightmap Texture Day Sunset Night
Other Colorings • Coloring by Height • Terrain Grids • Contour Lines • Editing Circle&Square
Coloring by Height • Terrain coloring by height values • It is used for analysis
Other Colorings Terrain Grid Contour Lines
Paged Terrain LOD • Simplification Algorithm • Tiled Block Methods • Paged Tiled Blocks • Merged Paged Tiled Blocks • Threaded Loading Simplified Pages
Paged Terrain LOD - Simplification • What is simplified terrain? • It is a good representation of the original terrain which is produced by eliminating of vertices whose absence is not recognized. • Advantages • Loss is not recognized • Disadvantages • Simplification is an expensive process • All the detail levels should be calculated before the rendering process • Simplified terrains should be stored on disk (need memory)
Paged Terrain LOD - Simplification • An example of simplification
Paged Terrain LOD – Tile Blocks • What is Tile Blocks • Aims to render square patches with different resolutions • The resolution decreases by the distance to the view point • Around the viewer, there are nested grids • Grid resolutions differ by a factor of two
Paged Terrain LOD – Tile Blocks • Advantages • Data structure is simple • Smooth transitions • Efficient compression • Disadvantages • Cracks may occur on the borders • Pages should be merged to use this algoritm • Long preprocess • Paging cannot be applied as it should be
Paged Terrain LOD Threaded Simplified Paged LOD • What is it? • A mechanism that loads terrain data in different details on another thread • All the terrain simplification and generation process is done on another thread without decreasing the frame rates
Paged Terrain LOD Threaded Simplified Paged LOD • How does it work? • Send camera position to pages • Each page creates a thread that calculates new resolution • If resolution should be increased • Read data from disk • If resolution should be decreased • Simplify old page • Generate new terrain • If new terrain is generated • Load new terrain
Paged Terrain LOD Threaded Simplified Paged LOD • Simplification • Elimination of vertices by discarding half of them • Advantages • Fast • Easy to handle
Paged Terrain LOD Threaded Simplified Paged LOD • An example of LOD LOD = 0 LOD = 1 LOD = 2
Texture LOD • What is Texture LOD? • Using high resolution textures on regions that are close to the viewpoint and using low resolution textures that are farther from the camera. 256x256 128x128 64x64 32x32 1x1
Texture LOD • Advantages • Reduces memory consumption of the application • Increases rendering performance • Decreases the loading time
Texture LOD No LOD LOD
Parallel Rendering • Why Parallel Rendering? • Increase visual quality • Inrease screen size • Create Dom or Cube display systems • Equalizer • OpenSceneGraph (OSG) • Configuration • Advantages • Results
Equalizer • A toolkit for scalable parallel rendering based on OpenGL which provides an API to develop scalable graphics applications for wide range of systems. • Enables multiple graphic cards, processors or computers to scale rendering performance, visual quality and display size. • Scalable, flexible and compatible with less implementation overhead • Configurable
OpenSceneGraph - OSG • An open source, cross-platform graphics toolkit for developing graphics applications. • Based on “Scene Graph” and Object Oriented Framework • Performance abilities: • View-FrustumCulling • OcclusionCulling • Small feature Culling • Level of Detail nodes • OpenGL state sorting • Vertex arrays • VertexBufferObjects • OpenGL Shader Language • Display lists
Parallel Rendering • Configuration • Multiple graphic cards • Multiple computers • Our configuration • 1 PC x 3 GPU x 2 Output = 6 Display
Application • Terrain Editor • Multi-Screen Terrain Viewer
Terrain Editor - Abilities • Heightmap manipulation • Texture manipulation • Object Management • Model • Road • River • Water • Vegetation • GIS integration • Creating and editing of large area terrains
Multi-Screen Terrain Viewer • Multi-Screen display • Rendering large area terrains • Paged LOD • Configurable setup • View-Frustum Culling
Achievements • Large Area Terrain Editor • GIS integration • Paged LOD Mechanism • Multi-Screen Display Viewing and Parallel Rendering of a Terrain
Limitations • Number of pages viewing at the same time • Camera speed • Area of the terrain
Future Work • Multi-Resolution Terrain Editing • Crack Avoidance Mechanism • Editing on LOD • Real-Time Terrain Deformation • Number of Threads