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 01-15-2019, 07:34 PM   #4771
DaveS
Addon Developer
 
DaveS's Avatar


Default

Quote:
Originally Posted by Donamy View Post
 Where do I list the flag in the mesh file ? Example ?
I believe DaveS asked about this also, but I couldn't find the post.
The FLAG parameter goes with the main parameter items that's specified at the beginning of each mesh group.


Example:
Code:
LABEL rect
MATERIAL 2
TEXTURE 2
GEOM 16 8 ; rect
1.98397 0.543818 -6.71276 0.884949 0.465689 0 0.221819 -0.279311
-1.04064 1.19721 -6.71276 0 1 0 0.262282 -0.279311
-1.51227 1.19721 -6.71276 0 1 0 0.221819 -0.279311
1.98397 0.543818 -6.98488 0.884949 0.465689 0 0.221819 -0.394903
1.04065 1.19721 -6.98488 0 1 0 0.262282 -0.394903
-1.98397 0.543818 -6.71276 -0.884948 0.465689 0 0.221819 -0.279311
1.76565 0.958691 -6.98488 0.884949 0.465689 0 0.262282 -0.394903
1.51228 1.19721 -6.71276 0 1 0 0.221819 -0.279311
-1.04064 1.19721 -6.98488 0 1 0 0.262282 -0.394903
1.04065 1.19721 -6.71276 0 1 0 0.262282 -0.279311
1.76565 0.958691 -6.71276 0.884949 0.465689 0 0.262282 -0.279311
1.51228 1.19721 -6.98488 0 1 0 0.221819 -0.394903
-1.76565 0.958691 -6.98488 -0.884948 0.465689 0 0.262282 -0.394903
-1.51227 1.19721 -6.98488 0 1 0 0.221819 -0.394903
-1.98397 0.543818 -6.98488 -0.884948 0.465689 0 0.221819 -0.394903
-1.76565 0.958691 -6.71276 -0.884948 0.465689 0 0.262282 -0.279311
8 13 1
2 1 13
14 5 12
15 12 5
9 11 4
11 9 7
6 0 3
0 6 10
So the FLAG parameter goes in like this:
Code:
LABEL rect
MATERIAL 2
TEXTURE 2
FLAG 1
GEOM 16 8 ; rect
1.98397 0.543818 -6.71276 0.884949 0.465689 0 0.221819 -0.279311
-1.04064 1.19721 -6.71276 0 1 0 0.262282 -0.279311
-1.51227 1.19721 -6.71276 0 1 0 0.221819 -0.279311
1.98397 0.543818 -6.98488 0.884949 0.465689 0 0.221819 -0.394903
1.04065 1.19721 -6.98488 0 1 0 0.262282 -0.394903
-1.98397 0.543818 -6.71276 -0.884948 0.465689 0 0.221819 -0.279311
1.76565 0.958691 -6.98488 0.884949 0.465689 0 0.262282 -0.394903
1.51228 1.19721 -6.71276 0 1 0 0.221819 -0.279311
-1.04064 1.19721 -6.98488 0 1 0 0.262282 -0.394903
1.04065 1.19721 -6.71276 0 1 0 0.262282 -0.279311
1.76565 0.958691 -6.71276 0.884949 0.465689 0 0.262282 -0.279311
1.51228 1.19721 -6.98488 0 1 0 0.221819 -0.394903
-1.76565 0.958691 -6.98488 -0.884948 0.465689 0 0.262282 -0.394903
-1.51227 1.19721 -6.98488 0 1 0 0.221819 -0.394903
-1.98397 0.543818 -6.98488 -0.884948 0.465689 0 0.221819 -0.394903
-1.76565 0.958691 -6.71276 -0.884948 0.465689 0 0.262282 -0.279311
8 13 1
2 1 13
14 5 12
15 12 5
9 11 4
11 9 7
6 0 3
0 6 10
Here's the link to the post that contains the updated D3D9Client.dll module that links the FLAG parameter to the vessel self-shadows: https://www.orbiter-forum.com/showth...postcount=4739

Last edited by DaveS; 01-15-2019 at 07:36 PM.
DaveS is online now   Reply With Quote
Old 01-15-2019, 08:15 PM   #4772
Donamy
Beta Tester


Default

So it only works with Beta ?
Donamy is offline   Reply With Quote
Old 01-15-2019, 08:17 PM   #4773
DaveS
Addon Developer
 
DaveS's Avatar


Default

Quote:
Originally Posted by Donamy View Post
 So it only works with Beta ?
Yes, at the moment, only the D3D9Client for the beta has this implemented.
DaveS is online now   Reply With Quote
Old 01-15-2019, 09:14 PM   #4774
jarmonik
Beta Tester

Default

Here's the latest snapshot from the SVN. I haven't had time to test them but should be working.
Attached Files
File Type: zip D3D9ClientR3.5-forOrbiter2016(r1049).zip (1.69 MB, 10 views)
File Type: zip D3D9ClientBeta28.4-forBETA r84(r1050).zip (1.70 MB, 13 views)
jarmonik is offline   Reply With Quote
Thanked by:
Old 01-16-2019, 02:04 AM   #4775
Donamy
Beta Tester


Default

Works perfectly in 3.5 !!
Donamy is offline   Reply With Quote
Thanked by:
Old 01-16-2019, 07:36 AM   #4776
Phil Smith
Donator
 
Phil Smith's Avatar
Default

Hey guys!

Sorry if somebody reported the issue before, it's quite a looong topic here )) So bear with me.

Orbiter 2016 with d3d9 client lagging as hell with VNCMFD module enabled.
Some info - https://www.orbiter-forum.com/showth...&postcount=147

When it's switched off - everything's fine.
With default graphics it works fine as well.

So what can be causing the problem?

Cheers!

Last edited by Phil Smith; 01-16-2019 at 07:39 AM.
Phil Smith is offline   Reply With Quote
Old 01-16-2019, 09:57 AM   #4777
jarmonik
Beta Tester

Default

Quote:
Originally Posted by Phil Smith View Post
 So what can be causing the problem?
My guess is that incompatible systems are mixed. For an example the GDI/HDC stuff doesn't work well with the D3D9+ especially if you try to read something from the D3D.

So, you are trying to transfer an image from Orbiter over a wireless network ?

To do that properly, you would need an auxiliarry "helper" surface. Should be tested which one of these works better, I don't know.

Code:
hAux = oapiCreateSurfaceEx(w, h, OAPISURFACE_RENDERTARGET | OAPISURFACE_NOMIPMAPS | OAPISURFACE_LOCKABLE);
hAux = oapiCreateSurfaceEx(w, h, OAPISURFACE_SYSTEMMEM);
After that you would need to get "AsyncLock" for the surface to read the bits.

Code:
BITMAP bmp;

if (gcGetLockAsync(hAux, &bmp) == true) {

BYTE *pData = bmp.bmBits;
DWORD pitch = bmp.bmWidthBytes;
...etc...

gcReleaseLock(hAux);

// Blit the source surface to a helper surface
oapiBlt(hAux, hMFDRenerSurf, .....);
}
Right now we don't have "gcGetLockAsync" function implemented yet but can be done easily if needed.

Also should be noted that 3 frames of inactivity in hAux must exists before "AsyncLock" returns "true". Can't get an external lock on a surface if it exists in internal rendering queues of the DirectX.

Also, it should be possible to call "gcGetLockAsync" from a different thread but I am not exactly sure about it.

So, Are you a developper ?
.

Last edited by jarmonik; 01-16-2019 at 09:59 AM.
jarmonik is offline   Reply With Quote
Thanked by:
Old 01-16-2019, 10:34 AM   #4778
Phil Smith
Donator
 
Phil Smith's Avatar
Default

jarmonik
Thank you for your explanation!

PS.
Currently I'm not a developer and I have intermediate level of programming skills.
But I try to dig deeper into Orbiter modding territory to create my owns designs. I can easily make detailed 3d models, textures, but can't put them in the simulator yet

Cheers!
Phil Smith is offline   Reply With Quote
Old 01-16-2019, 05:14 PM   #4779
Donamy
Beta Tester


Default

Quote:
Originally Posted by Phil Smith View Post
 jarmonik
Thank you for your explanation!

PS.
Currently I'm not a developer and I have intermediate level of programming skills.
But I try to dig deeper into Orbiter modding territory to create my owns designs. I can easily make detailed 3d models, textures, but can't put them in the simulator yet

Cheers!

Welcome to the "Dark Side" of Orbiter.
Donamy is offline   Reply With Quote
Thanked by:
Old 01-17-2019, 05:54 AM   #4780
Phil Smith
Donator
 
Phil Smith's Avatar
Default

Quote:
Originally Posted by Donamy View Post
 Welcome to the "Dark Side" of Orbiter.
Haha! thanks! <Imperial march starts playing here>

I've got huge interest of building full function simpit including external HUD, so basically, as far as I know, it's possible using d3d9 client.
Phil Smith 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:12 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 - 2019, Jelsoft Enterprises Ltd.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.