[GSoC 2012] Complete the DirectX 11 render system
- ja0335
- Gremlin
- Posts: 154
- Joined: Sun Jun 07, 2009 9:04 pm
- Location: Bogotá, Colombia
- x 4
- Contact:
Re: [GSoC 2012] Complete the DirectX 11 render system
This new feature in Ogre is really awesome.
Bellow is a video about the implementation i have done in Parametric PN-Triangles Tessellation
Really, really congratulation to robert_sasu and the previous work from Assaf Raman
http://www.youtube.com/watch?v=miKcF1vs ... e=youtu.be
[youtube]http://www.youtube.com/watch?v=miKcF1vs ... e=youtu.be[/youtube]
Bellow is a video about the implementation i have done in Parametric PN-Triangles Tessellation
Really, really congratulation to robert_sasu and the previous work from Assaf Raman
http://www.youtube.com/watch?v=miKcF1vs ... e=youtu.be
[youtube]http://www.youtube.com/watch?v=miKcF1vs ... e=youtu.be[/youtube]
Juan Camilo Acosta Arango
-
- Gnoblar
- Posts: 5
- Joined: Thu May 21, 2009 12:13 pm
Re: [GSoC 2012] Complete the DirectX 11 render system
Hi Robert.
I was away from the project, now working with Unity3d. But I'm very pleased that my work can help you in this GSoC.
Congratulations, this is a great work that will greatly improve Ogre.
I was away from the project, now working with Unity3d. But I'm very pleased that my work can help you in this GSoC.
Congratulations, this is a great work that will greatly improve Ogre.
- robert_sasu
- Google Summer of Code Student
- Posts: 237
- Joined: Mon Apr 02, 2012 11:07 am
- x 42
Re: [GSoC 2012] Complete the DirectX 11 render system
Thanks . ja0335 that is a really nice video and sample . I was away for the last 10 days. I will start again to work here (a little bit slower), on bugfixes and further feature implementations .
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
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
- Xavyiy
- OGRE Expert User
- Posts: 847
- Joined: Tue Apr 12, 2005 2:35 pm
- Location: Albacete - Spain
- x 87
Re: [GSoC 2012] Complete the DirectX 11 render system
Awesome! Can't wait to see the DX11 RS a little more tested and showcased!robert_sasu wrote:Thanks . ja0335 that is a really nice video and sample . I was away for the last 10 days. I will start again to work here (a little bit slower), on bugfixes and further feature implementations .
Creator of SkyX, Hydrax and Paradise Sandbox.
Looking for Ogre3D consulting services?
Follow me: @Xavyiy
Looking for Ogre3D consulting services?
Follow me: @Xavyiy
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: [GSoC 2012] Complete the DirectX 11 render system
We do needed some better d3d11 features samples in the sample browser.
Watch out for my OGRE related tweets here.
-
- Gnoblar
- Posts: 7
- Joined: Thu Sep 13, 2012 4:19 am
Re: [GSoC 2012] Complete the DirectX 11 render system
This is awesome work. Serious congrats to robert_sasu and Assaf!
I have been playing with the few samples (that are currently working - I realize more work is to be done) - noticed that the performance is really bad (hardly getting 20fps).
I am looking at the WinRT D3D11 render system code and it was strange to see the use of a SurfaceImageSource. MSDN says that this is going to be slow. Is there a preference to use this instead of the high-performance SwapChainBackgroundPanel?
Every time you call BeginDraw/EndDraw, the surface is going to be blitted on the XAML end - plus the allocation of a new surface each frame. I believe this was intended for small surface updates (hence the rect being passed to begindraw) as the MSDN site explains. Plus there is an extra CopySubresourceRegion call as well from Ogre end (see swapBuffers).
Am I the only one seeing bad perf?
I have been playing with the few samples (that are currently working - I realize more work is to be done) - noticed that the performance is really bad (hardly getting 20fps).
I am looking at the WinRT D3D11 render system code and it was strange to see the use of a SurfaceImageSource. MSDN says that this is going to be slow. Is there a preference to use this instead of the high-performance SwapChainBackgroundPanel?
Every time you call BeginDraw/EndDraw, the surface is going to be blitted on the XAML end - plus the allocation of a new surface each frame. I believe this was intended for small surface updates (hence the rect being passed to begindraw) as the MSDN site explains. Plus there is an extra CopySubresourceRegion call as well from Ogre end (see swapBuffers).
Am I the only one seeing bad perf?
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: [GSoC 2012] Complete the DirectX 11 render system
Yes, give us some specs and also, try to run in release and not debug.
BTW: What do you mean by XAML? are you running the WinRT compile?
BTW: What do you mean by XAML? are you running the WinRT compile?
Watch out for my OGRE related tweets here.
-
- Gnoblar
- Posts: 7
- Joined: Thu Sep 13, 2012 4:19 am
Re: [GSoC 2012] Complete the DirectX 11 render system
Yep, I run in release - either gives about the same perf. Around 15fps - 20fps max.
Running the desktop version nets 100 or more fps for the same samples.
So, the WinRT port of the sample browser uses native XAML - the code passes in the CoreWindow and such to the D3D11 code and then the D3D code connects its swapchain with a XAML element inside this CoreWindow that the sample browser passes in. All of this is in native C++, but the XAML higher-level UI code is in C++ /Cx which has language extensions (sorry if I am repeating things you already know). The underlying DLLs that are in pure C++ talking with actual D3D code interface with this C++ /Cx code using ABIs exported by the OgreMain, RenderSystem DLLs.
See http://msdn.microsoft.com/en-US/library ... s/hh825871 for more details - especially the last part about SwapChainBackgroundPanel. You could avoid extra texture copies - which is currently being done.
Running the desktop version nets 100 or more fps for the same samples.
So, the WinRT port of the sample browser uses native XAML - the code passes in the CoreWindow and such to the D3D11 code and then the D3D code connects its swapchain with a XAML element inside this CoreWindow that the sample browser passes in. All of this is in native C++, but the XAML higher-level UI code is in C++ /Cx which has language extensions (sorry if I am repeating things you already know). The underlying DLLs that are in pure C++ talking with actual D3D code interface with this C++ /Cx code using ABIs exported by the OgreMain, RenderSystem DLLs.
See http://msdn.microsoft.com/en-US/library ... s/hh825871 for more details - especially the last part about SwapChainBackgroundPanel. You could avoid extra texture copies - which is currently being done.
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: [GSoC 2012] Complete the DirectX 11 render system
Can you post this issue on this thread: http://www.ogre3d.org/forums/viewtopic.php?f=4&t=69209 ?
as this is becoming off topic from the current thread.
as this is becoming off topic from the current thread.
Watch out for my OGRE related tweets here.
- Eugene
- OGRE Team Member
- Posts: 185
- Joined: Mon Mar 24, 2008 4:54 pm
- Location: Kraków, Poland
- x 41
Re: [GSoC 2012] Complete the DirectX 11 render system
If you take a look at http://www.ogre3d.org/forums/viewtopic. ... 50#p455327 you`ll see that planned hierarchy at those times wasgfxguy25 wrote:I have been playing with the few samples (that are currently working - I realize more work is to be done) - noticed that the performance is really bad (hardly getting 20fps).
I am looking at the WinRT D3D11 render system code and it was strange to see the use of a SurfaceImageSource. MSDN says that this is going to be slow. Is there a preference to use this instead of the high-performance SwapChainBackgroundPanel?
Every time you call BeginDraw/EndDraw, the surface is going to be blitted on the XAML end - plus the allocation of a new surface each frame. I believe this was intended for small surface updates (hence the rect being passed to begindraw) as the MSDN site explains. Plus there is an extra CopySubresourceRegion call as well from Ogre end (see swapBuffers).
Am I the only one seeing bad perf?
D3D11RenderWindowBase
- D3D11RenderWindowSwapChainBased
- D3D11RenderWindowHwnd
D3D11RenderWindowCoreWindow
D3D11RenderWindowComposition (not yet implemented)
D3D11RenderWindowVirtualImageSource (not yet implemented) - D3D11RenderWindowHwnd
All you need to do to use SwapChainBackgroundPanel - is D3D11RenderWindowComposition implementation that would do dxgiFactory->CreateSwapChainForComposition(); bgPanel->SetSwapChain(). It`s not a choice - different applications needs different kinds of render targets.
-
- Gnoblar
- Posts: 7
- Joined: Thu Sep 13, 2012 4:19 am
Re: [GSoC 2012] Complete the DirectX 11 render system
I see. Thanks Eugene. I will move this thread there.
SwapChainBackgroundPanel should be the default IMO, because it is the fastest.
SwapChainBackgroundPanel should be the default IMO, because it is the fastest.
- Eugene
- OGRE Team Member
- Posts: 185
- Joined: Mon Mar 24, 2008 4:54 pm
- Location: Kraków, Poland
- x 41
Re: [GSoC 2012] Complete the DirectX 11 render system
D3D11RenderWindowCoreWindow is the fastest, and is default.gfxguy25 wrote:I see. Thanks Eugene. I will move this thread there.
SwapChainBackgroundPanel should be the default IMO, because it is the fastest.
SwapChainBackgroundPanel allows some XAML on top of 3D window, but causes big overdraw. Could be only one, could not be drawn to in background (as UI is still locked).
SurfaceImageSource useful for small 3D views embedded in generally not 3D app, could be several, updated in background - think about CADs instead of games.
-
- Gnoblar
- Posts: 7
- Joined: Thu Sep 13, 2012 4:19 am
Re: [GSoC 2012] Complete the DirectX 11 render system
ah, I see that makes perfect sense now, thanks Eugene!..
Is there a sample that uses D3D11RenderWindowCoreWindow? The default one uses a SurfaceImageSource, and hence my confusion. Sorry about that.
Is there a sample that uses D3D11RenderWindowCoreWindow? The default one uses a SurfaceImageSource, and hence my confusion. Sorry about that.
- Eugene
- OGRE Team Member
- Posts: 185
- Joined: Mon Mar 24, 2008 4:54 pm
- Location: Kraków, Poland
- x 41
Re: [GSoC 2012] Complete the DirectX 11 render system
Yes, SampleBrowserWinRT works over D3D11RenderWindowCoreWindow and SampleBrowserWinRTXaml works over SurfaceImageSource, they are located near each other.gfxguy25 wrote:ah, I see that makes perfect sense now, thanks Eugene!..
Is there a sample that uses D3D11RenderWindowCoreWindow? The default one uses a SurfaceImageSource, and hence my confusion. Sorry about that.
- robert_sasu
- Google Summer of Code Student
- Posts: 237
- Joined: Mon Apr 02, 2012 11:07 am
- x 42
Re: [GSoC 2012] Complete the DirectX 11 render system
Hi,
I have started to work again on the DirectX 11 Render System. The new code fork of the project is: https://bitbucket.org/sasu_robert/ogre3d-directx11
I will add the first changeset tomorrow. There are a few more issues, bugs on the current DirectX 11 Render System. The first thing to do is resolving all these problems (there are a few samples which are not working). After that I will finish the multi-device support for this render system. There was a lot to do in the summer and I had no time for these issues, some of them are trivial (probably), but it is hard to find.
Here is the list of the samples which are currently not working ( error describe for some of them):
1. Compositor - bad color for the OldTV compositor
2. Deferred shading - crash on start
3. Dual Quaternion - crash on start
4. Dynamic Texture - wrong color of the frost texture (red, and it is supposed to be blue)
5. Instancing - there is just only one model rendered (or 2 if you set to render 160.)
6. Isosurf - crash on start
7. NewInstancing - a lot of visual bugs, you can't see any of the models.
8. SSAO techniques - crash on start
9. Shader system - sometimes bad skybox, error when trying multiple viewports or shadows.
10. Shader system texture fog - sky box does not appear on initializing, if you deselect and select again it will work
11. Grass sample - there is no animation on the grass, ogre head is rendered incorrectly (no normal mapping, I think.)
12. Shadow sample - missing shaders which are supported by D3D11RS (there is no fixed pipeline in D3D11)
13. Terrain sample and volume rendering with LOD aimed terrain - crashes on start
It would be great if the community would help by resolving those bugs. If someone wants to send a patch, post it here or if you ask and you have no permission to push changeset to the repository I will add it. (Currently I have inherited all the permissions from the official ogre trunk, so many of you can directly push his work.).
I will post regularly about the work what have been done and the work which is proposed to be done in the next 3 days (maximum).
Thanks
I have started to work again on the DirectX 11 Render System. The new code fork of the project is: https://bitbucket.org/sasu_robert/ogre3d-directx11
I will add the first changeset tomorrow. There are a few more issues, bugs on the current DirectX 11 Render System. The first thing to do is resolving all these problems (there are a few samples which are not working). After that I will finish the multi-device support for this render system. There was a lot to do in the summer and I had no time for these issues, some of them are trivial (probably), but it is hard to find.
Here is the list of the samples which are currently not working ( error describe for some of them):
1. Compositor - bad color for the OldTV compositor
2. Deferred shading - crash on start
3. Dual Quaternion - crash on start
4. Dynamic Texture - wrong color of the frost texture (red, and it is supposed to be blue)
5. Instancing - there is just only one model rendered (or 2 if you set to render 160.)
6. Isosurf - crash on start
7. NewInstancing - a lot of visual bugs, you can't see any of the models.
8. SSAO techniques - crash on start
9. Shader system - sometimes bad skybox, error when trying multiple viewports or shadows.
10. Shader system texture fog - sky box does not appear on initializing, if you deselect and select again it will work
11. Grass sample - there is no animation on the grass, ogre head is rendered incorrectly (no normal mapping, I think.)
12. Shadow sample - missing shaders which are supported by D3D11RS (there is no fixed pipeline in D3D11)
13. Terrain sample and volume rendering with LOD aimed terrain - crashes on start
It would be great if the community would help by resolving those bugs. If someone wants to send a patch, post it here or if you ask and you have no permission to push changeset to the repository I will add it. (Currently I have inherited all the permissions from the official ogre trunk, so many of you can directly push his work.).
I will post regularly about the work what have been done and the work which is proposed to be done in the next 3 days (maximum).
Thanks
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
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
- robert_sasu
- Google Summer of Code Student
- Posts: 237
- Joined: Mon Apr 02, 2012 11:07 am
- x 42
Re: [GSoC 2012] Complete the DirectX 11 render system
Today I have resolved I have pushed my code to the repo, in which I have resolved a compiling error (if you build it on 64bit machine with VS 2010.). I have also resolved a bug which regards the particle effects sample, when turning rain on (error of alpha-blending).
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
Topic: "DirectX 11 & Tessellation samples"
Project links: Project thread, WIKI page, Code fork for the project
Mentor: Assaf Raman
-
- Gnoblar
- Posts: 7
- Joined: Thu Sep 13, 2012 4:19 am
Re: [GSoC 2012] Complete the DirectX 11 render system
Eugene wrote:Yes, SampleBrowserWinRT works over D3D11RenderWindowCoreWindow and SampleBrowserWinRTXaml works over SurfaceImageSource, they are located near each other.gfxguy25 wrote:ah, I see that makes perfect sense now, thanks Eugene!..
Is there a sample that uses D3D11RenderWindowCoreWindow? The default one uses a SurfaceImageSource, and hence my confusion. Sorry about that.
OK, I figured out the cause for the performance drop when using the XAML sample. What happens is that when you Present to the Ogre Swap Chain, it needs to be 'picked up' by the XAML swapchain as well (to lay its contents out). If you use your own timer, then you are going to be throttled, because you are going to be out-of-order and the app requiring multiple presents.
All this, I figured by looking at the awesome Simple3DGameXaml out there in MSDN - use CompositionTarget::Render::add() instead of the DispatchTimer. This FINALLY gets 60fps for SurfaceImageSource.
- Assaf Raman
- OGRE Team Member
- Posts: 3092
- Joined: Tue Apr 11, 2006 3:58 pm
- Location: TLV, Israel
- x 76
Re: [GSoC 2012] Complete the DirectX 11 render system
Nice, can you submit a patch?
Watch out for my OGRE related tweets here.
-
- Gnoblar
- Posts: 7
- Joined: Thu Sep 13, 2012 4:19 am
Re: [GSoC 2012] Complete the DirectX 11 render system
I do not know how to do that, sorry. This is a two-line change though:Assaf Raman wrote:Nice, can you submit a patch?
Code: Select all
void SampleBrowserWinRT::StartRendering()
{
...
m_onRenderingEventToken = CompositionTarget::Rendering::add(ref new EventHandler<Object^>(this, &SampleBrowserWinRT::DisplayCurrentFrame));
}
- Eugene
- OGRE Team Member
- Posts: 185
- Joined: Mon Mar 24, 2008 4:54 pm
- Location: Kraków, Poland
- x 41
Re: [GSoC 2012] Complete the DirectX 11 render system
Nice finding!gfxguy25 wrote:OK, I figured out the cause for the performance drop when using the XAML sample. What happens is that when you Present to the Ogre Swap Chain, it needs to be 'picked up' by the XAML swapchain as well (to lay its contents out). If you use your own timer, then you are going to be throttled, because you are going to be out-of-order and the app requiring multiple presents.
All this, I figured by looking at the awesome Simple3DGameXaml out there in MSDN - use CompositionTarget::Render::add() instead of the DispatchTimer. This FINALLY gets 60fps for SurfaceImageSource.