New Release D3D9Client Development

Poscik

Addon Developer
Addon Developer
Joined
Mar 28, 2008
Messages
512
Reaction score
2
Points
18
Location
Sulejówek
That one looks great, I need some time to study it. Currently, there are some problems with cloud layers, horizon haze and diffusive particle effects and they are all connected. So, I was thinking about re-implementing the atmospheric rendering section but it will take some time.
That's right. When I was trying to implement scattering, my first step was to delete whole HazeMgr code ;) But it's really to hard.
 

Tschachim

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 7, 2008
Messages
300
Reaction score
0
Points
0
Location
nassp.sf.net
Website
nassp.sf.net
Hi Jarmo,

thanks for your advice, I did all tests with RC1. Changing Tex0S didn't help, same problem as before (DG_Panel.jpg).

Switching to glass cockpit in this scenario caused error message boxes during the switch between the VC and the glass cockpit (2nd F8 press), see SwitchedToGlasscockpit.jpg and D3D9ClientLog_SwitchingToGlasscockpit.html in the zip file.

I stopped Orbiter, changed the log level and restart, no error message boxes, see StartingInGlasscockpit.jpg and D3D9ClientLog_StartingInGlasscockpit.html

Funny thing is that the MFDs on NASSP panels are working fine (NASSP_Panel.jpg)?

The MFD sizes are in the DG glass cockpit 178px (should be 300px), on the DG panel 205px (should be 230px) and on the NASSP panel 260px.

Thanks a lot for taking a look!

Cheers
Tschachim

EDIT: Also, the "shadow position bug" is still there...
 

Attachments

Last edited:

jarmonik

Addon Developer
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,104
Reaction score
61
Points
48
Website
users.kymp.net
Funny thing is that the MFDs on NASSP panels are working fine (NASSP_Panel.jpg)?
Most likely the MFD isn't a texture, it could be a plain surface that is blitted into the backbuffer or panel. The glass cockpit and DG's 2D Panel is using texture surfaces for MFDs.

The MFD sizes are in the DG glass cockpit 178px (should be 300px), on the DG panel 205px (should be 230px) and on the NASSP panel 260px.
Looks like it is a power of 2 issue. In the first case the DirectX will allocate a furface of 512 pixels instead of 300px (302 exactly). When the 512px surface is scaled down to 302px the active region will reduce down to 178px. The same logic will apply in the second case.

I have attached a new version that will try to adjust the texture coordinates to compensate the difference. How does the right and bottom edges behave ? Is the green border visible ? (This patch will only effect in glass cockpit view and DG's "new style" 2D Panel).


EDIT: Also, the "shadow position bug" is still there...
Oh, I got the shadow animations to work with the DeltaGlider but there must be something else. I'll take an other look.

---------- Post added at 01:10 ---------- Previous post was at 00:58 ----------

I removed the patch, it won't work. I'll try to think abaout something else...
 
Last edited:

jarmonik

Addon Developer
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,104
Reaction score
61
Points
48
Website
users.kymp.net
Could you also give this one a try. It is using different parameters in a surface allocation, so, let's see if it can allocate a surface of a proper size.

ATTENTION: The Test packages are created only for debugging the MFD problem. Latest official release is in the post #160.

EDIT: Test2.zip should be installed and tested before installing Test3.zip
 
Last edited:

Tschachim

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 7, 2008
Messages
300
Reaction score
0
Points
0
Location
nassp.sf.net
Website
nassp.sf.net
Hi Jarmo,

Most likely the MFD isn't a texture, it could be a plain surface that is blitted into the backbuffer or panel. The glass cockpit and DG's 2D Panel is using texture surfaces for MFDs.
My bad, I do know NASSP is using the old panel interface... :facepalm:

Thanks for the patches! Using again the Delta-glider/Cape Canaveral scenario, the MFDs on the panel directly after start are fine with both patches. :thumbup:

After switching around between panel, VC and glass cockpit view (F8), I got error message boxes with both patches after some F8 key presses. After that one or both MFDs are filled with "garbage" completely (no scaling error anymore), but not deterministically. Sometimes it's the 2nd F8 key press when switching to glass cockpit, sometimes I can press F8 about 30-40 times before the error pops up. To be honest I can't tell which patch is working better. There are some log files attached, please tell me if I shall do more or more specific tests.

Thanks for all your efforts!

Cheers
Tschachim
 

Attachments

jarmonik

Addon Developer
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,104
Reaction score
61
Points
48
Website
users.kymp.net
After switching around between panel, VC and glass cockpit view (F8), I got error message boxes with both patches after some F8 key presses. After that one or both MFDs are filled with "garbage" completely (no scaling error anymore), but not deterministically.
The first error "CreateOffscreenPlainSurface"is about the system runing out of video memory and the errors beyond that are related into the first one. In the RC2 I have implemented a different kind of memory allocation logic that will prefer textures instead of plain surfaces. Enable this feature by setting "MemAllocLogic" parameter to 1 from D3D9Client.cfg

Sometimes it's the 2nd F8 key press when switching to glass cockpit, sometimes I can press F8 about 30-40 times before the error pops up. To be honest I can't tell which patch is working better. There are some log files attached, please tell me if I shall do more or more specific tests.
It is a memory issue. Exiting the launch pad before starting a new scenario could help.
I have been tracking down a memory leak issue without success. Pretty often when switching a panel one (Rendering Target Texture) surface remains unreleased. This will print an error message in the log "Texture Surface failed to release 1 instance(s) remains". I'll try to implement some kind of memory monitor in the next release. Also, there could already exist some development tools for that as well.
 

jarmonik

Addon Developer
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,104
Reaction score
61
Points
48
Website
users.kymp.net
Release Candidate 2

- The shadow bug should be fixed.
- MFD conflict with the backbuffer multisampling should be fixed.
- MFD scaling issue is fixed.
 
Last edited:

Tschachim

Addon Developer
Addon Developer
Donator
Beta Tester
Joined
Feb 7, 2008
Messages
300
Reaction score
0
Points
0
Location
nassp.sf.net
Website
nassp.sf.net
Hi Jarmo,

thanks for RC2! :)

Enable this feature by setting "MemAllocLogic" parameter to 1 from D3D9Client.cfg
With MemAllocLogic=0, the RC2 pretty much behaves like the patches, with MemAllocLogic=1 I wasn't able to produce any error at all yet. Keeping fingers crossed, I'll do more tests the next days! :thumbup:

Exiting the launch pad before starting a new scenario could help.
I always did that during all tests, sorry for not mentioning that.

The shadow bug should be fixed.
Yep, it's fixed! :thumbup:

Cheers
Tschachim
 

FordPrefect

Addon Developer
Addon Developer
Donator
Joined
Feb 7, 2008
Messages
387
Reaction score
1
Points
18
Hello Jarmo,

just now as you have been looking closer into the atmospheric rendering, may I suggest you may take a look at the stunning work of Eric Bruneton? In my humble opinion, he's created the most realistic looking real-time atmospheric rendering I have ever seen:

http://www-evasion.imag.fr/Membres/Eric.Bruneton/

Scroll down to the chapter "Atmosphere" and click on the images and the links Publication, Video and Code, with the last one being especially interesting for you.
Also see this document of Eric Bruneton:
http://www-ljk.imag.fr/[email protected]_f64b69/article.pdf

For some absolutely awesome views, watch the videos Eric Bruneton posted on youtube (9 in total):


I hope this can be helpful for improving the atmospheric effects in your D3D9 Client?
 

deltawing777

New member
Joined
Jan 4, 2008
Messages
513
Reaction score
0
Points
0
Location
South of Houston,Texas
Website
omp.dyndns-server.com
Wow! Now that would be nice in orbiter. I saw the river pics and automaticaly thought of ksc on ascent.Its got every thing everybody wants. Terrain,water,clouds,vegitation. This, if it can be implemented would put orbiter right up there with the big boys such as FSX/X-Plane IMO
 

Poscik

Addon Developer
Addon Developer
Joined
Mar 28, 2008
Messages
512
Reaction score
2
Points
18
Location
Sulejówek
Hello Jarmo,

just now as you have been looking closer into the atmospheric rendering, may I suggest you may take a look at the stunning work of Eric Bruneton? In my humble opinion, he's created the most realistic looking real-time atmospheric rendering I have ever seen:

http://www-evasion.imag.fr/Membres/Eric.Bruneton/

Scroll down to the chapter "Atmosphere" and click on the images and the links Publication, Video and Code, with the last one being especially interesting for you.
Also see this document of Eric Bruneton:
http://www-ljk.imag.fr/[email protected]_f64b69/article.pdf

For some absolutely awesome views, watch the videos Eric Bruneton posted on youtube (9 in total):

YouTube - Real-time planet rendering

I hope this can be helpful for improving the atmospheric effects in your D3D9 Client?
I was talking about it earlier and tried to implement it. But there is one problem. Eric did this in OpenGL unfortunately. I have source code of his application, but completely don't understand how it works :/
 

jarmonik

Addon Developer
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,104
Reaction score
61
Points
48
Website
users.kymp.net
Hello Jarmo,

just now as you have been looking closer into the atmospheric rendering, may I suggest you may take a look at the stunning work of Eric Bruneton? In my humble opinion, he's created the most realistic looking real-time atmospheric rendering I have ever seen
Thanks for the links. The D3D9Client is in a pretty good shape from the other parts, so, it may be a good time to start working on this sector. However, it may take some time to get results.
 

Shokus

New member
Joined
Mar 10, 2009
Messages
21
Reaction score
0
Points
0
I'm pretty new to D3D9, but nonetheless, very good work here and thanks very much! It runs awesome on my computer. But there is a small issue which could be a problem on my part. When I run D3D9 RC2, the fuel bars look a bit funny in colour, and Map MFD TGT becomes unreadable, which can be seen from the screenshot.
Orbiter 2010 [D3D9Client].jpg
 

Frankynov

Member
Joined
Oct 2, 2008
Messages
39
Reaction score
0
Points
6
Good News !
Having a new atmoshperic haze will be a huge addition and make your client liftoff from the original Orbiter :)

I also hope it's gonna be easy to fix the AMSO meshes.. This is THE addon I wish to fly with your client.
(EDIT) : As seen in another post, it seems to be a protection feature for the mesh to not be stolen.. It's a pitty the protection is enabled even with another graphical engine :(

Btw, have you got PayPal ? Christmas is coming very quickly ! ;-)
 
Last edited:

jarmonik

Addon Developer
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,104
Reaction score
61
Points
48
Website
users.kymp.net
I also hope it's gonna be easy to fix the AMSO meshes.. This is THE addon I wish to fly with your client.
(EDIT) : As seen in another post, it seems to be a protection feature for the mesh to not be stolen.. It's a pitty the protection is enabled even with another graphical engine :(
I didn't know AMSO had such a protection system. It must be true since it is mentioned in the AMSO documentation as well. In this case you should talk to Alain about it. It will be he's call how to make the AMSO to work under D3D9Client or there will be no AMSO for it. Since, it is a protection system, my legal rights are limited.


Here is also a minor update. The color and menu issues reported above are fixed.
 
Last edited:

FordPrefect

Addon Developer
Addon Developer
Donator
Joined
Feb 7, 2008
Messages
387
Reaction score
1
Points
18
Hello Jarmo,

I am not sure if it has been reported before (I don't think so), nor if it is only an issue on my end, but it seems the ambient light level is fixed to a minimum > 0. When I set the ambient light level to "0" in the launch pad, I still notice a dim ambient lighting level. I noticed this because I usually prefer "zero" ambient light level when playing Orbiter.
Would be cool if you could check this - whenever you've got time to do so! Thanks!
 

luki1997a

New member
Joined
Dec 9, 2010
Messages
314
Reaction score
0
Points
0
Location
Biłgoraj
Hello.
You did a lot of good work. I think, that you should add anty-aliasing and anizotropic filterring to make your client better. Sun lens could be good. Thank you for your client;)
 

Wishbone

Clueless developer
Addon Developer
Joined
Sep 12, 2010
Messages
2,421
Reaction score
0
Points
0
Location
Moscow
While going inside the DG-Mk4 in Orbit scenario, I get this with RC3:
.\Mesh.cpp Line:863 Error:-2005532292 Grp[g]->pMesh->DrawSubset(0)

and a spate of other popups which I block out by killing the client.

Of interest: while in external view, I'm getting high FPS (320+), the instrument panel view gets FPS to 12. I suppose there is much mem-allocation/copying going on around this stage.
 

jarmonik

Addon Developer
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,104
Reaction score
61
Points
48
Website
users.kymp.net
While going inside the DG-Mk4 in Orbit scenario, I get this with RC3:
.\Mesh.cpp Line:863 Error:-2005532292 Grp[g]->pMesh->DrawSubset(0)

and a spate of other popups which I block out by killing the client.
Is this a RC3 specific issue or does this exist in RC2 as well ?
If it is a RC3 specific issue then what will happen if you switch the "MemAllocLogic" from D3D9Client.cfg to "0" ?

Of interest: while in external view, I'm getting high FPS (320+), the instrument panel view gets FPS to 12. I suppose there is much mem-allocation/copying going on around this stage.
Orbiter will do some memory allocation when switching panels but not when the panels are running. Nothing like that should be going on.

Just to be sure. Is this a RC3 specific issue or does this exist in RC2 as well ?
Are there any errors logged in the D3D9ClientLog.html ?

For the reference, with the stock deltaglider I got the following framerates:
Exterior 300fps
2DPanel 370fps
Virtual 210fps
Glass 360fps
 
Top