Discussion thread: http://www.ogre3d.org/forums/viewtopic.php?f=13&t=69655
Mercurial repository: https://bitbucket.org/sasu_robert/ogre3d-d3d11
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.
|ID||Title||State(declared, active, done, canceled)||Estimated time||Actual working time||Dependencies|
|1||Test and merge the DX11 enhancement patch (ID: 3411278 - zerocomplex)||done||12 hours||10 hours||-|
|2||Test and merge the DX11 Unicode build and alpha-blending support (ID: 3502173 - zerocomplex)||done||12 hours||10 hours||-|
|3||Planning the tessellation support, adding support for Shader Models 5.0||done||3 days||16 hours||-|
|3.1||Tessellation Pattern Viewer||active||3 days||12 hours||-|
|3.2||PN-1 Triangles algorithm||declared/open||3 days||12 hour||-|
|3.3||Detailed tessellation, Brezies with displacement||declared/open||4 days||12 hours||-|
|3.4||Final tessellation, subdivision and final tests||declared/open||4 days||6 hours||-|
|7||Testing multi window support||done||3 days||2 days||-|
|8||Test and merge the DX11MRT Support patch (ID: 3448095 - crashym)||done||12 hours||12 hours||-|
|9||Test and merge the DX11Separate Scene Blending & operations patch (ID: 3439298 - crashym)||done||12 hours||12 hours||-|
|10||Test and merge the DX11 comparison filtering implementation patch (ID: 3404125 - crashym)||done||12 hours||12 hours||-|
|11||Multi-device support (copying from Directx9RS and making adjustments)||active||14 days||4 days||-|
|12||RT shader system support for shader model 4/5 with dynamic linking||active||14 days||5 hours||-|
|13||Test and merge WinRT work (eugene)||done||7 days||6 days||-|
I would like to add new features for the current DirectX 11 render system used by Ogre. This new features would be Tessellation support, multi device support, RT shader system support.
DirectX 11 is the newest rendering system made and support directly a lot of new things. It also has some changes, optimization of DirectX9/DirectX10. Tessellation is a process of creating objects by using the repetition of geometric shapes (brezier curves, triangles). RT shader system gives a real boost in time when somebody wants to make 3D graphics, as it generates the code in real time for the objects, it saves development time, and the code created is also reusable and shareble.
How will this project benefit OGRE users?
By completing the DirectX11 renderer system for Ogre3D, ogre will have all the major renderer systems working on its core. By implementing all the new features Ogre3D will do a lot more (Tessellation, RT shadering), and also all the effects created by the community will be portable.
Is this project within the core scope of OGRE?
With the addition of a few more classes the new features for this renderer system can be implemented into the Ogre engine and it is definitely within the core scope of OGRE, as it needs all the possible features for this renderer system.
This project should be within scope of the time allotted by GSoC. The foundation for the most of the features already exists thanks to previous contributors and other open-source communities. I just need to update existing code and implement the new features.
After discussing about the needed features, here is the list I would work on (I would work on them on the presented order). I will explain more in the work planning section:
1. Tessellation - support for new pipeline stages - Hull-Shader and Domain-Shader
2. Multi-window support
3. Muti-device support
4. RT shader system support for shader model 4/5 with dynamic linking
1. First part (4.3 - 5.21) - time for documentation, discussing about project and easy-coding
In this period of the program I would read as much documentation as needed (even more), discuss about the features in details with community. I would also try to start programming, some basic things (easy-coding), mostly make my detailed planning in code, creating the necessary classes, making the constructors, making header files and adding TODO comments for each section. In this way when I will start hard coding I will know exactly what to do, and will not lose time by thinking about organizing the code and stuff.
2. Second part (5.22 - 7.9) - Summer starts:
5.23 - 6.5 : I would continue to organize what I will do next and also write some raw code for some sections (also write down the major part of the algorithm to files), as tessalation feature has the biggest priority I would start with it.In this period of the year I have my final exam session, I have 6 exams in 3 weeks, so I will not be able to do many things, because I have to focus on school.
6.6 - 7.9 : For this time I would propose to work on the first 2-3 features mentioned above (depending how fast will I be able to complete these). I would leave maximum 3 weeks for the Tessalation feature with its support for the new pipeline stages and for hull-shaders and domain shaders. First working dealing with rendering convex objects, then making a general algorithm for decomposing the concaves shapes in convex object, make a list of them and run the tessalation feature for each created convex object. I will test in paralel of my work, but will make also big test after every week of work, and in case of problems will let 2 days for debugging.
7.2 - 7.5 : Do a lot of testing for the multi window support feature.
7.5 - 7.9 : Start working on the multi-device support (I would leave maximum 14 days for this feature). First I would copy the major parts of this feature from the D3D9 renderer, then will make adjustments to it to work well for D3D11. In these 4 days I would work on copying the major parts and making the code compilable and runnable.
3. Midterm evaluation (7.9 - 7.13) - cleaning up the code, completing the commentaries of the code. I would also make a showcase (probably some demos) and post it to the forum.
4. Second part of the summer program (7.14 - 8.17)
7.14-7.24 In this time I would finalize the work for the multi device support, making all the required adjustments, optimizing the code for D3D11 and adding everything as it will be discussed on the forum. On the last 3 days I would make hard testing for this feature. If I have problems with this feature after testing I will give one more week for debugging.
7.25-8.17: I would start working on the RT shader system support for shader model 4/5 with dynamic linking. This system gives a real boost in time when somebody wants to make 3D graphics, as it generates the code in real time for the objects, it saves development time, and the code created is also reusable and shareble, so you can enjoy the effects created by the community with small adjustions. I would try to do as much as possible on this feature, and if I will not be able to complete it on time, I would continue to work on it after GSoC is over.
5. Final evaluation (8.17 - 8.24) - Finishing the project, cleaning up the code and arranging it in such a way that it can be uploaded for the master branch. I would finalize my showcase of the summer work, post new demos to the forum and make a detailed post about the work I have done through GSoC.
6. After GSoC - 8.25 - undefined : First of all I would implement all the required features I hadn't time to do in the summer project. After this I would ask the community and continue coding in my spare time. I can be really active till October, then I will have to start the 3rd year of my studies, and I will have priority on the university stuff I have to do.
Why You're The Person For This Project
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 would like to participate to GSoC 2012 and I found the project called Complete the DirectX 11 render system interesting. I have strong background in C/C++,C#, Java, Haskel, CLIPS programming, algorithms. I really like mathematics:I recently participated to SEEMOUS (seemous.eu) and I earned a silver medal. Last year 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. I've read a lot about this project on this forum and I've also downloaded the code from github. I've made a small game engine for pong games 4 years ago in C. When I was in high school I used Ogre3D for a lot of small projects, mostly because it was a good way to learn about computer graphics.
I am really fascinated by computer graphics, and I know I can learn a lot and to make a good job.
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.
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.
Weekly progress nr.1
- Create repository by forking the official one, and create this wiki page.
- Code review of the open patches regarding the DirectX 11 render system
- Code review of Eugene's work on Ogre's WindowRT support and changes made to the DirectX11 Render System
- Create a list of tasks with columns ID, Title, State (declared, active, done, canceled), Time(estimated, actual work), Dependencies
Weekly progress nr.2
- Reading/learning more from DirectX 11 SDK - preparing for actual coding
- Finished some more Ogre tutorials - preparing for actual coding
- Discussing with cherlix how should tasks nr. 8, 9 and 10 should be done
- Tasks nr. 8 and 9 are already done, cherlix will post about the progress on the project thread in the next days also presenting some showcase, tests.
Weekly progress nr.3
- Merged zerocomplex's code from the open patch list
- Wrote testing module for the first 2 tasks
- The plan for the tessellation support is almost done
- TO DO: testing modules for the MRT support, task nr. 8
Weekly progress nr.4
- Merged code with cherlix's work.
- Completed task nr.8, 9 and 10, by merging completely crashym's patches to the current version of D3D11 Render System.
- Added full support for hull, domain, geometry and compute shaders
- Continued work with pattern tessellation.
Weekly progress nr. 5
- Debugged texture issues
- Finished the tessellation sample, improved capabilities check in D3D11 Render System
- Finished debugging the support for Shader Model 5.0
- Finished pattern tessellation, started to work on PN-patches algorithm
Weekly progress nr. 6
- Working on multi-window support
- Added sample for multi window support, tested MRT support
- Alpha blending and texture bugfixes
Weekly progress nr. 7
- Started to work on merging the winRT
- Debugging the code
- TO DO: debugging texture, mipmaps calculation
Weekly progress nr. 8
- Finished merging Eugene's work
- Merged my code also with the latest Ogre code (v1.9)
- Started to debug all of the samples for sample browser
Weekly progress nr. 9
- Finished to debug most of the samples, 3 or 4 still don't work because of RTSS support only shader model 3.0, and D3D11 capabilities does not have it just 4.0, 4.1 or 5.0
- Started to work on multi-device support
Weekly progress nr. 10
- Continued to work on multi-device support
- Switched forcus to the last point of the GSoC because of incapability of testing multi-device (Optimus driver does not let me to use separately the second video-card: NVidie GeForce GT 640M)
Weekly progress nr. 11
- Cleaning up the code, merging with the latest Ogre code
Tessellation features plan:
I will start with implementing the Tessellation Pattern Viewer (from NVidia Graphics SKD 11 samples), after that will implement PN Triangles, Detail Tessellation, Brezier with displacement, Terrain and complex object Tessellation.
The pattern viewer tessellation simply applies the hull and domain shaders on the given content.
Algorithm for PN Triangles:
- Each flat triangle augmented to many subtriangles
- Vertices and normal interpolated from base flat triangle
- Hull Shader – basis transformation
- Hull Shader Constant Function
- Calculates control points for both vertex and normal
- Output control points except the original 3 verts
- Hull Shader
- Pass through the original 3 verts
- Hull Shader Constant Function
- Domain shader
- Calculates position and normal by using UV and control points
- Optionally do vertex lighting as well
Algorithm for Detail Tessellation:
- Break your plane into small grids
- Each grid form a tessellation patch, and each patch could have a different tessellation factor
- Calculate density map from height map
- Hull shader computes tessellation factor
- Hull shader: 3 base vertices pass-through
- Hull shader constant function: TessFactor, either from density or distance, or a combined function of the two
- Domain shader computes position of tessellated vertex
- Sample height map correctly
- Pixel shader does the normal per-pixel shading
Brezier with displacement is an extension of Detail Tessellation. Is for complex surface (terrain), correct adaptive tessellation (T junctions).