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 10-12-2018, 07:10 PM   #4591
fred18
Addon Developer

Default

Do you think that there could be a way to have two instances of orbiter running synched on the same computer that shares data so I can have the video feed from one instance displayed in the other? it seems crazy even to me while i'm writing it, i know...
fred18 is offline   Reply With Quote
Old 10-12-2018, 08:22 PM   #4592
kuddel
Donator
Default

Here they are:
D3D9Client for Orbiter 2016
D3D9Client for Orbiter BETA (r84)

Both represent the current HEAD revision of the repository (r980) including the custom camera fix by Jarmo.

With some luck these are quite stable

For the record: Both were build with Visual Studio 2015
Attached Files
File Type: zip D3D9ClientR3.1-for2016(r980).zip (1.53 MB, 30 views)
File Type: zip D3D9ClientBeta27.1-forBETA r84(r980).zip (1.66 MB, 10 views)
kuddel is offline   Reply With Quote
Thanked by:
Old 10-12-2018, 08:54 PM   #4593
Abdullah Radwan
Orbinaut
Default

Quote:
Originally Posted by kuddel View Post
 Here they are:
D3D9Client for Orbiter 2016
D3D9Client for Orbiter BETA (r84)

Both represent the current HEAD revision of the repository (r980) including the custom camera fix by Jarmo.

With some luck these are quite stable

For the record: Both were build with Visual Studio 2015
Thanks! It works very well now. Can the code be edited to attachment points instead of docking ports? That's going be very useful on rocket launches.
Abdullah Radwan is offline   Reply With Quote
Old 10-12-2018, 09:25 PM   #4594
kuddel
Donator
Default

Quote:
Originally Posted by Abdullah Radwan View Post
 Thanks! It works very well now.
Fine. May I ask whether the original version (Visual Studio 2015) worked, or the Visual Studio 2017 proposal? Or both?

Quote:
Originally Posted by Abdullah Radwan View Post
 Can the code be edited to attachment points instead of docking ports?
Should be possible by using the attachment API methods ( AttachmentCount, GetAttachmentHandle and GetAttachmentParams) to get their position and orientation.
But I wonder what happens to those attachment points that are not "ridgitly fixed" to the vessel like the one at the end of the Shuttle's SRMS...

When I find some time I might take a look at that.

Quote:
Originally Posted by Abdullah Radwan View Post
 That's going be very useful on rocket launches.
Why that?

Last edited by kuddel; 10-12-2018 at 09:34 PM.
kuddel is offline   Reply With Quote
Old 10-13-2018, 03:17 AM   #4595
Abdullah Radwan
Orbinaut
Default

Quote:
Originally Posted by kuddel View Post
 Fine. May I ask whether the original version (Visual Studio 2015) worked, or the Visual Studio 2017 proposal? Or both?
I meant 2017 one.

Quote:
Originally Posted by kuddel View Post
 Should be possible by using the attachment API methods ( AttachmentCount, GetAttachmentHandle and GetAttachmentParams) to get their position and orientation.
But I wonder what happens to those attachment points that are not "ridgitly fixed" to the vessel like the one at the end of the Shuttle's SRMS...

When I find some time I might take a look at that.
A better idea will be the ability to enter the coordinates manually just like the old CameraMFD. Should be a better idea rather than attachment points. I will try to learn Orbiter SDK (If I get any time) and see what I can do with it.


Quote:
Originally Posted by kuddel View Post
 Why that?
To monitor the vessel from the ground, so I set the focus to the rocket with a ground free camera and control my mission from there. Like the cameras installed on Falcon 9 and Falcon Heavy.
Abdullah Radwan is offline   Reply With Quote
Old 10-13-2018, 07:19 AM   #4596
Abdullah Radwan
Orbinaut
Default

So I took the code and modified it heavily. This works very well for my purpose. Built and tested using Visual Studio 2017 and Orbiter 2016. Might improve it further and upload it on OrbitHanger.

It needs at least one attachment point to get the basic camera position then you can move the camera using the buttons.

Attached Files
File Type: zip CameraMFD.zip (19.2 KB, 15 views)
Abdullah Radwan is offline   Reply With Quote
Thanked by:
Old 10-13-2018, 09:44 AM   #4597
jarmonik
Beta Tester

Default

Quote:
Originally Posted by kuddel View Post
 But I wonder what happens to those attachment points that are not "ridgitly fixed" to the vessel like the one at the end of the Shuttle's SRMS...

Custom camera position and orientation can be updated by calling gcSetupCustomCamera() function with an existing camera handle passed to it. So, Is there an elegant way of acquiring the params for SRMS endpoint or do we need some kind of gcAPI function for that like gcMeshGroupToLocal() passing a fixed point from a mesh group to local vessel frame. Also, MATRIX4 gcGetMeshGroupTransform() could do the trick.

---------- Post added at 12:44 ---------- Previous post was at 12:38 ----------

Quote:
Originally Posted by fred18 View Post
 Do you think that there could be a way to have two instances of orbiter running synched on the same computer that shares data so I can have the video feed from one instance displayed in the other? it seems crazy even to me while i'm writing it, i know...

That sounds complicated. What are you trying to do exactly ?
jarmonik is offline   Reply With Quote
Old 10-14-2018, 07:20 AM   #4598
francisdrake
Addon Developer
Default

I would need advice how to properly load meshes when using the D3D9 client.
For my Starliner I get CTD's about every other run when starting up, while the standard graphics client is behaving better.

I tried several loading methods, as shown below. The same eratic behaviour. The docs mentions to avoid GetMesh() (which I do not use, at least not explicitely) and use the DEVMESHANDLE. Can I use the returned handle the same as a normal MESHHANDLE?

Classical:
MESHHANDLE cmMesh, ...
cmMesh = oapiLoadMeshGlobal("CST-100\\CST-100-cm");
AddMesh(cmMesh, &ofs);

No handle:
AddMesh("CST-100\\CST-100-cm", &ofs);
// Unfortunately this cannot be used for all meshes. If the mesh is modified later on, the meshhandle is needed. This method takes a second longer to crash at startup.

Cast DEVMESHHANDLE:
DEVMESHHANDLE cmMesh, ...
cmMesh = (DEVMESHHANDLE) oapiLoadMeshGlobal("CST-100\\CST-100-cm");
AddMesh(cmMesh, &ofs);
francisdrake is offline   Reply With Quote
Old 10-14-2018, 06:18 PM   #4599
Abdullah Radwan
Orbinaut
Default

Quote:
Originally Posted by jarmonik View Post
 Just to clarify, that it's permitted to have a custom cameras in a non focus vessels but they are not producing a video feed. Currently a live feed can only come from a focus vessel. This, of course, could be easilly extended to any near-by vessel. Where "near-by" means about 100m to 100km depending on camera altitude.


I have only tested the custom camera interface with a camera MFD (using a multiple instances in multiple vessels), so, bugs may exists those are not catched with that test.
What about rendering the area near any vessel has a custom camera in the scenario? Shouldn't be too difficult for today powerful computers.
Abdullah Radwan is offline   Reply With Quote
Old 10-14-2018, 09:43 PM   #4600
fred18
Addon Developer

Default

Quote:
Originally Posted by jarmonik View Post
 That sounds complicated. What are you trying to do exactly ?
just to see from my vessel (which is a simulated Mission Control Center) what the other vessel sees
fred18 is offline   Reply With Quote
Old 10-14-2018, 10:03 PM   #4601
jarmonik
Beta Tester

Default

Quote:
Originally Posted by Abdullah Radwan View Post
 What about rendering the area near any vessel has a custom camera in the scenario? Shouldn't be too difficult for today powerful computers.

That would require to rewrite the tile manager that is responsible to load/unload surface tiles and managing tile resolution levels. That isn't the most simpliest part of the client.


Also, an other problem is the limit of 3GB of usable memory. If the current graphics settings are pushed high enough the 3GB will run out even without an additional scenery.


It should be possible to add a support for some kind of remote control scenarios (with some limitations). But what exactly did you have in mind ?

---------- Post added at 01:03 ---------- Previous post was at 00:53 ----------

Quote:
Originally Posted by fred18 View Post
 just to see from my vessel (which is a simulated Mission Control Center) what the other vessel sees
Ok, I'll think about it.
jarmonik is offline   Reply With Quote
Thanked by:
Old 10-15-2018, 03:48 AM   #4602
Abdullah Radwan
Orbinaut
Default

Quote:
Originally Posted by jarmonik View Post
 That would require to rewrite the tile manager that is responsible to load/unload surface tiles and managing tile resolution levels. That isn't the most simpliest part of the client.


Also, an other problem is the limit of 3GB of usable memory. If the current graphics settings are pushed high enough the 3GB will run out even without an additional scenery.


It should be possible to add a support for some kind of remote control scenarios (with some limitations). But what exactly did you have in mind ?

Let's take a Falcon 9 launch as an example. I'll set the focus to Falcon 9 with a free ground cam. Using my CameraMFD I put a camera in it. The problem is, when it goes higher than 100 km or so, it doesn't render the vessel correctly anymore. Also, I would like having a camera on the first stage (so not the focus vessel) and its landing pad so I can monitor it as well.


So I want to render the focus vessel no matter about its position (e.g. render Mars even I am at Earth for a Mars probe), as well as any non-focus vessel has a camera on it. I think this shouldn't exceed 3GB limitation (BTW, this is a DirectX 9 limitation or an Orbiter limitation?).
Abdullah Radwan is offline   Reply With Quote
Old 10-15-2018, 04:25 AM   #4603
Donamy
Beta Tester


Default

In 2010, you used to be able to focus on a different vessel, when looking at a preset camera view. 2016 you can't. When you select a different preset camera of a different vessel. It changes the focus to that vessel. Not good if you want to see a preset camera view, while the focus is on a different one. Wonder why it was changed.
Donamy is offline   Reply With Quote
Old 10-15-2018, 08:28 PM   #4604
jarmonik
Beta Tester

Default

Quote:
Originally Posted by francisdrake View Post
 Cast DEVMESHHANDLE:
DEVMESHHANDLE cmMesh, ...
cmMesh = (DEVMESHHANDLE) oapiLoadMeshGlobal("CST-100\\CST-100-cm");
AddMesh(cmMesh, &ofs);

This is a wrong thing to do.




Quote:
Originally Posted by francisdrake View Post
 Classical:
MESHHANDLE cmMesh, ...
cmMesh = oapiLoadMeshGlobal("CST-100\\CST-100-cm");
AddMesh(cmMesh, &ofs);

No handle:
AddMesh("CST-100\\CST-100-cm", &ofs);
// Unfortunately this cannot be used for all meshes. If the mesh is modified later on, the meshhandle is needed. This method takes a second longer to crash at startup.

Both of these methods are OK to load and assign a mesh template to a vessel.

When a vessel enters in a visual range a set of D3D9-specific meshes are created from assigned mesh templates.

If you need a DEVMESHHANDLE to modify a D3D9-specific mesh used in rendering, you can acquire it in VESSEL2::clbkVisualCreated() callback function by using VESSEL::GetDevMesh() function. GetDevMesh() is the only way (I know of) to get a valid DEVMESHHANDLE. This also works in "No handle" case presented above. You don't really need the MESHHANDLE (pointing into a mesh template).

If (for some reason) a mesh template is modified, it's possible to trigger an update of D3D9-specific mesh by calling VESSEL::MeshModified(). This should be avoided due to high performance cost.

Last edited by jarmonik; 10-15-2018 at 08:43 PM.
jarmonik is offline   Reply With Quote
Thanked by:
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 06:32 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 - 2018, Jelsoft Enterprises Ltd.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.