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
  #1  
Old
jarmonik jarmonik is offline
Beta Tester

Default D3D9Client Development
by jarmonik 10-01-2010, 12:05 PM

Latest release: D3D9Client R15

This is D3D9Client development thread.

D3D9Client is available for download from CodePlex http://d3d9client.codeplex.com/

Crash to Desktop:
Some add-ons are crashing when using with D3D9Client because they are not compatible with graphics clients. CTDs should be reported to the add-on owner. The main reason for the CTDs is the VESSEL::GetMesh() function that will always return a NULL when a graphics client is attached into the Orbiter. GetDevMesh() function should be used instead. Also, it's vital to use DEVMESHHANDLE with GetDevMesh() instead of MESHHANDLE.


Bug reporting guidelines:
- See if the bug can be reproduced with GDI Compatibility mode enabled.
- See if the D3D9ClientLog located in /Modules/D3D9Client/ contains any errors.
- Vessel / Add-On related bugs should be reported to an add-on developper and let the add-on developper to report the bugs in here. Because the add-on developper will have more insight and information about what's going on inside the add-on and that information is vital for tracking down a bug.


Orbiter/D3D9Client is tested to be OK with:
- NASSP, SSU, AMSO
- DeltaGlider IV
- dbeachy1's XR-Fleet
- thorton's Soyuz FG/U/TMA
- All default vessels in Orbiter distribution.


Not yet Implemented:
- Trains, Solar plants
Attached Files
File Type: zip D3D9-Goodies.zip (56.3 KB, 631 views)

Last edited by jarmonik; 01-11-2015 at 09:45 AM.
Reply With Quote
Views 1679297 Comments 4392
Thanked by:
1hippienaut, 2552, 80mileshigh, ACSoft, Adam001d, ADSWNJ, alagreca, aldarion, alfagolf, Alfastar, Altair Aerospace, andochoa, Anroalh12, ao7g, Apollo 13, Apollon, ArchKaine, Arrowstar, Arthur Dent, Artlav, asbjos, astrosammy, Athena, Axel_Foley, Axertan, BigMac, BlackRazor, blixel, bpops, ceauke, Cerebus, cipher169, Columbia42, Coolhand, Cras, crisk73, d2k, DanishOrbinaut, dansteph, Dantassii, DarkWanderer, David413, davidweb, dbeachy1, deltawing777, dgatsoulis, diogom, Donamy, donatelo200, dumbo2007, Eccentrus, Eduard, Enjo, Eraser, Evil_Onyx, Fabri91, Face, FatalFlux, Felipi1205, fenjo, Fert, flyer, FordPrefect, fort, fred18, Futhalero, Galactic Penguin SST, george7378, Gerdih, ggrof, GLS, goaowonk, Gr_Chris_pilot, GuiConteDGIV2X, HarvesteR, hedzup456, Heywood, HR_Oso, icedown, indonesianorbinaut, indy91, Interceptor, ionif, IronRain, Izack, jacquesmomo, Jarod, Jarvitš, jedidia, jedimaster1214, jimblah, jllaurado, JMW, joffrey, Johnman, Jordan, JSwift, jthill, Kendo, kevin580, Kubala95, kuddel, ky, Kyle, Lars789852, lassombra, litreb, littleplatonian, Luke Skywalker, luki1997a, malisle, marcogavazzeni, markl316, martins, Marvin42, Matias Saibene, MaverickSawyer, Max Pain, Mister Kite, mjanicki, MJR, Moach, mode1bravo, n122vu, n72.75, Nemoricus, NextBigLeap, Nikogori, Nistenf, Noeyedeer, NOMAD, Notebook, NukeET, N_Molson, orb, Pablo49, paleto, pappy2, ParaG, PennyBlack, PeriapsisPrograde, PeterRoss, Phil Smith, Pioneer, plainsight, Poscik, ProAuroraX, Proximus, Pyromaniac605, RacerX, RaR76, Richieb, Ripley, RisingFury, River Crab, romanasul, rstr, Rtyh-12, Samuel Edwards, Scattykat, Scav, Schmidtrock, Screamer7, Scruce, Shakal, simcosmos, sintexx, sitha241, sneekyzeke, SolarLiner, sorindafabico, Spaced, SpaceShuttleFan, Spacethingy, Star Voyager, stevcast, Stevodoran, STS, tariuq, tblaxland, Tex, theflyingfish, timex21, toddhisattva, Topper, Trainguy, Trekkie, Tschachim, TSPenguin, Turbinator, Turbo, Tycho, Tychonaut, Urwumpe, victor, Wally, webtek, Weirdo Earthtorch, Whatever, Wishbone, Wolf, Woo482, Xyon, yagni01, Yurik, Zatnikitelman
Total Comments 4392

Comments

Old 10-01-2010, 03:29 PM   #2
Zachstar
Donator
 
Zachstar's Avatar

Default

I apologize if this if this is seriously off topic but in my opinion DX9s days have come and gone.

In my opinion any project of this magnitude will take years to implement, expand, and support. Meanwhile technology moves on. Getting a Direct X 10 GPU is as easy as getting a motherboard these days as many IGPs support it not to mention multiple generations of video cards. With many on the market for less than 20USD. And most recent low end versions at 40-50USD.

DirectX10 in my opinion ought to be the goal here because while there are still members of this community that use DX9 hardware or Windows XP. What about in a year? What about 2 years?

DX10 SM4 in my opinion will give an amazing amount of ability for addon designers to exploit and make sure of the latest hardware.
Zachstar is offline   Reply With Quote
Old 10-01-2010, 03:39 PM   #3
Wishbone
Clueless developer
 
Wishbone's Avatar
Default

In 2 years I'll still be using WinXP. Please call me a retrograde... and I'll call you a prograde
Wishbone is offline   Reply With Quote
Old 10-01-2010, 10:37 PM   #4
tl8
Addon Developer
 
tl8's Avatar

Default

Please try and keep this thread on topic, discussing what client should be developed is not the object of this thread.
tl8 is offline   Reply With Quote
Old 10-02-2010, 11:03 AM   #5
jarmonik
Beta Tester

Default

Quote:
Originally Posted by Zachstar View Post
 I apologize if this if this is seriously off topic but in my opinion DX9s days have come and gone.
You are right and I have thought about it but there is already enough trouble with the client as it is and I am not familiar with DX10. It should be easier to move to DX10 later. Currently I don't have a good picture about the layout of the client and there are a lot of open questions without answers and I am starting to understand why the project was shutdown from the first place.
jarmonik is offline   Reply With Quote
Old 10-02-2010, 11:10 AM   #6
Xyon
Puts the Fun in Dysfunctional
 
Xyon's Avatar


Default

As TL8 said, this is not the place to discuss which client should be developed, but a D3D9 client would represent a significant update to Orbiter's aging D3D7 native graphics, and I'd love to see this project survive and produce a working client.

I don't have the first clue about DirectX programming, but I believe someone (possibly Poscik, but I'm not sure) was developing the D3D9 client a few months back, perhaps he would be a good extra set of eyes on the code. Forget DX10 for now, that's a project in its own right and really DX10 has all but disappeared in favour of DX11.
Xyon is offline   Reply With Quote
Old 10-02-2010, 12:22 PM   #7
jarmonik
Beta Tester

Default

Quote:
Originally Posted by Xyon View Post
 ...but I believe someone (possibly Poscik, but I'm not sure) was developing the D3D9 client a few months back, perhaps he would be a good extra set of eyes on the code.
That would be great but why haven't anyone created a D3D9 client development thread earlier I wonder. In order to success in this project it's vital to share information and ideas.
jarmonik is offline   Reply With Quote
Old 10-02-2010, 12:29 PM   #8
Xyon
Puts the Fun in Dysfunctional
 
Xyon's Avatar


Default

I have wondered at this myself. Looking at the code already present in the project it's clear that someone or a collection of somebodys have put a fair amount of work into the concept, but there is no thread on the development.

Well, until now, of course. I really wish I could assist on a technical level but I fear I would be more of a hindrance than an asset right now. :/
Xyon is offline   Reply With Quote
Old 10-02-2010, 12:35 PM   #9
tl8
Addon Developer
 
tl8's Avatar

Default

Quote:
Originally Posted by jarmonik View Post
 That would be great but why haven't anyone created a D3D9 client development thread earlier I wonder. In order to success in this project it's vital to share information and ideas.
Poscik has indeed got something done, I also think he got it partially working in Orbiter.

He has hit the same problem that the first group did back on M6.

Also as they hit that problem, they haven't moved to O-F and hence there is no thread on DX9 development.

Last edited by tl8; 10-02-2010 at 12:37 PM.
tl8 is offline   Reply With Quote
Thanked by:
Old 10-02-2010, 12:52 PM   #10
jarmonik
Beta Tester

Default

Quote:
Originally Posted by tl8 View Post
 Poscik has indeed got something done, I also think he got it partially working in Orbiter.
Then he is ahead of me a lot. I'll put my development on hold for now.

Quote:
Originally Posted by tl8 View Post
 He has hit the same problem that the first group did back on M6.
M6 Forum is down so, could someone tell me what is the problem they hit ?
jarmonik is offline   Reply With Quote
Old 10-02-2010, 01:08 PM   #11
Artlav
Aperiodic traveller
 
Artlav's Avatar

Default

There were problems with 2D panels giving crashes, and some add-ons (shuttle-a?) were CTDing as well.
The solution to 2D stuff was proposed as using textures, but was never done. Curiously, that's what was eventually implemented in the core, so now it should be less of a problem.

I tried to refurbish the DX9 code once into a working client for the current version, but i got too far out of my knowledge to make anything useful. Plus the code is quite out of date with the current OVP api, essentially a D3D7 client from that time with some improvements and DX7 calls replaced with DX9 ones.
Artlav is online now   Reply With Quote
Old 10-02-2010, 05:52 PM   #12
jarmonik
Beta Tester

Default

Yeah, It looks like the D3D7Client has changed a lot since the creation of D3D9 Project and the source codes are pretty much useless. Initial implementation is also made by replacing class and structure names with DirectX9 counterparts. That's probably the easiest way to get something done but what kind of results it will lead ?

I suppose one purpose of a graphics client is to provide a better graphics with features like normal mapping, reflections, planet multi-texturing and so on. Is the implementation of the client interface free enough for that ?

The programmable pipeline has a lot more freedom than the fixed function pipeline and it's more easier to use. Should the client move over to use the programmable pipeline ?

There are a lot of build in features in the DirectX9 like the ID3DXMesh interface and the ability to reduce and increase the face count of a mesh. Also, a vertex processing could be moved from the CPU to the GPU. It would seem that a proper client would require quite lot of design.

Are Poscik's source codes available from somewhere ?

BTW, does anyone know why clbkEditMeshGroup() is implemented ? I know what it does but where is it used and why ? Meshes are usually pretty much static.
jarmonik is offline   Reply With Quote
Old 10-07-2010, 01:07 AM   #13
Poscik
Addon Developer
 
Poscik's Avatar
Default

I didn't commit any code update to repository. D3D9 Client compiled from sources without changes in code will not work. Some problems with Orbiter Launchpad. I bypassed it, but really don't remember what I changed in code. As far as I remember, vessel was illuminated even in earth shadow. So light could "fly through" everything being unaffected. So as I wrote in PM, D3D9 has to be rewritten. There are plenty of API functions, that aren't implemented.

I also don't have any OVP sources on my HDD.

[EDIT]
Ah, I finally realised how I made it to work. I had to exclude some headers and source files from project.

Last edited by Poscik; 10-07-2010 at 01:29 AM.
Poscik is offline   Reply With Quote
Thanked by:
Old 10-07-2010, 11:52 AM   #14
jarmonik
Beta Tester

Default

Quote:
Originally Posted by Poscik View Post
 So as I wrote in PM, D3D9 has to be rewritten. There are plenty of API functions, that aren't implemented.
Yes, I agree. There is no point in making a D3D9Client the same way as the D3D7Client. Most of the code would need to be rewriten from most parts.

Looks like the surface manager is already rewritten to use D3DXCreateTextureFromFile and D3DXCreateTextureFromFileInMemory. Which is good. I assume, that part of the code is fully operational.

The device ennumeration can be removed. There is not much to ennumerate and the little there is can be implemented later. Also, there is no need for the VideoTab at this point of development. In a code that I have been working on, all configurations will come from D3D9Client.cfg file.

I have been working on a D3D9ClientSurface interface. It's a class that will encapsule a IDirect3DTexture9 and IDirect3DSurface9 interfaces. It can change the surface type and format in a fly. It will also provide a blitting with a source colorkey. Target colorkey will cause a performance impact if used. Also a use of GDI drawing, in a cases where the GDI surface is also a target surface for HW blitting, will cause a performance impact. A use of a sketchpad would solve the problem.

The D3D9Mesh class should be rewritten to use a ID3DXMesh interface and HW vertex processing. Also, that would probably reduce the code lines in half. But there is also a problem in HW vertex processing due to single-precision floating point numbers. Currently I am aware of only one situation and that's when a camera is near the surface of a planet. One possibility is to use different rendering technique near a surface (below 100km), that would include creating a reference point for surface mesh near the surface instead of planet's center. That might also allow a better atmospheric implementation. I suppose the D3D7Client has already a solution in this problem but I haven't been able to pinpoint the code section.

I suppose the first goal should be geting the basic things to work like:
-Vessel exterior
-Virtual cockpit
-Glass cockpit
-2D Panel
-HUD
-Planet Rendering from high orbit (>100k)
-Celestial Grid, Stars, Constellations.

Things to implement later:
- Particle systems
- Cloud rendering
- Atmospheric haze
- Surface bases
- Near surface rendering (requires a lot of design work)
jarmonik is offline   Reply With Quote
Old 10-08-2010, 06:32 PM   #15
Poscik
Addon Developer
 
Poscik's Avatar
Default

Ok, I just have to complete whole stuff after HDD change, and I can help you. But only a little I can do only simple things in directx, but "Documentation is your friend".
Poscik 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 02:57 PM.

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.