Orbiter-Forum  

Go Back   Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter Visualization Project
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Orbiter Visualization Project Orbiter external graphics development.

Reply
 
Thread Tools
Old 12-03-2010, 01:07 AM   #151
Poscik
Addon Developer
 
Poscik's Avatar
Default

Quote:
Originally Posted by Axel View Post
 -no atmospheric haze
Wait for my atmospheric haze. Two pics pasted earlier. I'll give a code to Jarmonik as soon as I find the time to complete scaling work.
Poscik is offline   Reply With Quote
Thanked by:
Old 12-03-2010, 11:49 AM   #152
jarmonik
Beta Tester

Default

Here is pretty good article about atmospheric scattering:
http://http.developer.nvidia.com/GPU...chapter16.html
jarmonik is offline   Reply With Quote
Old 12-03-2010, 10:34 PM   #153
Poscik
Addon Developer
 
Poscik's Avatar
Default

Quote:
Originally Posted by jarmonik View Post
 Here is pretty good article about atmospheric scattering:
http://http.developer.nvidia.com/GPU...chapter16.html
I know that, I was trying to implement that, but it is OpenGL IMO. I haven't enough skills to code something like that even in DX9. It needs vertex shader. I have few sample programs with scattering written in C#(I think this is it). I can't reproduce any of them to C++. If you want, I'll send one for you.
Poscik is offline   Reply With Quote
Old 12-03-2010, 11:19 PM   #154
Poscik
Addon Developer
 
Poscik's Avatar
Default

Maybe it's not so professional work, but it is a lot better than stock haze. Enjoy.
haze.zip
Poscik is offline   Reply With Quote
Thanked by:
Old 12-04-2010, 04:35 PM   #155
Tschachim
Beta Tester
 
Tschachim's Avatar


Default

Hi Jarmo,

I just want to let you know that I still have a problem with the MFD size with Beta 2 (as with all other versions). A screenshot of the Delta-glider\Cape Canaveral scenario directly after loading is attached. It might be because of my rather ancient ATI X1600...?

Also, the shadow of an animated mesh of a vessel doesn't move according to the animation, see the attached screenshot, the shadow of the LC34 MSS is still at it's original position at the pad.

Cheers
Tschachim
Attached Thumbnails
ScreenShot00146.jpg   ScreenShot00147.jpg  
Tschachim is offline   Reply With Quote
Old 12-04-2010, 08:26 PM   #156
jarmonik
Beta Tester

Default

Quote:
Originally Posted by Tschachim View Post
 Hi Jarmo,

I just want to let you know that I still have a problem with the MFD size with Beta 2 (as with all other versions). A screenshot of the Delta-glider\Cape Canaveral scenario directly after loading is attached. It might be because of my rather ancient ATI X1600...?

This could be a non-power of 2 texture issue. Based on a log file you posted earlier the ATI X1600 has a D3DPTEXTURECAPS_NONPOW2CONDITIONAL:

DirectX API documentation says:
Quote:
D3DPTEXTURECAPS_NONPOW2CONDITIONAL:
If D3DPTEXTURECAPS_POW2 is also set, conditionally supports the use of 2D textures with dimensions that are not powers of two. A device that exposes this capability can use such a texture if all of the following requirements are met.
  • The texture addressing mode for the texture stage is set to D3DTADDRESS_CLAMP.
  • Texture wrapping for the texture stage is disabled (D3DRS_WRAP n set to 0).
  • Mipmapping is not in use (use magnification filter only).
  • Texture formats must not be D3DFMT_DXT1 through D3DFMT_DXT5.
If this flag is not set, and D3DPTEXTURECAPS_POW2 is also not set, then unconditional support is provided for 2D textures with dimensions that are not powers of two.
So, you could replace the following section from the MeshTech.fx
Code:
sampler Tex0S = sampler_state
{
    Texture = <gTex0>;
    MinFilter = NONE;
    MagFilter = LINEAR;
    MipFilter = NONE;
    AddressU = CLAMP;
    AddressV = CLAMP;
};
Currently these settings will cause failures in a renderings elsewhere. But, If this will fix the MFD issue then I will create a special renderer for the MFDs only.

If the above doesn't fix the problem with the MFDs then..

You could run the scenario under a debug level 5

1. Load a stock deltaglider scenario and switch into a glass cockpit view
2. Exit the simulation and launchpad.
3. Change the DebugLvl paramater form D3D9Client.cfg into a 5 (this will create debug information several megabytes per second)
4. Save the file and run the Orbiter using current simulation state
5. Exit immediately when the view appears.
6. Zip and attach the D3D9ClientLog.html into your post.

You could also measure the actual size of the MFD screen in a pixels from a screen shot.
jarmonik is offline   Reply With Quote
Old 12-05-2010, 12:11 PM   #157
jarmonik
Beta Tester

Default

Quote:
Originally Posted by Poscik View Post
 Maybe it's not so professional work, but it is a lot better than stock haze. Enjoy.
Attachment 6291
Did you upload the right file ? I get pretty bad moire effects when viewing the Earth from high altitude. Also, sunset and sunrise color effects aren't working.

Last edited by jarmonik; 09-20-2012 at 09:41 PM.
jarmonik is offline   Reply With Quote
Old 12-05-2010, 03:08 PM   #158
Poscik
Addon Developer
 
Poscik's Avatar
Default

Unfortunately yes. It works fine on LEO(~400km orbit). It really can't be done better playing with colours. I don't know how to start with scattering. I read few articles, and have a clue how it works. Maybe you can try it. I attached C# code for scattering and some other things.
http://www.megaupload.com/?d=7XPVB66L

Here is excellent article, but can't find CD with sample code :/
http://www2.imm.dtu.dk/pubdb/views/e...df/imm2554.pdf
Poscik is offline   Reply With Quote
Thanked by:
Old 12-05-2010, 04:02 PM   #159
jarmonik
Beta Tester

Default

Quote:
Originally Posted by Poscik View Post
 Here is excellent article, but can't find CD with sample code :/
http://www2.imm.dtu.dk/pubdb/views/e...df/imm2554.pdf
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.
jarmonik is offline   Reply With Quote
Old 12-05-2010, 04:18 PM   #160
jarmonik
Beta Tester

Default Release Candidate 1

Ok, Here is a release candidate of the D3D9Client. There are a lot of small improvements here and there. But here is a list of greater improvements.

- Sketchpad is now using GPU acceleration when drawing into a backbuffer. This will fix the framerate impact caused by HUD. Also, screen annotations won't slowdown the system anymore. AMSO frame rate is improved a lot but the meshes aren't working.

- Some mipmap and high resolution tile issues are fixed. Lvl 14 should be working as well as in the inline engine.

- Experimental backbuffer multisampling is implemented. It can cause some rendering problems like MFDs not working in old style 2D panels. That bug should be possible to fix later. (Multisampling is automatically disabled when a simulation session is closed. Enable from Video Tab)

- Transparent glass cockpit is implemented.
- The shadow position bug should be fixed.
- Some exhaust clipping issues should be fixed.

Last edited by jarmonik; 06-13-2011 at 01:04 PM.
jarmonik is offline   Reply With Quote
Old 12-05-2010, 04:32 PM   #161
Poscik
Addon Developer
 
Poscik's Avatar
Default

Quote:
Originally Posted by jarmonik View Post
 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.
Poscik is offline   Reply With Quote
Old 12-05-2010, 06:21 PM   #162
Tschachim
Beta Tester
 
Tschachim's Avatar


Default

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...
Attached Thumbnails
DG_Panel.jpg   SwitchedToGlasscockpit.jpg   StartingInGlasscockpit.jpg   NASSP_Panel.jpg  
Attached Files
File Type: zip D3D9ClientLog.zip (86.0 KB, 7 views)

Last edited by Tschachim; 12-05-2010 at 06:26 PM.
Tschachim is offline   Reply With Quote
Old 12-05-2010, 11:10 PM   #163
jarmonik
Beta Tester

Default

Quote:
Originally Posted by Tschachim View Post
 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.

Quote:
Originally Posted by Tschachim View Post
 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).


Quote:
Originally Posted by Tschachim View Post
 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 by jarmonik; 12-05-2010 at 11:07 PM.
jarmonik is offline   Reply With Quote
Old 12-05-2010, 11:33 PM   #164
jarmonik
Beta Tester

Default

Ok, here is the patch.

Last edited by jarmonik; 06-13-2011 at 01:03 PM.
jarmonik is offline   Reply With Quote
Old 12-06-2010, 12:44 AM   #165
jarmonik
Beta Tester

Default

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 by jarmonik; 06-13-2011 at 01:03 PM.
jarmonik is offline   Reply With Quote
Reply

  Orbiter-Forum > Orbiter Space Flight Simulator > Orbiter Visualization Project

Tags
d3d9client, graphicsclient


Thread Tools

Posting Rules
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump


All times are GMT. The time now is 12:46 AM.

Quick Links Need Help?


About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.