[GSoC 2013 - accepted] DirectX 11,Tessellation Samples

Threads related to Google Summer of Code
User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

[GSoC 2013 - accepted] DirectX 11,Tessellation Samples

Post by robert_sasu » Fri Apr 12, 2013 10:23 pm

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.

I will describe a detailed plan of my work in the next 2 days.

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 (artmacs.com) 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 and there are lot of project using this graphical library. The main use case for this project is to make new samples of using Tessallation stages, improve DirectX 11 Render System and improve the application on winRT operating system

PS. I've discussed these ideas with Assaf Raman. If you have any advice or question please do not hesitate. If you think this idea is not good then let me know it, and please suggest any other idea. I want to choose a challenging, hard project to learn a lot and test my limits.

[0] http://http.developer.nvidia.com/GPUGem ... ter07.html - 7.2 Displacement Mapping
[1] http://www.spot3d.com/vray/help/150SP1/ ... cement.htm
[2] https://developer.nvidia.com/sites/defa ... atches.pdf
[3] http://www.youtube.com/watch?v=EfrSaIY0YQA
[4] https://developer.nvidia.com/sites/defa ... ePaper.pdf
[5] https://developer.nvidia.com/sites/defa ... ePaper.pdf
Last edited by robert_sasu on Tue Apr 30, 2013 1:12 pm, edited 7 times in total.
0 x
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman

User avatar
saejox
Goblin
Posts: 260
Joined: Tue Oct 25, 2011 1:07 am

Re: [GSoC 2013] DirectX 11,Tessellation Samples,Emscripten p

Post by saejox » Mon Apr 15, 2013 10:07 pm

Emscripten port is great idea, but i don't think its a 3 week project.

You need to convert whole openGL render system to be compatible with emscripten WebGL. Emulate the non supported functionality.
You need write a whole new asyncronous resource loading system. Web platform doesn't have concept of load from disk. All of them needs to be streamed from network.
Javascript is strictly single threaded, you need some sort of time-slicing to keep the framerate steady. You can't say createEntity("sinbad.mesh") because it'll lock the engine.
Javascript performace is good, but js is so different from c++. Direct conversion will be causing stuttering all the time. Coding high performance code with js is like a dance with the garbage collector. Every allocation is a speed trap.
Recreating samples is major undertaking.

Emscripten port should be a proposal just by itself.
That's what i think anyways.
0 x
Nimet - Advanced Ogre3D Mesh/dotScene Viewer
asPEEK - Remote Angelscript debugger with html interface
ogreHTML - HTML5 user interfaces in Ogre

User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: [GSoC 2013] DirectX 11,Tessellation Samples,Emscripten p

Post by robert_sasu » Tue Apr 16, 2013 7:09 am

I did not think it is possible to do the emscripten port in 3 weeks. I thought I will start it at the end of GSoC after finishing all the new samples, tessellation related features. I would be a great kick off start for this project on those 3 weeks, and I am also free until mid November, so there is plenty of time for me to finish :).
I know it is a lot of work and a lot of transformations and there is a lot of differences between Javascript and C++. But I think I can do this, not in 3 weeks, but in the next 2 months after GSoC ends, if there will be noone taking this part of the proposal :).
That part of the proposal was for the future works I will do for Ogre3D.

Thanks for your opinion :)
0 x
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman

User avatar
Zonder
Gargoyle
Posts: 1088
Joined: Mon Aug 04, 2008 7:51 pm
Location: Manchester - England
x 5

Re: [GSoC 2013] DirectX 11,Tessellation Samples,Emscripten p

Post by Zonder » Tue Apr 16, 2013 7:55 am

Threading is available on all latest browsers see here for availability http://caniuse.com/webworkers
0 x
There are 10 types of people in the world: Those who understand binary, and those who don't...
My Blog - http://www.This post is suspected as SPAM! If you feel otherwise contact a moderator.

User avatar
Wolfmanfx
OGRE Team Member
OGRE Team Member
Posts: 1525
Joined: Fri Feb 03, 2006 10:37 pm
Location: Austria - Leoben
x 1
Contact:

Re: [GSoC 2013] DirectX 11,Tessellation Samples,Emscripten p

Post by Wolfmanfx » Tue Apr 16, 2013 8:10 am

I want to see more core work - port to js is not.
Focus more on the DX11 RS
* Immutable states object
* Read back depth/stencil buffer as texture (impl this fir other RS via hacks)
* Support new texture codecs BC7/BC6
* Try to utilize multithreading with DX11
...

Also we could improve our workflow regarding winRT.
0 x

User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: [GSoC 2013] DirectX 11,Tessellation Samples,Emscripten p

Post by robert_sasu » Tue Apr 16, 2013 1:48 pm

Thanks for your advice. Taking this in consideration, I describe here how I change my proposal: I will take out the emscipten port from the proposal, and change the timeline of my work.
I will work on core, using the ideas given, after I finish the multi-device support for DirectX 11. Then I will start working on these core features and I would leave all the work which regards winRT for the last part of GSoC. I will discuss with the community how to improve the workflow for winRT operating system, while I will work on the other features.
0 x
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman

User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: [GSoC 2013] DirectX 11,Tessellation Samples

Post by robert_sasu » Mon Apr 22, 2013 7:34 am

@ja0335 found out that there is a hole in the DirectX 11 Render System, such that there is no way to sample textures from domain and hull shaders, tessellation stages. This problem is that there is no texture unit support for these 2 shaders: binding_type <vertex|fragment|hull|domain>.
We need code like this for hull and domain shaders, and proper support:

Code: Select all

mDevice.GetImmediateContext()->DSSetShaderResources(static_cast<UINT>(0), static_cast<UINT>(opState->mTexturesCount), &opState->mTextures[0]);
mDevice.GetImmediateContext()->HSSetShaderResources(static_cast<UINT>(0), static_cast<UINT>(opState->mTexturesCount), &opState->mTextures[0]);
I will add implementing this feature to my core work on the proposal.
These changes are a must when adding a displacement sample, support [1]

[1] http://www.spot3d.com/vray/help/150SP1/ ... cement.htm
0 x
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman

User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: [GSoC 2013] DirectX 11,Tessellation Samples

Post by robert_sasu » Thu Apr 25, 2013 4:21 pm

Texture unit support for tessellation stages (hull and domain shaders) is a must for the new type of terrain and water samples made by NVidia, as they are using displacement mapping exclusively with tessellation. There is another type of displacement mapping in pixel shader but that is not so fast as the new one which uses tessellation shaders to do this.
0 x
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman

User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: [GSoC 2013] DirectX 11,Tessellation Samples

Post by robert_sasu » Mon Apr 29, 2013 11:24 am

After discussing the proposal with @Assaf Raman I will shift my focus to improving core features and because of this I will take out the multi-device support and add more time for making core improvements. D3D11 much to offer with its improved features. I will add around 3 weeks more time for core improvement, that will make a total of 5 weeks. The features I will be working on that period are:

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

2. Texture Unit support for tessellation stages - hull and domain shaders - and displacement mapping support
http://www.nvidia.com/object/tessellation.html

3. 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/ ... -1-and-11/

4. 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 ... _a_texture

5. 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/nvision20 ... erview.pdf

More performance increase here: ftp://download.nvidia.com/developer/cud ... review.pdf
0 x
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman

User avatar
masterfalcon
OGRE Team Member
OGRE Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
Contact:

Re: [GSoC 2013] DirectX 11,Tessellation Samples

Post by masterfalcon » Mon Apr 29, 2013 3:47 pm

You may want to adjust the time to spend on BC6/7. I already added support for them while working on GL3+. So you probably just need to add equivalents for the pixel formats to get it working in DX11.
0 x

User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: [GSoC 2013] DirectX 11,Tessellation Samples

Post by robert_sasu » Tue Apr 30, 2013 1:09 pm

Thanks:-). I followed your work regarding OpenGL3+ render system, but I missed this update. I will look into your code and make the necessary changes to my proposal. In this case I will allocate 1 day for adding support for new texture codecs (BC6/BC7).
0 x
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman

User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4291
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 2
Contact:

Re: [GSoC 2013 - accepted] DirectX 11,Tessellation Samples

Post by spacegaier » Mon May 27, 2013 8:13 pm

Congratulations! This proposal has been selected as one of our this year's GSoC projects!

Best of luck and happy coding :)!


Mentor: Assaf Raman
0 x
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...

PhilipLB
Google Summer of Code Student
Google Summer of Code Student
Posts: 550
Joined: Thu Jun 04, 2009 5:07 pm
Location: Berlin

Re: [GSoC 2013 - accepted] DirectX 11,Tessellation Samples

Post by PhilipLB » Mon May 27, 2013 10:31 pm

Yay, congratz. :)
0 x
Google Summer of Code 2012 Student
Topic: "Volume Rendering with LOD aimed at terrain"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Mattan Furst


Volume GFX, accepting donations.

TheSHEEEP
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 972
Joined: Mon Jun 02, 2008 6:52 pm
Location: Berlin

Re: [GSoC 2013 - accepted] DirectX 11,Tessellation Samples

Post by TheSHEEEP » Tue May 28, 2013 7:48 am

Congratulations! :)
0 x
My site! - Have a look :)
Also on Twitter - extra fluffy

User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: [GSoC 2013 - accepted] DirectX 11,Tessellation Samples

Post by robert_sasu » Tue May 28, 2013 8:45 pm

Thanks for accepting me :). Also, congratulations to all the other accepted students.

I have had some weeks like hell, with a lot of homework, projects to be finished in the last 3 weeks of this years school. Now I have a 3 week final session, with 5 exams. Today was the first, still 4 remaining. I will try to resolve some bugs during these weeks, when my final session will be finished I will start working on implementing the listed features :).
0 x
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman

User avatar
ja0335
Gremlin
Posts: 154
Joined: Sun Jun 07, 2009 9:04 pm
Location: Bogotá, Colombia
Contact:

Re: [GSoC 2013 - accepted] DirectX 11,Tessellation Samples

Post by ja0335 » Thu May 30, 2013 5:29 pm

Hi Robert...

Currently i am in a new project, implementing Ogre3D into SoftImage, I will use as a primary render Directx 11 and if possible and ready to use OpenGL 3, this mean i will have contact whit the core a lot of time and i will try help you with the GSoC.
0 x
Juan Camilo Acosta Arango

User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel

Re: [GSoC 2013 - accepted] DirectX 11,Tessellation Samples

Post by Assaf Raman » Sat Jun 01, 2013 6:38 pm

Congratulations, get ready to do some hard work. :mrgreen:
0 x
Watch out for my OGRE related tweets here.

User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: [GSoC 2013 - accepted] DirectX 11,Tessellation Samples

Post by robert_sasu » Sun Jun 02, 2013 6:57 pm

I am looking forward to start working and to do the best possible job :). Thanks @Assaf Raman and @ja0335.
I will create in the next few days, when I will have some free time a table like last year with all the tasks which will be done through this year. I will also detail all the current bugs, description and possible way to resolve it. Finally I will add all these to the project wiki page.
0 x
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman

User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: [GSoC 2013 - accepted] DirectX 11,Tessellation Samples

Post by robert_sasu » Tue Jun 18, 2013 4:59 pm

Today I have created the wiki page and made a new, clean repo for this summers work. I changed my signature, to have the proper links.
I have also tested each sample to see what problems are there. Strangely Bump Mapping sample is not working now, there is some shader linkage error there. But I will resolve it by looking at the differences between my old repo (where this sample was working and the new one). The same is with ASCII compositor.

Here is the list of the samples which have visual bugs or which are crashing (I will add this list also to the wiki page):
1. BSP - DirectX 11 Render System needs at least Shader Model 4.0.
2. Bump Mapping - vertex - pixel shader linkage error.
3. Compositor - ASCII (there is just a black screen), HDR, Motion Blur(there are problems with the shaders, there are not compatible with D3D11)
4. Deferred shading - cannot bind render target view. The system is waiting for it, but it is never bound.
5. Dual quaternion - there is no technique supported by D3D11 - it needs new shaders.
6. Endless world + Terrain - there is a format problem when creating terrain float32 vs R16G16_SINT (this is not recognized by D3D11) ID3D11Device::CreateInputLayout
7. Facial animation - multiple visual bugs when animating - still investigating why
8. New Instancing - multiple visual bugs, nothing is really rendered, the shaders are incorrect for this RS.
9. SSAO techniques - same problem as deferred shading sample.
10. RT Shader System - error when trying instanced viewports
11. Shadows - there is no fixed function pipeline on D3D11, need to rewrite shadows creation for the new render systems.
12. Volume CSG - some visual bugs - some material problems
13. Volume Terrain - invalid arguments to ID3D11Device::CreateTexture3D.
0 x
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman

User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel

Re: [GSoC 2013 - accepted] DirectX 11,Tessellation Samples

Post by Assaf Raman » Tue Jun 18, 2013 7:36 pm

Note - there seems to be issues with many of the samples when using feature set 9.1 - can you have a look?
0 x
Watch out for my OGRE related tweets here.

User avatar
ja0335
Gremlin
Posts: 154
Joined: Sun Jun 07, 2009 9:04 pm
Location: Bogotá, Colombia
Contact:

Re: [GSoC 2013 - accepted] DirectX 11,Tessellation Samples

Post by ja0335 » Wed Jun 19, 2013 12:16 am

Today i have made changes in the material serializer to allow the write of tessellation hull, tessellation domain, and geometry shaders. and in the OgreD3D11RenderSystem.cpp i added a temporary texture binding for the tessellation stages. My question is how can i commit the changes now? (You changed the repository :lol: )
0 x
Juan Camilo Acosta Arango

User avatar
ja0335
Gremlin
Posts: 154
Joined: Sun Jun 07, 2009 9:04 pm
Location: Bogotá, Colombia
Contact:

Re: [GSoC 2013 - accepted] DirectX 11,Tessellation Samples

Post by ja0335 » Wed Jun 19, 2013 12:22 am

One thing more...

I just want to share the advances in the project. Here is the displacement test using a model from the PN-Patches sample provided by Nvidia.
I hope you like it :wink:

Image
0 x
Juan Camilo Acosta Arango

User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: [GSoC 2013 - accepted] DirectX 11,Tessellation Samples

Post by robert_sasu » Wed Jun 19, 2013 7:56 am

@Assaf Raman - I will look at the samples today, I will set feature level to 9.1 and try to analyze each bug.

@ja0335 I will give you permissions to commit and do changes to this new repo, like to the old one :). I am very happy to hear that displacement mapping is working.
As for the problem of streaming out the output from each pass, I am making a simple program to test it and try to call the method CreateGeometryShaderWithStreamOutput . Probably I will have an answer today :).
0 x
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman

User avatar
robert_sasu
Google Summer of Code Student
Google Summer of Code Student
Posts: 238
Joined: Mon Apr 02, 2012 11:07 am

Re: [GSoC 2013 - accepted] DirectX 11,Tessellation Samples

Post by robert_sasu » Wed Jun 19, 2013 2:51 pm

@Assaf Raman - I can't run sample browser if I set maximum feature level to 9.1. I get a memory access violation error on line 160 at OgreSharedPtr.h for the variable prep.

@ja0335 - I think you need a RenderToVertexBufferSharedPtr object which you create from the HardwareBufferManager and set a material for it. If you want to reset it you just set that option. After settting everything to this object you need to bind it to your MovableObject. If you need to add elements to this object, you get a pointer to its vertex declaration and you can set there everything.

Code: Select all

		//Generate the RenderToBufferObject
		RenderToVertexBufferSharedPtr r2vbObject = 
			HardwareBufferManager::getSingleton().createRenderToVertexBuffer();
		r2vbObject->setRenderToBufferMaterialName("GeometryShader");
		
		//Apply the random texture
		TexturePtr randomTexture = RandomTools::generateRandomVelocityTexture();
		r2vbObject->getRenderToBufferMaterial()->getBestTechnique()->getPass(0)->
			getTextureUnitState("RandomTexture")->setTextureName(
			randomTexture->getName(), randomTexture->getTextureType());

		r2vbObject->setOperationType(RenderOperation::OT_POINT_LIST);
		r2vbObject->setMaxVertexCount(16000);
		r2vbObject->setResetsEveryUpdate(false);
		
		//Bind the two together
		mMovableObject->setRenderToVertexBuffer(r2vbObject);
This is how the rendersystem work when you ask Geometry shader to stream the output:

Code: Select all

    void D3D11HLSLProgram::reinterpretGSForStreamOut(void)
    {
        assert(mGeometryShader);
        unloadHighLevel();
        mReinterpretingGS = true;
        loadHighLevel();
        mReinterpretingGS = false;
    }
reinterpretGSForStreamOut is called from D3D11RenderToVertexBuffer::setupGeometryShaderLinkageToStreamOut(Pass* pass), which method is cakked by the RenderToVertexBuffer objects update method.

I hope I was clear with the explanation, if there is anything else please ask :).
0 x
Google Summer of Code 2013 Student
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman

User avatar
Assaf Raman
OGRE Team Member
OGRE Team Member
Posts: 3092
Joined: Tue Apr 11, 2006 3:58 pm
Location: TLV, Israel

Re: [GSoC 2013 - accepted] DirectX 11,Tessellation Samples

Post by Assaf Raman » Wed Jun 19, 2013 2:58 pm

I'll try to fix it for you.
0 x
Watch out for my OGRE related tweets here.

Post Reply