Question Ranger (and other ships) from Interstellar?

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,707
Reaction score
2,683
Points
203
Location
Dallas, TX
YES. If you exit and reload then they are ok. So it let me to think that the movement was changing the vectors

then in the save:
Code:
void TESTVC::clbkSaveState(FILEHANDLE scn)
{
	// ORBITER, default vessel parameters
	char cbuf[256];

	SaveDefaultState(scn);

	sprintf(cbuf, "%d %0.4f", CARGO1_status, CARGO1_proc);
	oapiWriteScenario_string(scn, "CARGO1", cbuf);

	sprintf(cbuf, "%d %0.4f", CARGO2_status, CARGO2_proc);
	oapiWriteScenario_string(scn, "CARGO2", cbuf);

	sprintf(cbuf, "%d %0.4f", CARGO3_status, CARGO3_proc);
	oapiWriteScenario_string(scn, "CARGO3", cbuf);
and load:
Code:
SetAttachmentParams(CARGO3, CARGO3_pos, _V(-.866, -.5, 0), _V(0, 0, -1));

I don't get as bad as some
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,616
Reaction score
2,336
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
YES. If you exit and reload then they are ok. So it let me to think that the movement was changing the vectors

You are not changing the rotation vectors there, so I doubt it is really the problem - unless you have a mismatch somewhere.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,707
Reaction score
2,683
Points
203
Location
Dallas, TX
On to the ranger vc. I have 2 textures. I get a CTD on this. When I run the debugger is says a ddraw.dll error.
rangerdrawerror.jpg


and points at this line:
Code:
oapiVCRegisterArea(AID_CENTERFUELSTATUS, _R(0, 0, 486, 302), PANEL_REDRAW_USER, PANEL_MOUSE_IGNORE, PANEL_MAP_BACKGROUND, tex4);

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



	viewController->HandleLoadVC(id);
	mfdController->HandleLoadVC(id);
	tarsTerminalScreen->HandleLoadVC(id);
	oapiVCRegisterArea(AID_FUELSTATUS, _R(0, 0, 486, 416), PANEL_REDRAW_USER, PANEL_MOUSE_IGNORE, PANEL_MAP_BACKGROUND, tex3);

	SURFHANDLE const tex4 = oapiGetTextureHandle(meshhg_VC, GRP_NEWRANGER15VC_CENTERINFOSCREEN);
	oapiVCRegisterArea(AID_CENTERFUELSTATUS, _R(0, 0, 486, 302), PANEL_REDRAW_USER, PANEL_MOUSE_IGNORE, PANEL_MAP_BACKGROUND, tex4);
//	static VCHUDSPEC huds = { 6, GRP_LANDER15VC_HUD, { -.842, 3.664734, 8.022912 }, 0.496 };
//	oapiVCRegisterHUD(&huds);

	return HandleLoadVC(id);
}

if I comment it out no ctd.
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,616
Reaction score
2,336
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
not sure what you mean?

If you have still optimizations of the compiler enabled in your debug builds, the source line reported by the debugger must not be the source code line that really caused the bug. The order of instructions is changed and some source lines are merged into one by it.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,707
Reaction score
2,683
Points
203
Location
Dallas, TX
oh

I have this set for optimizations in the c/C++
Disabled (/Od)
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,616
Reaction score
2,336
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
oh

I have this set for optimizations in the c/C++
Disabled (/Od)

OK, then this should fit. Any information from the stack trace, where the issue starts to develop?
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,707
Reaction score
2,683
Points
203
Location
Dallas, TX
In the call stack. It says:
> RANGER1001C.dll!RANGER::clbkLoadVC(int id) Line 1399 C++
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,707
Reaction score
2,683
Points
203
Location
Dallas, TX
on the ranger. trying to add a HUD screen. But the hud screen on the other side bleeds thru the center section. I tried adding that center section to the vc mesh and no change. The other option is to move the hud in front of the pilot face.

Any ideas?
RANGERHUD1c.jpg

RANGERHUD1b.jpg
 

Lisias

Space Traveller Wanna-be
Joined
May 31, 2015
Messages
346
Reaction score
3
Points
18
Website
www.youtube.com
on the ranger. trying to add a HUD screen. [...] The other option is to move the hud in front of the pilot face.

I like the idea of the HUD being "projected" into the Helmet's glass - more or less as done on modern jet fighters or Cobra Attack Helicopters. :)
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,707
Reaction score
2,683
Points
203
Location
Dallas, TX
Ok. But there is a problem. There seems to be only 4 positions per station in the vc.
Code:
{ "Looking to Console", { -0.955771, 1.152136, 0.516502 }, { -0.013481, -0.392474, 0.919664 }, 0.0 },
	{ "Looking through Front Window", { -0.955771, 1.152136, 0.516502 }, { 0, 0, 1 }, 0.0 },
	{ "Looking to Left Window", { -0.955771, 1.152136, 0.516502 }, { -0.977637, 0.004814, 0.210246 }, 0.0 },
	{ "Look to TARS", { -0.955771, 1.152136, 0.516502 }, { 0.815848, -0.196343, 0.543913 }, 0.0 }

We would need a HUD station.

---------- Post added 06-29-16 at 05:47 AM ---------- Previous post was 06-28-16 at 09:05 PM ----------

Well another issue. Is the crew guys head gets in the way. If you get too close you don't get the grid lines.

The easiest you be to not have a hud. But next to that would be to get the bleed thru fixed.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,707
Reaction score
2,683
Points
203
Location
Dallas, TX
closer. But is there a way to tell what the elevator is set at? We are using the nose as an elevator. But I need to know what it is set at?

Code:
void RANGER::CreateControlSurfaces() {
	int i = 0;
	control_surfaces[i++] = CreateControlSurface3(AIRCTRL_ELEVATOR, 19.36, 6.25, _V(0, .5, 3.83), AIRCTRL_AXIS_XNEG, 3.5, anim_NOSE);
	control_surfaces[i++] = CreateControlSurface3(AIRCTRL_AILERON, 9.68, 3.125, _V(-.5, .5, 3.83), AIRCTRL_AXIS_AUTO, 3.5);
	control_surfaces[i++] = CreateControlSurface3(AIRCTRL_AILERON, 9.68, 3.125, _V(+.5, .5, 3.83), AIRCTRL_AXIS_AUTO, 3.5);
	control_surfaces[i++] = CreateControlSurface3(AIRCTRL_RUDDER, 9.68, 3.125, _V(0, .5, 3.83), AIRCTRL_AXIS_AUTO, 3.5);
}
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,616
Reaction score
2,336
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
You mean VESSEL::GetControlSurfaceLevel?
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,707
Reaction score
2,683
Points
203
Location
Dallas, TX
yES Thanks. Now the really big issue is the attachment distortion. It seems to worsen over time.
ENDURANCEDISTORTION1.jpg

endurancecargo1.1%5B2%5D.jpg
 

Urwumpe

Not funny anymore
Addon Developer
Donator
Joined
Feb 6, 2008
Messages
37,616
Reaction score
2,336
Points
203
Location
Wolfsburg
Preferred Pronouns
Sire
yES Thanks. Now the really big issue is the attachment distortion. It seems to worsen over time.
ENDURANCEDISTORTION1.jpg

endurancecargo1.1%5B2%5D.jpg

Did you define the attachment as "loose"? Maybe that is the problem and also a new Orbiter bug.
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,707
Reaction score
2,683
Points
203
Location
Dallas, TX
I guess it is not loose?

8.51.3.274 ATTACHMENTHANDLE VESSEL::CreateAttachment (bool toparent, const VECTOR3 & pos, const VECTOR3 & dir, const VECTOR3 & rot, const char∗id, bool loose = false) const Define a new attachment point for a vessel.
Parameters: toparent If true, the attachment can be used to connect to a parent (i.e. the vessel acts as a child). Otherwise, attachment is used to connect to a child (i.e. vessel acts as parent) pos attachment point position in vessel coordinates [m] dir attachment direction in vessel coordinates rot longitudinal alignment vector in vessel coordinates id compatibility identifier loose If true, allow loose connections (see notes)

Code:
CARGO7 = CreateAttachment(false, _V(-17.7, 10.15, 1.12), _V(-.866, .5, 0), _V(0, 0, -1), "CARGO7");

Code:
	SetAttachmentParams(CARGO7, CARGO7_pos, _V(-.866, .5, 0), _V(0, 0, -1));
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,707
Reaction score
2,683
Points
203
Location
Dallas, TX
Well 2 issues. One fps are bad like 4.
The vc is set as user:
Code:
bool TESTVC::clbkLoadVC(int id) { // ID is the Preset Camera Position
	SURFHANDLE const tex3 = oapiGetTextureHandle(meshhg_VC, TEX_ENDURANCE34VC_ENDURANCEVC2E);
	LAPTOPTerminalScreen->HandleLoadVC(id);

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


	oapiVCRegisterHUD(&huds);

	return HandleLoadVC(id);
}


then if the thrustlevel, fuel level or pod changes show change.
Code:
fuel_percent = int(100 * (GetFuelMass()) / (FUELMASS));

	if (fuel_percent != fuel_percent_last_redraw){
		fuel_percent_last_redraw = fuel_percent;
			oapiVCTriggerRedrawArea(-1, AID_FUELSTATUS);
	}
	current_thrust_level = GetThrusterLevel(th_main[0]);

	if (current_thrust_level != thrust_last_drawn){
		thrust_last_drawn = current_thrust_level;
		oapiVCTriggerRedrawArea(-1, AID_FUELSTATUS);
	}

	if (PODSel != PODSel_last_drawn){
		PODSel_last_drawn = PODSel;
		oapiVCTriggerRedrawArea(-1, AID_FUELSTATUS);
	}


	switch (viewController->station()->id) {
	case VC_STATION_PILOT:
		// Yes, we are on the Pilot station right now
		huds.hudcnt = _V(-.64, -16.186, 7.217);
	
		break;

	case VC_STATION_COPILOT:
		// Yes, we are on the COPilot station right now
		huds.hudcnt = _V(.64, -16.186, 7.217);
		
		break;

	default:
		// Never show any of them
		
		break;
	}
The only thing that is part of the vc is a terminal screen where text is displayed. It is set as user also.
updated my driver and now great fps
2. I get no distortion on the attachments but others do.

---------- Post added 07-13-16 at 05:00 PM ---------- Previous post was 07-12-16 at 08:06 PM ----------

Ok I am getting the distortion. The attachment seems valid. Maybe I need to change the cargo attachment?
endurancecargo8.jpg

Code:
CARGO1 = CreateAttachment(false, _V(0, -20.2, 1.12), _V(0, -1, 0), _V(0, 0, -1), "CARGO1",true);
	CARGO2 = CreateAttachment(false, _V(0, -21.75, 1.12), _V(0, -1, 0), _V(0, 0, -1), "CARGO2", true);
	CARGO3 = CreateAttachment(false, _V(-17.7, -10.15, 1.12), _V(-.866, -.5, 0), _V(0, 0, -1), "CARGO3", true);//-17.7 -10.15 1.12  -.866 -.5 0
	CARGO4 = CreateAttachment(false, _V(-19.2, -11.0, 1.12), _V(-.866, -.5, 0), _V(0, 0, -1), "CARGO4", true);//-19.2 -11.0 1.12
	CARGO5 = CreateAttachment(false, _V(-20.3, 0, 1.12), _V(-1, 0, 0), _V(0, 0, -1), "CARGO5", true);
	CARGO6 = CreateAttachment(false, _V(-21.8, 0, 1.12), _V(-1, 0, 0), _V(0, 0, -1), "CARGO6", true);
	CARGO7 = CreateAttachment(false, _V(-17.7, 10.15, 1.12), _V(-.866, .5, 0), _V(0, 0, -1), "CARGO7", true);
	CARGO8 = CreateAttachment(false, _V(-19.2, 11.0, 1.12), _V(-.866, .5, 0), _V(0, 0, -1), "CARGO8", true);
	CARGO9 = CreateAttachment(false, _V(0, 20.2, 1.12), _V(0, 1, 0), _V(0, 0, -1), "CARGO9", true);
	CARGO10 = CreateAttachment(false, _V(0, 21.75, 1.12), _V(0, 1, 0), _V(0, 0, -1), "CARGO10", true);
	CARGO11 = CreateAttachment(false, _V(17.7, 10.15, 1.12), _V(.866, .5, 0), _V(0, 0, -1), "CARGO11", true);
	CARGO12 = CreateAttachment(false, _V(19.2, 11.0, 1.12), _V(.866, .5, 0), _V(0, 0, -1), "CARGO12", true);
	CARGO13 = CreateAttachment(false, _V(20.3, 0, 1.12), _V(1, 0, 0), _V(0, 0, -1), "CARGO13", true);
	CARGO14 = CreateAttachment(false, _V(21.8, 0, 1.12), _V(1, 0, 0), _V(0, 0, -1), "CARGO14", true);
	CARGO15 = CreateAttachment(false, _V(17.7, -10.15, 1.12), _V(.866, -.5, 0), _V(0, 0, -1), "CARGO15", true);
	CARGO16 = CreateAttachment(false, _V(19.2, -11.0, 1.12), _V(.866, -.5, 0), _V(0, 0, -1), "CARGO16", true);

the child attachment is :
Code:
P 0 -1.67 0  0 0 -1  0 1 0  POD
 
Last edited:

grid4dante

New member
Joined
Mar 22, 2011
Messages
34
Reaction score
0
Points
0
Location
Midwest City
How about this? Cargoes 3, 4, 7, 8, 11, 12, 15, and 16 are the only ones that have a 0.5 in them. They are also the only cargoes that distort. Could that be the cause?
 

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
8,707
Reaction score
2,683
Points
203
Location
Dallas, TX
Yes they are Cargo attachment spots that are not at right angles. I made the Endurance attachments loose.
Code:
CARGO3 = CreateAttachment(false, _V(-17.7, -10.15, 1.12), _V(-.866, -.5, 0), _V(0, 0, -1), "CARGO3", true);

and the cargo attachment loose also.
Code:
P 0 -1.67 0  0 0 -1  0 1 0 1  POD

An option might be to make additional attachment points on the cargo to match the Endurance. but I haven't been able to match them:(

---------- Post added at 05:57 AM ---------- Previous post was at 04:16 AM ----------

Another thought might be the orientation on the cargo mesh?
cargoorint_zpskwftznm2.jpg
[/URL][/IMG]
 
Top