This page documents the progress of the GSOC 2015 project "Improving the OSM2world GUI", see Google Summer of Code/2015/AcceptedProjects. The goal is to replace the current old fixed function pipeline in the OSM2World GUI with a modern shader based one. As well the overall look shall be improved with modern graphic effects. The code can be found at github.
Getting familar with the OSM2World codebase, JOGL and OpenGL shader programming.
Refactoring the existing rendering pipeline to allow different implementations. A common JOGLTarget interface was introduced. The old implementation resides at JOGLTargetFixedFunction and a new JOGLTargetShader was introduced. As much code as possible is shared between both implementations. The fixed function pipeline is preserved as a fallback for old hardware.
Implementing basic lighting. An ambient, diffusion, specular reflection lighting model was implemented together with phong shading.
Implementing basic one layer textures.
Extending texture support to multiple layers, supporting transparent objects with depth sorting, basic support for multiple shader programs, supporting non-area primitives (needed by some debug views) via a separate shader program.
replace deprecated screenshot export code and ImageExporter code, support backgrounds with shaders, support anisotropic filtering, started work on bumpmaps
complete bumpmap support, add MSAA support, fix ImageExporter
started work on shadow maps
completed shadow maps: transparency, automatic optimal frustum calculation, use XZBoundary from .osm file
debug shadow maps, add Percentage Closer Filtering (PCF) for blurring shadow edges, started work on shadow volumes
support for simple shadow volumes (per vertex)
Configuration File Options
joglImplementation = shaderUse the new shader based JOGL implementation with support of all the following options. Requires support for OpenGL 3.2
shadowImplementationSelect the shadowing technique.
shadowVolumesrenders only shadows casted by non-transparent objects with shadow volumes.
shadowMaprenders the shadows of all objects with a shadow map, but only the back faces (from light source view) cast a shadow.
bothuses shadow maps for transparent objects and shadow volumes for the rest. shadowMap with a high resolution is recommended if performance matters.
shadowMapHeightresolution of the shadow map in pixels
shadowMapCameraFrustumPaddingpadding in meter for the camera frustum to use for the shadow map camera. Increase here if objects outside the current camera view frustum, that should throw a shadow won't do so.
msaanumber of samples for multi sample anti-aliasing
overwriteProjectionClippingPlanesoptimize the clipping planes of the camera: reduce them to match the world bounding box
useSSAOuse screen space ambient occlusion (causes dark corners of buildings etc.)
SSAOkernelSizesize of the sampling kernel (number of samples). Higher value improves quality (less noise) but decreases performance.
SSAOradiussampling radius in meter. Higher value increases the range of the effect.
exportAlphaexport alpha channel in png export. Use true if you want a transparent background.
material_MATERIAL_NAME_specularSpecular value of the material as used in the phong lighting model
material_MATERIAL_NAME_shininessShininess value of the material as used in the phong lighting model
material_MATERIAL_NAME_shadowfalse disables the shadow casting of all objects using this material
material_MATERIAL_NAME_ssaofalse disables the ambient occlusion casting of all objects using this material
material_MATERIAL_NAME_TEXTURELAYER_bumpmaptrue uses the texture assigned for TEXTURELAYER as normal map. The normal map is used by the phong lighting model and can by used to simulate bumps in the material.