Project information

Discussion thread: http://www.ogre3d.org/forums/viewtopic.php?f=13&t=77133
Mercurial repository: https://bitbucket.org/sasu_robert/ogre3d-directx11

List of tasks

This is the first list. As I will arrive to the main features, which has estimated time in days I will split them in more tasks which will consist a work of maximum a day.

IDTitleState(declared, active, done, canceled)Estimated timeActual working timeDependencies
1Correcting the remaining samples active 5 days 14 days -
2 Improving core features for DirectX 11 Render System DONE 4 weeks 4 weeks -
2.1 Immutable state objects DONE 3 days 1 day -
2.2 Read back depth/stencil buffer as texture DONE 3 days 6 days -
2.3 Support new texture codecs BC7/BC6 DONE 3 days 1 day -
2.4 Multithreaded rendering inactive/discontinued 5 days - -
2.5 Texture unit support for tessellation stages - displacement mapping support DONE 7 days 7 days -
3 Terrain tessellation active 7 days 14 days hours 2.5 Displacement mapping support
4 Water tessellation and Island sample active 7 days 7 days 2.5 Displacement mapping support
5 Implementing NVidia's hair sample active 7 days 6 days -
6 Improve Ogre3D on winRT postponed 7 days - -



The list of the samples which have visual bugs or which are crashing (I will add this list also to the wiki page):

ID Sample Problem State
1. BSP - DirectX 11 Render System needs at least Shader Model 4.0. open
2. Bump Mapping vertex pixel shader linkage error resolved
3. Compositor - ASCII (there is just a black screen), HDR, Motion Blur(there are problems with the shaders, there are not compatible with D3D11) open
4. Deferred shading - cannot bind render target view. The system is waiting for it, but it is never bound. open
5. Dual quaternion - there is no technique supported by D3D11 - it needs new shaders. open
6. Endless world + Terrain there is a format problem when creating terrain float32 vs R16G16_SINT (this is not recognized by D3D11) ID3D11Device::CreateInputLayout resolved
7. Facial animation - multiple visual bugs when animating - still investigating why open
8. New Instancing Some of the shaders are corrected, there are still some minor issues open
9. SSAO techniques - same problem as deferred shading sample. open
10. RT Shader System - error when trying instanced viewports open
11. Shadows - there is no fixed function pipeline on D3D11, need to rewrite shadows creation for the new render systems. open
12. Volume CSG some visual bugs - some material problems resolved
13. Volume Terrain invalid arguments to ID3D11Device::CreateTexture3D. resolved

Motivation

Tessellation feature is not really used in Ogre3D. There are just 2 simple tessellation samples in Ogre Samples (pushed by myself). This feature can do a lot more, like detailed geometry for terrain and water, adaptive tessellation for models. There is also the compute shader which can used to realistic physical simulations.
I think before braking up the compatibility of Ogre3D we have to release a proper Ogre3D version (1.9) which needs only these things: finishing render systems (D3D11 and OpenGL3+) and adding tessellation, compute shaders samples. In this way there will be a proper Ogre3D version released, and developers who are using Ogre will be able to change their code and use all the new features. After that, we can break up the compatibility and work on Ogre2.0, as it seems a work of around 1 year for me.

Project Proposal


There are lot of features from DirectX 11 which are not implemented, there are no samples created for them. Also there is a tendency of making better browser apps, so this is why an emscripten port would be beneficial.

There is one more major feature not implemented yet to DirectX 11 Render System: Multi-Device support.
The major plan of this project would be to finish correcting the samples for the DirectX 11 Render System, correct the samples (I will need some help, advices, answers) until the proper GSoC starts (May 27th), or in the worst case I will need 2 more weeks after the this date. Then I would work on core features of DirectX 11 Render System (immutable states object, read back depth/stencil buffer as texture,support new texture codecs BC7/BC6,multithreading, texture unit support for tessellation stages).As for samples I would go for the Island and Terrain sample from NVidia samples ( it uses tessellation stage to render detailed geometry for both terrain and water), PN-Patches (PN-Triangles and PN-Quads) tessellation - which is almost finished and the Hair sample (tessellation and compute shaders, this sample simulates and renders physically realistic hair in real-time). I will look for more samples, techniques on the NVidia GPU Gem book series.
I think 3 weeks for every sample would be enough. While working on the samples I will discuss with the community how to improve Ogre3D on winRT. So on the last part of the GSoC I would work exclusively on winRT operating system to improve the workflow of Ogre3D.

So here is the list:
1. Correcting the remaining samples.
2. Improving core features for DirectX 11 Render System: immutable states object, read back depth/stencil buffer as texture,support new texture codecs BC7/BC6, multithreading, texture unit support for tessellation stages (hull, domain shaders) - displacement mapping support 0 1
Detailed information about these features are on a later post.
3. More complex PN-Patches tessellation (PN-Triangles and PN-Quads) - this could be finished before GSoC starts. 2
4. Island and Terrain sample from NVidia samples (tessellation to render detailed geometry, terrain and water) 3 4
5. Hair sample - using tessellation to render physically realistic hair in real-time 5
6. Improving Ogre3D on winRT.

Schedule

First period - from now to 17 June:
Actively interact with my mentor and Ogre3D community to discuss final details. Correct those samples which are not working now on the DirectX 11 Render System and finish the current PN-Patches tessellation sample. Also add texture unit support for tessellation stages (hull and domain shaders) and work on displacement support/sample. After 7 June I will be able to work intensively, because it is the last day of the exam session for this year.

Official coding time start - 17 June to 2 Aug
If it is needed I will alloc one more week for correcting correcting the Ogre samples - not easy bugs.

1. Improve core features - 4 week : (7 June - 20 July) - immutable states object, read back depth/stencil buffer as texture,support new texture codecs BC7/BC6, multithreading, texture unit support for tessellation stages. I will allocate around 1 week for each core improvement, one day for adding support for new texture codecs (BC6/BC7)
2. Terrain and Island sample from NVidia - 14 days: (14 July - 2 Aug) - implementing this sample which uses tessellation stage to render complex geometry for water and terrain. Terrain sample uses tessellation stages to generate terrain.

Midterm deadline 2 Aug
At this moment all the Ogre3D samples will work on the DirectX 11 Render System. There will be also some performance gain because of the new features and will support new texture codecs. PN-Patches algorithm will be finalized. The Island sample will be also implemented and ready to test and try. There will be also a working sample of terrain tessellation.

Second coding part 2 Aug - 16 Sept

1. Hair sample - 3 weeks: (2 Aug - 21 Aug) - implementing this sample which uses compute shaders and tessellation stages for rendering physically realistic hair.
2. Ogre3D and winRT - 21 Aug - 16 Sept - I will work exclusively on winRT operating system to improve Ogre3D and gain as much performance as possible.


Suggested firm pencil's down (16 Sept)
Ogre3D will benefit of new samples, using the newest technologies - tessellation stages and compute shaders. Moreover the DirectX 11 Render System will be updated and will have more new features, supporting multi-threading and new texture codecs, it will also have a better performance because of multi-threading, the use of immutable state object and by using the possibility to use depth/stencil buffer as textures. It will also have a displacement sample and texture unit support for tessellation stages. Finally, Ogre3D will work better on the winRT operating system, will have a much better performance.

After GSoC
After Google Summer of Code ends I want to help developing the future releases: Ogre2.0, Ogre2.1 and so on. Also I will add multi-device support for DirectX 11 Render System after finishing all the above listed features.

Why You're The Person For This Project

The community probably knows me from the last years Google Summer of Code. But here is my personal description.

My name is Robert Sasu and I study Computer Science at Polytechnic University of Bucharest, Romania. I had participated to GSoC 2011 at GIMP organization on the project Porting Gimp plug-ins to GEGL. Here is a link to my showcase and code: http://sasurobert.github.com/GSoC-2011/
I have participated to GSoC 2012 at Ogre3D on the project Complete DirectX 11 Render System, the project become to big to be able to finish it in 3 months time (I've committed a changeset of more then 20k lines of code.) After Google Summer of Code 2012 I have actively worked on my repo and resolved DirectX 11 Render System related bugs, also helped community members if they had questions. I have also submitted ideas to SkyX Ogre3D related project. Moreover I worked and I am working as a part-time student on a AeroPlane simulator (urlartmacs.com/url) where I am using Ogre3D 1.7 as graphic engine, using DirectX 9 Render System.
I do have my repository of Ogre3D and have some followers. I am continuously pushing code there, correcting bugs.

I would like to participate to GSoC 2013 and I found the project described above interesting. I have strong background in C/C++,C#, Java, Haskel, CLIPS programming, shader language (cg, hlsl) and algorithms. I really like mathematics:I recently participated to SEEMOUS (seemous.eu) and I earned a silver medal. First year of the faculty I attended a Microsoft course where we learnt how create games, terrains (rendering stuff) using C# with XNA 4.0. It was really fascinating how many things are implemented in this library and how efficient is it working, using the video card to the maximum. Through this course I've also done some basic DirectX 9 and 10 coding, some basic rendering.

Why OGRE?

OGRE is a great 3D graphics library. The main use case for this project is of course completing the DirectX 11 rendering system, which will be really useful for Windows 8 and all the new videocards which are capable of using DirectX 11.

Anything else

Ogre appears to have a very friendly and helpful community. I've already got a lot, learnt a lot by reading all the answers regarding my proposal, and reading all the proposed documentation for me. It is really nice of how fast is the community answering the questions. It would be a great opportunity for me to take part of this community and to work on Ogre3Ds core.

Detailed description of core work:

Multi-threaded rendering - multithreading for DirectX 11

First, improvements in synchronization between the Direct3D device object and the driver enable asynchronous API calls, including resource allocations. Direct3D 11 allows developers more freedom when expressing parallelism by allowing such calls to occur across multiple threads.
Second, the Direct3D device interface now supports multiple rendering contexts. 1) a primary immediate context which dictates the timeline for work submission to the GPU, and 2) optional deferred contexts created by the application developer as needed. Work associated with each deferred context can occur on a separate thread/core. This enables GPU commands to be accumulated in parallel to the main rendering work, and then sent to the GPU later when the main context is ready to submit a new task to the GPU.
Image

Texture Unit support for tessellation stages - hull and domain shaders - and displacement mapping support

http://www.nvidia.com/object/tessellation.html

Using immutable states object : - can be precomputed and cached,

- subset of command buffer at creation time
The list of immutable state objects used by DirectX 11: Input Layout Object, Rasterizer Object, DepthStencil Object, Blend Object, Sampler Object
http://legalizeadulthood.wordpress.com/2009/07/12/description-helpers-for-direct3d-10-10-1-and-11/

Read back depth/stencil buffer as texture: Disables writes to the part that is read-only, allows for using texture as input and for depth-culling

Enables features without requiring a separate depth render
• Atmosphere pass
• Soft particles
• DOF
• Forward shadow mapping
• Screen-space ambient occlusion
http://msdn.microsoft.com/en-us/library/windows/desktop/bb205074(v=vs.85).aspx#reading_the_depth-stencil_buffer_as_a_texture

Support new texture codecs BC7/BC6

BC6H supports high-dynamic range color source data, and BC7 provides better-than-average quality compression with less artifacts for standard RGB source data.
More complex block palette interpolations, smaller amount of artifacts, high dynamic range support.
http://www.nvidia.com/content/nvision2008/tech_presentations/Game_Developer_Track/NVISION08-Direct3D_11_Overview.pdf

Weekly progress nr.1

  • Create repository by forking the official one, and create this wiki page.
  • Create a list of tasks with columns ID, Title, State (declared, active, done, canceled), Time(estimated, actual work), Dependencies
<HR>
Creative Commons Copyright -- Some rights reserved.


THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.

BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.

1. Definitions

  • "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License.
  • "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License.
  • "Licensor" means the individual or entity that offers the Work under the terms of this License.
  • "Original Author" means the individual or entity who created the Work.
  • "Work" means the copyrightable work of authorship offered under the terms of this License.
  • "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.
  • "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike.

2. Fair Use Rights

Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws.

3. License Grant

Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:

  • to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works;
  • to create and reproduce Derivative Works;
  • to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works;
  • to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works.
  • For the avoidance of doubt, where the work is a musical composition:
    • Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work.
    • Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights society or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions).
    • Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions).


The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved.

4. Restrictions

The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:

  • You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any credit as required by clause 4(c), as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any credit as required by clause 4(c), as requested.
  • You may distribute, publicly display, publicly perform, or publicly digitally perform a Derivative Work only under the terms of this License, a later version of this License with the same License Elements as this License, or a Creative Commons iCommons license that contains the same License Elements as this License (e.g. Attribution-ShareAlike 2.5 Japan). You must include a copy of, or the Uniform Resource Identifier for, this License or other license specified in the previous sentence with every copy or phonorecord of each Derivative Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Derivative Works that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder, and You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Derivative Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Derivative Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Derivative Work itself to be made subject to the terms of this License.
  • If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or (ii) if the Original Author and/or Licensor designate another party or parties (e.g. a sponsor institute, publishing entity, journal) for attribution in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit.

5. Representations, Warranties and Disclaimer

UNLESS OTHERWISE AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE MATERIALS, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.

6. Limitation on Liability.

EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

7. Termination

  • This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.
  • Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.

8. Miscellaneous

  • Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.
  • Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.
  • If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
  • No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.
  • This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.