• ORBITER-FORUM will be temporarily closed at 2026-07-23 18:00 UTC while we complete some OF maintenance tasks. The amount of downtime is expected to take up to one hour, but probably less.

Question Ranger (and other ships) from Interstellar?

Thanks. Not sure how to implement that?

A matter of the Graphics Client developers. Not even sure if it is fully possible with Orbiter. As said above, you already have enough work to make sure you are not wasting time.

In rendering, its all about time and letting the specialist units do the work. Nothing is better suited for rendering tasks than a GPU.
 
As said above, you already have enough work to make sure you are not wasting time.

Not sure what you talking about.

On the Lander I can reduce the vc texture.

Endurance. Not sure about. It has 3 of the pod's interior. They are for looks only

But I can gut them and have 1 interior set and one with out
 
Sure and I can do that on Endurance also.

So I guess the Number of MFd might slow it down also?

This is why so many vert on Endurance
1H70TCi.jpg

xa5Lz7C.jpg

cXSPKFw.jpg
 
Last edited:
Is the interior part of the main mesh? Or can it be separated and displayed only as needed?
 
There are just 2 meshes. MAin which is the exterior and interior. And then a VC. Which is basically for mfd and status center.

I guess I could have it if the view = cryo show the lab lab mesh.,...

But then when looking from outside you wouldn't see any thing. Right now if you are looking outside the Endurance you can see inside. I could easily just darken the windows.

The interior is just eye candy.
 
There are just 2 meshes. MAin which is the exterior and interior. And then a VC. Which is basically for mfd and status center.

I guess I could have it if the view = cryo show the lab lab mesh.,...

But then when looking from outside you wouldn't see any thing. Right now if you are looking outside the Endurance you can see inside. I could easily just darken the windows.

The interior is just eye candy.

You could also select by the position of the camera relative to the vessel, which interior component would be visible. Displaying meshes that are not visible to the player is wasteful as well, but if you spend time for a visibility check this can again make the rendering slow. A simple iterative check with 100,000 buildings (with different levels of detail) in an add-on prototype resulted in 1 fps. Using a kd-tree got it back to 100 fps.

But again: I doubt the number of vertices is a big issue. I rather think just displaying the meshes without any painting would be fast enough as well.
 
Last edited:
Thanks. Well then Next I will redo the vc with 256x256 textures and see
 
In fact, I wondered why the VC visual you have such a low FPS, so when it is in VC mode, you have rendered whole ship? Suggest taking a mesh only to external view, with no special interior, and a mesh with VC and only detailed interior, removing all the rest.
 
Just so we are on the same page

1 mesh (exterior) no vc and no interior

then another mesh with vc and interior

Then set the visibilty to be seen when needed?
 
Then set the visibilty to be seen when needed?

Yes. In the simplest way: You only have those inner meshes visible in external view, that can be seen from outside, and only with enough details to be visible. What doesn't fill a pixel when rendered from outside, does not need to be rendered at all.

For example, most spacecraft displays and indicators would be invisible, only some warning lights might be prominent enough to be seen from outside.

When you switch to an internal view, you display only what is visible from inside and those parts outside, that can be seen through a window. Or you replace the outside by a vastly simplified mesh, that can still be seen with tools like CameraMFD.

Same principles can be applied to a finer level:


  • You only use those meshes visible from a VC position.
  • When having an outside view of the camera or see the spacecraft from inside another vessel, you display only those internal parts at low resolution which are visible at all. How to check what is visible is mostly an artistic decision. The simpler the checks, the faster they execute, but the more often they either display too much or not enough.
  • You also render special displays at multiple resolutions, and display the version most suitable for the distance to the camera.
 
Ok. Thanks. Actually When in cockpit view we have camera view to outside the ship. Like the docks,....

But I will make the 2 meshes and we will see.

---------- Post added at 07:50 PM ---------- Previous post was at 12:39 PM ----------

Well I divided the meshes. 1 Exterior
35107 vert
Then I have the cockpit/interior
and VC.

but I get a CTD now. Nothing in the log:(
Code:
	SetMeshVisibilityMode(meshi_Vessel = AddMesh(meshhg_Vessel = oapiLoadMeshGlobal("INTERSTELLAR\\VESSEL\\ENDURANCE\\enduranceexterior")), MESHVIS_EXTERNAL | MESHVIS_EXTPASS);
	iMeshINTERIOR = AddMesh("INTERSTELLAR\\VESSEL\\ENDURANCE\\enduranceinterior");
	SetMeshVisibilityMode(iMeshINTERIOR, MESHVIS_COCKPIT);

	//iMeshVC = AddMesh("INTERSTELLAR\\VESSEL\\ENDURANCE\\endurance36newvc");
	//SetMeshVisibilityMode(iMeshVC, MESHVIS_VC);
	SetMeshVisibilityMode(meshi_VC1 = AddMesh(meshhg_Vessel), MESHVIS_VC);
	SetMeshVisibilityMode(meshi_VC = AddMesh(meshhg_VC = oapiLoadMeshGlobal("INTERSTELLAR\\VESSEL\\ENDURANCE\\endurance36newvc")), MESHVIS_VC);

Not sure if the VC and interior should be combined? The vc is basically the mfd, hud,...
 
It looks a bit strange, but OK. I would not add the exterior again, but instead use MESHVIS_ALWAYS there.

Are the animations still referencing to the correct meshes? did you update the animation group numbers? Etc.
 
Thanks. I got the meshes to show. BUT. We need to external ship to show in the cockpit view also. This is why the interior and exterior were combined.

The reason is so in cockpit view you can see the ships docked.
 
Thanks. I got the meshes to show. BUT. We need to external ship to show in the cockpit view also. This is why the interior and exterior were combined.

The reason is so in cockpit view you can see the ships docked.

Could you make only the relevant external parts that need to be visible actually be part of the VC?
 
Well that would be the whole mesh. We have camera so you can see the 2 Landers and rangers docks. LEt me ask the others about the having those camera and then the cockpit view and vc are internal


Since you only have 1 external camera.

With the 256 x256 texture it seems to help also.
 
Confused. Iam using a 256x256 texture. I adjusted the values to fit the new texture. But no bars and no text?

So I am running the debugger.

It seems to break here:
Code:
	SetMeshVisibilityMode(meshi_Vessel = AddMesh(meshhg_Vessel = oapiLoadMeshGlobal("INTERSTELLAR\\VESSEL\\ENDURANCE\\endurance14")), MESHVIS_ALWAYS | MESHVIS_EXTPASS);
	SetMeshVisibilityMode(meshi_VC1 = AddMesh(meshhg_Vessel), MESHVIS_VC);
	SetMeshVisibilityMode(meshi_VC = AddMesh(meshhg_VC = oapiLoadMeshGlobal("INTERSTELLAR\\VESSEL\\ENDURANCE\\ENDURANCE36NEWvc")), MESHVIS_VC);

Code:
	MESHHANDLE meshhg_Vessel, meshhg1_Vessel, meshhg_VC, meshhg_CREW[5];
	UINT meshi_Vessel, meshi_VC, meshi_VC1, meshi_CREW[5];
It breaks on this line:
Code:
	SetMeshVisibilityMode(meshi_VC = AddMesh(meshhg_VC = oapiLoadMeshGlobal("INTERSTELLAR\\VESSEL\\ENDURANCE\\ENDURANCE36NEWvc")), MESHVIS_VC);


---------- Post added 12-09-16 at 05:42 AM ---------- Previous post was 12-08-16 at 06:36 PM ----------

I redid the code following the DG example

but it still has a break here: where it loads the VC

Code:
SetMeshVisibilityMode(AddMesh(meshhg_Vessel = oapiLoadMeshGlobal("INTERSTELLAR\\VESSEL\\ENDURANCE\\endurance14")), MESHVIS_EXTERNAL);


	//meshi_VC1 = AddMesh("INTERSTELLAR\\VESSEL\\ENDURANCE\\endurance14");
	//SetMeshVisibilityMode(meshi_VC1, MESHVIS_VC);


	SetMeshVisibilityMode(AddMesh(meshhg_VC = oapiLoadMeshGlobal("INTERSTELLAR\\VESSEL\\ENDURANCE\\ENDURANCE36NEWvc")), MESHVIS_VC);

I also declared;
Code:
meshhg_VC = NULL;
	meshhg_Vessel = NULL;

and in the h:
Code:
MESHHANDLE meshhg_Vessel, meshhg_VC;

TWisRV7.jpg


---------- Post added at 05:06 PM ---------- Previous post was at 05:42 AM ----------

Well I went back to this:
Code:
	SetMeshVisibilityMode(meshi_Vessel = AddMesh(meshhg_Vessel = oapiLoadMeshGlobal("INTERSTELLAR\\VESSEL\\ENDURANCE\\endurance14")), MESHVIS_ALWAYS | MESHVIS_EXTPASS);
	SetMeshVisibilityMode(meshi_VC1 = AddMesh(meshhg_Vessel), MESHVIS_VC);
	SetMeshVisibilityMode(meshi_VC = AddMesh(meshhg_VC = oapiLoadMeshGlobal("INTERSTELLAR\\VESSEL\\ENDURANCE\\ENDURANCE36NEWvc")), MESHVIS_VC);

Still no hud and bar and drawing on vc.

I put this here to see if it goes there and it does.
Code:
void TESTVC::RedrawPanel_Fuelstatus(SURFHANDLE surf, int part)

{
	
	sprintf(oapiDebugString(), "Fuel %f", fuel_percent);
	
	//SURFHANDLE const tex3 = oapiGetTextureHandle(meshhg_VC,5 );
	char cbuf[20];
	HDC hDC = oapiGetDC(surf);



	
	level2 = GetPropellantMass(tank);

	SelectObject(hDC, g_Param.hBrush[3]);//green box

	level3 = ((level2 / FUELMASS)*118.5);
	Rectangle(hDC, 2, 174, (int)(57.0 + level3), 217);  //fuel

	//THRUST
	level = GetThrusterLevel(th_main[0]);
	//double level2 = GetPropellantMass(tank);

	SelectObject(hDC, g_Param.hBrush[3]);//green box
	Rectangle(hDC, 57, 56, (int)(57 + level * (173 - 57)), 800);//thrust
	//POD
	SetTextColor(hDC, RGB(0, 153, 0));
	SetTextAlign(hDC, TA_LEFT);
	SetBkMode(hDC, TRANSPARENT);

	SelectObject(hDC, g_Param.hFont[2]);

	if (PODSel == 1) {
		sprintf(cbuf, "POD 1 Selected", 14);
		TextOut(hDC, 72, 200, cbuf, strlen(cbuf));
...
	}

Code:
bool TESTVC::clbkLoadGenericCockpit() {
	viewController->HandleLoadGC();
	return true;
}

bool TESTVC::clbkLoadVC(int id) { // ID is the Preset Camera Position
	SURFHANDLE const tex3 = oapiGetTextureHandle(meshhg_VC, TEX_ENDURANCE36NEWVC_ENDURANCEVC2F);


	viewController->HandleLoadVC(id);
mfdController->HandleLoadVC(id);	
	oapiVCRegisterArea(AID_FUELSTATUS, _R(0, 0, 256, 256), PANEL_REDRAW_USER, PANEL_MOUSE_IGNORE, PANEL_MAP_BACKGROUND, tex3);
	//oapiVCRegisterArea(AID_THRUSTSTATUS, _R(0, 0, 512, 512), PANEL_REDRAW_USER, PANEL_MOUSE_IGNORE, PANEL_MAP_BACKGROUND, tex3);
	//oapiVCRegisterArea(AID_PODSTATUS, _R(0, 0, 512, 512), PANEL_REDRAW_USER, PANEL_MOUSE_IGNORE, PANEL_MAP_BACKGROUND, tex3);

	oapiVCRegisterHUD(&huds);

	return HandleLoadVC(id);
}

bool TESTVC::HandleLoadVC(UINT const id)
{



	return true;
}

bool TESTVC::clbkVCMouseEvent(int id, int event, VECTOR3 &p)
{
	bool result = false;
	result = result || mfdController->HandleMouseEvent(id, event, p);
	result = result || VCMouseEvent(id, event, p);
	return result;
}

bool TESTVC::VCMouseEvent(int const id, int const event, VECTOR3& const p)
{



	return false; // We must return false, as we didn't processed the event!
}



bool TESTVC::clbkVCRedrawEvent(int id, int event, SURFHANDLE surf) {
	bool result = false;
	result = result || mfdController->HandleRedrawEvent(id, event, surf);


	result = result || VCRedrawEvent(id, event, surf);


	{

		switch (id) {
		case AID_FUELSTATUS:
			RedrawPanel_Fuelstatus(surf, id - AID_FUELSTATUS);
			//sprintf(oapiDebugString(), "Fuel %f", fuel_percent);
			return true;
	
		}
		//	return false;



	}
	return result;
}

bool TESTVC::VCRedrawEvent(int const id, int const event, SURFHANDLE const surf) {
	return false;
}

When I exit I get a ctd also.
 
Last edited:
Thanks. Well the bars and the text output.

Code:
	SURFHANDLE const tex3 = oapiGetTextureHandle(meshhg_VC, TEX_ENDURANCE36NEWVC_ENDURANCEVC2F);

It shows it has the 8 texture.
Code:
// Number of textures:
#define NTEX_ENDURANCE36NEWVC	 	8

// Named textures:
#define TEX_ENDURANCE36NEWVC_DG_VC1	 	2
#define TEX_ENDURANCE36NEWVC_ENDURANCECOLORS	 	7
#define TEX_ENDURANCE36NEWVC_ENDURANCENAVBUTTONSNEW	 	5
#define TEX_ENDURANCE36NEWVC_ENDURANCENEWCARGOCENTER	 	6
#define TEX_ENDURANCE36NEWVC_ENDURANCEVC2E	 	3
#define TEX_ENDURANCE36NEWVC_ENDURANCEVC2F	 	8
#define TEX_ENDURANCE36NEWVC_MFD_DYNAMIC_05	 	4
#define TEX_ENDURANCE36NEWVC_SCREEN	 	1
 
Ok. Endurance and LAnder are using a 256 texture.

2 questions:
1 IS there a way to sharpen the text on the texture? I use Paint and added as text. I know I can paint on the texture but it will use fps?
iFjMxbc.jpg

218iIiK.jpg


2nd question. The center is a mfd but how can we write it to be on on with no the focus vessel?

When focused we can do this;
Code:
BEGIN_FOCUS
  Ship LANDER
END_FOCUS

BEGIN_CAMERA
  TARGET LANDER
  MODE Cockpit
  FOV 60.00
END_CAMERA

BEGIN_HUD
  TYPE Surface
END_HUD

BEGIN_MFD Left
  TYPE Orbit
  PROJ Frame
  FRAME Ecliptic
  REF Earth
END_MFD

BEGIN_MFD Right
  TYPE Orbit
  PROJ Frame
  FRAME Ecliptic
  REF Earth
END_MFD

BEGIN_MFD 5
  TYPE Surface
END_MFD

BEGIN_VC
END_VC

Or can hard code in on and always surface?
 
Back
Top