Project Proposal
My project proposal consists of three main areas of development:
1. finish the OpenGL 3+ rendering system
2. create and update sample applications to serve as visual tests for OpenGL 3+ features
3. create and update functional and visual unit tests for the OpenGL 3+ rendering system
1. The completion of the OpenGL 3+ rendering system has a clear path. OGRE developer masterfalcon has compiled a list of extensions from each OpenGL version which remain to be implemented, so it is a matter of coding these features and developing visual tests for them. A great deal of effort will be dedicated to implementing the new shader types (geometry, tessellation, and compute), which will require work to OGRE core, as well as implementing important new features such as atomic counters, transform feedback, and programmable multisampling. The schedule below provides an overview of the pace I plan to proceed through each version of OpenGL as well as the associated features I will be implementing.
2. To both show off the capabilities of OGRE and aid in visually testing features in OpenGL 3+, I intend to create four new sample applications and update several existing ones. These samples will particularly focus on using OpenGL 3+ features to implement advanced graphics techniques. The samples I will work on are:
- update the Endless World and Volume Terrain samples: fast dynamic level of detail (LOD) using tessellation shaders to allow massive landscapes via the OGRE Terrain and Volume components [1]
- update Ocean and Water samples: realistic and efficient rain, lightning, and other weather effects (using geometry shaders) [2]
- update bump mapping sample: real-time procedural displacement mapping of character and terrain meshes to create detailed features such as scales, spikes, and cobblestone using tessellation shaders [3][4]
- new sample: single pass order-independent transparency (OIT) using image load/store and atomic counters (also useful for deferred lighting) [5]
- new sample: rendering individual strands of hair on character models (using tessellation and compute shaders) [6]
- new sample: fast Bokeh depth of field using atomic counters [7]
- new sample: mesh smoothing and anti-aliasing using a variety of contemporary techniques
- curved PN-triangles and phong tessellation for improving visual quality by smoothing corners of meshes using tessellation shaders [8][9]
- compact, smooth representation of highly detailed meshes by approximated Catmull-Clark subdivision surfaces using tessellation and geometry shaders [10]
- adaptive multisample anti-aliasing (MSAA) to efficiently reduce aliasing using programmable multisampling (especially useful for deferred lighting)
In addition to creating and extending the above sample applications, all existing sample applications will be updated to work with the OpenGL 3+ rendering system. This will mostly consist of creating OpenGL 3+ specific GLSL shaders, though some modification of the sample application scenes may be necessary in some cases. Samples which are currently known to fail and will be repaired are:
- BSP
- Compositor
- Deferred Shading
- Dual Quaternion Skinning
- Endless World
- Facial Animation
- Geometry Shader Particle System
- Grass
- Isosurface
- SSAO Techniques
- Shader System samples
- Shadows
- Terrain
- Volume CSG and RTSS triplanar texturing
- Volume Terrain
- Water
It is worth noting that both the visual tests and sample applications could be reused to test similar DirectX 11 features. This could provide a standardized means of visually testing both new rendering systems, DirectX 11 and OpenGL 3+. To this end I will attempt to coordinate my efforts on the visual tests and sample applications with the OGRE developers working on the DirectX 11 rendering system.
Schedule
Bonding period (May 27 - June 16)
Get better acquainted with Ogre core. Discuss details of implementation with mentor and community. Further research literature to identify best methods for implementing techniques used in sample applications. Coordinate efforts on visual tests and sample applications with OGRE developers working on the DirectX 11 rendering system.
First coding cycle (June 17 - July 29)
Implement OpenGL 3.x, 4.0, 4.1, and 4.2.
June 17 - June 23: Geometry and tessellation shaders fully implemented, including all core work.
- Geometry shaders (GL_ARB_geometry_shader4)
- New tessellation stages and two new corresponding shader types, tessellation control and tessellation evaluation shaders, operating on patches (fixed-sized collections of vertices) (GL_ARB_tessellation_shader)
- New compute shader (ARB_compute_shader)
- Shader atomic counters (ARB_shader_atomic_counters)
- Provide the ability for OpenGL shaders to perform random access reads, writes, and atomic memory operations on variables stored in a buffer object (ARB_shader_storage_buffer_object)
- Transform feedback (GL_EXT_transform_feedback)
- Additional transform feedback functionality (GL_ARB_transform_feedback2, GL_ARB_transform_feedback3)
- Instanced transformed feedback drawing (ARB_transform_feedback_instanced)
- Texture buffer objects (GL_ARB_texture_buffer_object)
- Fence sync objects (GL_ARB_sync) - needs performance testing
- Support for “indirect subroutine calls”, where a single shader can include many subroutines and dynamically select through the API which subroutine is called from each call site (GL_ARB_shader_subroutine)
- Multisampled textures and texture samplers for specific sample locations (GL_ARB_texture_multisample)
- OpenGL Shading Language built-in functions allowing loads from and stores to texture images from any shader stage, and application control over the ordering of image load/store operations relative to other OpenGL pipeline operations accessing the same memory (ARB_shader_image_load_store)
- Support for three-component buffer texture formats RGB32F, RGB32I, and RGB32UI (GL_ARB_texture_buffer_object_rgb32)
- Sampler objects, which separate sampler state from texture image data (GL_ARB_sampler_objects)
- Two new vertex in data formats, signed 2.10.10.10 and unsigned 2.10.10.10 (GL_ARB_vertex_type_2_10_10_10_rev)
- Non-normalized integer color internal formats for textures and renderbuffers (GL_EXT_texture_integer)
- Per-color-attachment blend enables and colorwrite masks (GL_EXT_draw_buffers2)
- ClearColor, TexParameter, and GetTexParameter methods for signed and unsigned integer buffers/arrays
- Floating-point color and depth internal formats for textures and renderbuffers (GL_NV_depth_buffer_float)
- Primitive restart (GL_NV_primitive_restart)
- BGRA vertex component ordering (GL_ARB_vertex_array_bgra)
- New blending functions whereby a fragment shader may output two colors, one of which is treated as the source color, and the other used as a blending factor for either source or destination colors (GL_ARB_blend_func_extended)
- A mechanism to swizzle the components of a texture before they are returned to the shader (GL_ARB_texture_swizzle)
- A query object-based mechanism to determine the amount of time it takes to fully complete a set of GL commands without stalling the rendering pipeline (GL_ARB_timer_query)
- Ability to set individual blend equations and blend functions for each color output (GL_ARB_draw_buffers_blend)
- Mechanism for supplying the arguments to a DrawArraysInstanced or DrawElementsInstancedBaseVertex drawing command from buffer object memory (GL_ARB_draw_indirect)
- Many new features in OpenGL Shading Language 4.00 and related APIs to support capabilities of current generation GPUs (GL_ARB_gpu_shader5)
- Ability to explicitly request that an implementation use a minimum number of unique set of fragment computation inputs when multisampling a pixel (GL_ARB_sample_shading)
- Cube map array textures, 2-dimensional array textures that may contain many cube map layers. Each cube map layer is a unique cube map image set (GL_ARB_texture_cube_map_array)
- Commands to retrieve and set the binary representation of a program object (GL_ARB_get_program_binary)
- Expose multiple viewports for use with geometry shader outputs and multiple framebuffer attachments, and floating-point viewport bounds (GL_ARB_viewport_array)
- Allow pixel storage parameters to affect packing and unpacking of compressed textures (ARB_compressed_texture_pixel_storage)
- Immutable texture images (ARB_texture_storage)
- Allow the offset within buffer objects used for instanced rendering to be specified (ARB_base_instance)
- Queries for sample counts available for a given internal format and usage (ARB_internalformat_query)
- More restrictive alignment constraints for mapped buffers (ARB_map_buffer_alignment)
By now all OpenGL 3.x, 4.0, 4.1 and 4.2 extensions should be implemented and accompanying sample tests should successfully demonstrate their use. This portion of the work will be pushed to OGRE main so that OGRE users can gain immediate benefit.
A slack week will be given to complete any unfinished work from the first coding cycle. This week will also feature debugging and visual testing and the first sample applications.
- visual tests for all implemented OpenGL 3.x, 4.0, 4.1, and 4.2 features
- update Ocean and Water samples: realistic and efficient rain, lightning, and other weather effects (using geometry shaders)
To begin, OpenGL 4.3 will be implemented, completing the major features of the OpenGL 3+ render system. A grand majority of the time will be dedicated to visual testing and advanced graphics samples to ensure the newly completed render system is bug free and ready for production use. In this coding cycle additional time will be dedicated to visual testing and debugging to ensure that the quality of the sample applications is high, ample documentation and comments are provided, and nasty show stopper bugs are squashed.
July 29 - August 4: OpenGL 4.3 features begun.
- Multi-dimensional arrays (ARB_arrays_of_arrays)
- Initialize the content of a buffer to a known value (ARB_clear_buffer_object)
- Enable efficient image data transfer between image objects without the need to bind the objects or otherwise configure the rendering pipeline (ARB_copy_image)
- Pre-assign uniform locations to uniform variables in the default uniform block, including subroutine uniforms (ARB_explicit_uniform_location)
- Make gl_Layer and gl_ViewportIndex built-in variables available to the fragment shader (ARB_fragment_layer_viewport )
- Allow use of framebuffers with no attachments (ARB_framebuffer_no_attachments)
- Allow the remainder of the texture-style targets to be specified along with any possible internal format (ARB_internalformat_query2)
- Tell the GL that the previous contents of a subregion of an image or a range of a buffer may be invalidated (ARB_invalidate_subdata)
- Invoke multiple draws from a single procedure call (ARB_multi_draw_indirect)
- Provide a single unified set of query commands that can be used by applications to determine properties of various interfaces and resources used by program objects to communicate with application code, fixed-function OpenGL pipeline stages, and other programs (ARB_program_interface_query)
- Specify the behavior of out-of-bounds buffer and array accesses (ARB_robust_buffer_access_behavior)
- Allow shaders to query the size of an image (ARB_shader_image_size)
- Allow texturing of the stencil component of a packed depth stencil texture (ARB_stencil_texturing)
- Allow a sub-range of the buffer's data store to be attached to a texture (ARB_texture_buffer_range)
- New set of texture functions that expose the number of accessible mipmap levels in the texture associated with a GLSL sampler variable (ARB_texture_query_levels)
- Immutable storage for multisampled textures (ARB_texture_storage_multisample)
- Allow a texture's data store to be "viewed" in multiple ways, either reinterpreting the data format/type as a different format/type with the same element size, or by clamping the mipmap level range or array slice range (ARB_texture_view)
- Allow the application to change the mapping between attributes and bindings (ARB_vertex_attrib_binding)
- OpenGL 4.3 visual tests and debugging
- update the Endless World and Volume Terrain samples: fast dynamic level of detail (LOD) using tessellation shaders to allow massive landscapes via the OGRE Terrain and Volume components
- update bump mapping sample: real-time procedural displacement mapping of character and terrain meshes to create detailed features such as scales, spikes, and cobblestone using tessellation shaders
- new sample: single pass order-independent transparency (OIT) using image load/store and atomic counters (also useful for deferred lighting)
- new sample: rendering individual strands of hair on character models (using tessellation and compute shaders)
- new sample: fast Bokeh depth of field using atomic counters
- new sample: mesh smoothing and anti-aliasing using a variety of contemporary techniques
- BSP
- Compositor
- Deferred Shading
- Dual Quaternion Skinning
- Endless World
- Facial Animation
- Geometry Shader Particle System
- Grass
- Isosurface
- SSAO Techniques
- Shader System samples
- Shadows
- Terrain
- Volume CSG and RTSS triplanar texturing
- Volume Terrain
- Water
- Improved OpenGL ES 2.0 compatibility by adding features previously found only in OpenGL ES 2.0 and not OpenGL 4.0 (GL_ARB_ES2_compatibility)
- Add support for features of OpenGL ES 3.0 that are missing from OpenGL 3.x (ARB_ES3_compatibility)
Suggested pencils down (September 16) and firm pencils down (September 23)
By now all major OpenGL 3.x and 4.x features have been implemented and debugged, using visual tests as a benchmark for success. These changes will be pushed to OGRE main (perhaps version 1.9 or 2.0?). Sample applications will be used to create videos on YouTube and social media outlets to promote OGRE.
My Background
I am a Ph.D. student in computational molecular physics at Rutgers University. My bachelor degrees are in computer science, physics, and biomathematics. I have been working on computer graphics and game development as a hobby on and off since 1999, but I became serious about them as a possible career choice in 2011. Since then I been studying modern shader techniques to help develop my first indie retail game. In preparation, I have been developing a variety of disposable tech demos to test out my ideas. I have been using OpenGL for practical applications since 2007 via the fixed pipeline and 2011 via shaders. I began learning OpenGL 3+ shader techniques in early 2012 and have become fairly well accustomed to their use in my tech demos. Prior to using Ogre I used my own (tiny) custom graphics engine for Windows which utilized a fixed function pipeline in OpenGL.
Why I Am The Person For This Project
My own personal still-in-development commercial project uses Ogre and OpenGL 4, so I have a vested financial interest in seeing this through to completion. My eight years of C++ experience and six years of OpenGL experience mean that I am more than capable of handling anything in Ogre core. On top of that, I live to code and love what I do. Game development and computer graphics are more than hobbies to me - they are a way of life. Possibly even a way to make a living.
While I have been using Ogre since late 2011 to make multi-platform tech demos, my first contribution to the project is implementing paging for the voxel terrain Volume component using the Paging component - a project I am a week away from completing. My prior exposure to the core of Ogre has been through investigating bugs while developing my own Ogre-based projects. This project will give me a chance to delve into the OGRE core so that I can continue to make contributions to OGRE long after this year's GSoC is over.
Why OGRE?
OGRE is my rendering system of choice because it is open source, multi-platform, has a clear and well thought out object-oriented design, and has a fantastic community. My confidence in OGRE is so great that I am using it in my first commercial indie game. Gaining more exposure to the internals of the OGRE rendering system by directly working on it myself will provide invaluable technical experience to me as a budding game developer while also giving me a chance to give back to the community that has already given me so much by making OGRE.
[1] http://codeflow.org/entries/2010/nov/07 ... sellation/
[2] http://developer.download.nvidia.com/SD ... mples.html
[3] http://http.developer.nvidia.com/GPUGem ... ter07.html
[4] https://www.sciencedirect.com/science/a ... 8512002394
[5] http://gamerendering.blogspot.com/2012/04/final.html
[6] http://http.developer.nvidia.com/GPUGem ... ter23.html
[7] https://mynameismjp.wordpress.com/2011/02/28/bokeh/
[8] https://www.cise.ufl.edu/research/SurfL ... /00ati.pdf
[9] http://perso.telecom-paristech.fr/~boub ... lation.pdf
[10] https://www.cise.ufl.edu/research/SurfL ... 08poly.pdf