User mods, screenshots & videos > Plugins / Add-ons

Integrating with another sim

(1/43) > >>

planetsim:
Hi,

I am currently building a D3D11 based rendering engine for a space flight simulator called Orbiter. http://orbit.medphys.ucl.ac.uk/
It supports the simulation of the Solar System. I would love to try and integrate it with Outerra rendering. From what I understand so far, other planets are planned in the future once the engine is fully tested out with Earth.

I was wondering if its currently possible to set the camera position in Outerra through C++ or any other language. If I want to render spacecraft meshes on the top of what Outerra has rendered, is that possible ? What if I want to render a celestial sphere/stars and then make Outerra start its planet rendering ?

I want to try this only for Earth now of course.

John514:
Could be possible. Lets see what Cameni (one of the devs) thinks about that!
-------------------------------Off topic(kinda)---------------------------------
(BTW since you seem to interested, the launch for the ISS is about an hour from now.
http://www.ustream.tv/nasahdtv)

PytonPago:

--- Quote from: John514 on May 28, 2014, 02:22:43 pm ---Could be possible. Lets see what Cameni (one of the devs) thinks about that!
-------------------------------Off topic(kinda)---------------------------------
(BTW since you seem to interested, the launch for the ISS is about an hour from now.
http://www.ustream.tv/nasahdtv)

--- End quote ---

 ... wow ... just oppened it for lift-off. That was some timing ! .....

cameni:

--- Quote from: planetsim on May 28, 2014, 02:17:55 pm ---I was wondering if its currently possible to set the camera position in Outerra through C++ or any other language. If I want to render spacecraft meshes on the top of what Outerra has rendered, is that possible ? What if I want to render a celestial sphere/stars and then make Outerra start its planet rendering ?

--- End quote ---
It's possible to use the IGC API to control the camera externally, but that's mainly for cases when the cockpit is external (not rendered) as well. We could perhaps extend it to include the ability to control also the position & orientation of an imported model the same way.

planetsim:
Thank you for your reply, Cameni. Yeah so there are 3 things here:
1. Controlling the free camera, which is the mode that Outerra is in when started.
2. Controlling the transformation of imported models.
3. Controlling the camera when 'inside' a cockpit.

It seems that the IGC API already supports 1 so I can start using that.

For 2, one way to do it is to provide a base class called Vessel (or something similar) that implements the basic API for importing meshes and transforming/drawing them in the world frame. Each object of Vessel could have a world transformation matrix that will contain its position and orientation. If an user wants to add extra functionality to a vessel then he can derive from Vessel. During rendering this world matrix * view matrix * perspective projection matrix = final co-ordinates on screen.

For 3, its important to know that we are in 'cockpit mode' and which vessel/vehicle/model inside whose cockpit we are presently located. Once these are known then the mouse can be used to control a cockpit camera which I guess will use a different projection with a different field of view perhaps. It will probably have bounds on the amount it can translate in each direction. If the IGC API can provide functions to activate a cockpit camera and choose the vessel inside which to focus then this can be done pretty easily.

In Orbiter, the rendering engine keeps track of a few things things to ease the process of getting in to cockpit mode and out into the external world again. There is always a 'focus object' and the camera is generally focussed on it when the object is chosen. But it can be moved as far away from this object as we want. If the focussed object is a vessel(as opposed to a planet) and this vessel provides a mesh of the cockpit and a cockpit camera position, then pressing a key will activate the cockpit camera mode and the user will be 'inside'. Pressing another key brings him back out again to the external world with a free roving camera. The cockpit mode is simply the cockpit mesh as it looks like from inside, drawn after the scenery has finished drawing.


Navigation

[0] Message Index

[#] Next page

Go to full version