Presentation is loading. Please wait.

Presentation is loading. Please wait.

INTERACTIVE EDITING OF COMPLEX TERRAINS ON PARALLEL GRAPHICS ARCHITECTURES Ufuk Gün.

Similar presentations


Presentation on theme: "INTERACTIVE EDITING OF COMPLEX TERRAINS ON PARALLEL GRAPHICS ARCHITECTURES Ufuk Gün."— Presentation transcript:

1 INTERACTIVE EDITING OF COMPLEX TERRAINS ON PARALLEL GRAPHICS ARCHITECTURES Ufuk Gün

2 Terrain Editing What is terrain editing? Implementation Editing on paged data

3 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

4 Implementation (1) Changing the primitive set data Advantages – Easy to implement Disadvantages – Slow because it needs to be recompiled.

5 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

6 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.

7 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

8 Terrain Editing on Paged Data Terrain Paging – Number of All Pages : 6x6 – Number of Viewing Pages : 3x3 – Number of Active Page : 1x1

9 Terrain Editing on Paged Data Terrain Paging on Borders – Number of All Pages : 6x6 – Number of Viewing Pages : 2x2 – Number of Active Page : 1x1

10 Terrain Editing on Paged Data Moving the active page – Number of All Pages : 6x6 – Number of Common Pages : 1x3

11 Terrain Texturing Texture Painting Slope Based Texturing Procedural Texturing Texturing with Satellite Image Lightmap Other Colorings

12 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 = x – Size on Disk ~= 95GB

13 Texture Painting – Alphamap Approach Alphamaps are textures that shows the placement of detail textures Each channel of alphamap image represents one detail texture placement

14 Texture Painting – Alphamap Approach Result Image Red : Grass.jpg Green : Sand.jpg Blue : Water.jpg

15 Texture Painting – Base Texture Color terrain roughly Decrease the effect of repeating detail textures Before After

16 Texture Painting – Base Texture Alphamap Detail Textures Base Texture Result

17 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

18 Precedural Texturing Terrain texturing with the height values – Top : Snow.jpg – Middle : Sand.jpg – Bottom : Grass.jpg Applied on CPU side

19 Texturing with Satellite Images Tiling texture with a satellite image Satellite image can be retrieved by GIS tool

20 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

21 Lightmaps Day Sunset Night Lightmap Texture

22 Other Colorings Coloring by Height Terrain Grids Contour Lines Editing Circle&Square

23 Coloring by Height Terrain coloring by height values It is used for analysis Height ValuesColors Values (Red, Green, Blue)Color 00, 0, , 170, , 255, , 170, , 0, , 170, 127

24 Other Colorings Terrain GridContour Lines

25 Paged Terrain LOD Simplification Algorithm Tiled Block Methods – Paged Tiled Blocks – Merged Paged Tiled Blocks Threaded Loading Simplified Pages

26 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)

27 Paged Terrain LOD - Simplification An example of simplification

28 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

29 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

30 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

31 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

32 Paged Terrain LOD Threaded Simplified Paged LOD Simplification – Elimination of vertices by discarding half of them Advantages – Fast – Easy to handle

33 Paged Terrain LOD Threaded Simplified Paged LOD An example of LOD LOD = 0LOD = 1LOD = 2

34 Paged Terrain LOD Threaded Simplified Paged LOD No LODLOD

35 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. 256x256128x12864x6432x321x1

36 Texture LOD Advantages –Reduces memory consumption of the application –Increases rendering performance –Decreases the loading time

37 Texture LOD No LOD LOD

38 Performance of LOD Terrain SizeNumber of PagesNo LOD (FPS)LOD (FPS) 1024 x x x x x x x x x x x x 26N/A x x 28N/A x x 32N/A48

39 Parallel Rendering Why Parallel Rendering? Increase visual quality Inrease screen size Create Dom or Cube display systems Equalizer OpenSceneGraph (OSG) Configuration Advantages Results

40 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

41 OpenSceneGraph - OSG An open source, cross-platform graphics toolkit for developing graphics applications. Based on Scene Graph and Object Oriented Framework Performance abilities: –V iew- F rustum C ulling –O cclusion C ulling –S mall feature C ulling – Level of Detail nodes – OpenGL state sorting –V ertex arrays –V ertex B uffer O bjects – OpenGL Shader Language –D isplay lists

42 Parallel Rendering Configuration –Multiple graphic cards –Multiple computers Our configuration –1 PC x 3 GPU x 2 Output = 6 Display

43 Application Terrain Editor Multi-Screen Terrain Viewer

44 Terrain Editor - Abilities Heightmap manipulation Texture manipulation Object Management –Model –Road –River –Water –Vegetation GIS integration Creating and editing of large area terrains

45 Terrain Editor - Demo

46 Multi-Screen Terrain Viewer Multi-Screen display Rendering large area terrains Paged LOD Configurable setup View-Frustum Culling

47 Multi-Screen Terrain Viewer - Demo

48 Achievements Large Area Terrain Editor GIS integration Paged LOD Mechanism Multi-Screen Display Viewing and Parallel Rendering of a Terrain

49 Limitations Number of pages viewing at the same time Camera speed Area of the terrain

50 Future Work Multi-Resolution Terrain Editing Crack Avoidance Mechanism Editing on LOD Real-Time Terrain Deformation Number of Threads

51 Thanks

52 Questions?


Download ppt "INTERACTIVE EDITING OF COMPLEX TERRAINS ON PARALLEL GRAPHICS ARCHITECTURES Ufuk Gün."

Similar presentations


Ads by Google