General Question D3D9 CTD ARTEMIS2

gattispilot

Addon Developer
Addon Developer
Joined
Oct 17, 2007
Messages
10,540
Reaction score
4,372
Points
203
Location
Dallas, TX
I am trying to help @barrygolden get d3d9 for 2016 to work for my artemis2.
It works in default but in d3d9 it ctd. Attached are the orbiter.log and the d3d9.
other vessels work in d3d9 also

the last lines in the d3d9 are these:
<font color=Gray>(334: 19.5s 00.02ms)(0x28A0)</font><font color=Olive> Vessel(0x161B01EC) ARTEMIS2 has 17 meshes</font><br>
<font color=Gray>(335: 19.5s 06.91ms)(0x28A0)</font><font color=Olive> Mesh(0x19EC7810) Offset = (0, 0, 0)</font><br>
<font color=Gray>(336: 19.5s 11.17ms)(0x28A0)</font><font color=Olive> Mesh(0x19EC7D50) Offset = (0, 0, 0)</font><br>
<font color=Gray>(337: 19.5s 08.98ms)(0x28A0)</font><font color=Olive> Mesh(0x19EC7D88) Offset = (0, 0, 0)</font><br>
<font color=Gray>(338: 19.5s 01.11ms)(0x28A0)</font><font color=Olive> Mesh(0x19EC7A08) Offset = (0, 0, 0)</font><br>
<font color=Gray>(339: 19.5s 03.02ms)(0x28A0)</font><font color=Olive> Mesh(0x19EC7A08) Offset = (0, 0, 0)</font><br>
<font color=Gray>(340: 19.6s 42.84ms)(0x28A0)</font><font color=Olive> Mesh(0x19EC7D50) Offset = (0, 0, 0)</font><br>
<font color=Gray>(341: 19.6s 02.17ms)(0x28A0)</font><font color=Olive> Mesh(0x19EC77D8) Offset = (0, 0, 0)</font><br>
<font color=Gray>(342: 19.6s 14.63ms)(0x28A0)</font><font color=Olive> Mesh(0x19EC7A08) Offset = (0, 0, 0)</font><br>
<font color=Gray>(343: 19.6s 00.74ms)(0x28A0)</font><font color=Olive> Mesh(0x19EC7A08) Offset = (0, 0, 0)</font><br>
<font color=Gray>(344: 19.6s 00.96ms)(0x28A0)</font><font color=Olive> Mesh(0x19EC7848) Offset = (0, 0, 0)</font><br>
<font color=Gray>(345: 19.6s 01.39ms)(0x28A0)</font><font color=Olive> Mesh(0x19EC76C0) Offset = (0, 0, 0)</font><br>
 

Attachments

It says "17 meshes" and it loads 11, so that should be a starting point... mesh 12 (or maybe 11) in the loading order might be the problem.
 
It says "17 meshes" and it loads 11, so that should be a starting point... mesh 12 (or maybe 11) in the loading order might be the problem.
Thanks I thought about that. But in the code it has meshes loaded and not seen based on events.
MAINCAP = oapiLoadMesh("ARTEMIS\\NEWARTEMIS");
SetMeshVisibilityMode(AddMesh(MAINCAP), MESHVIS_VC | MESHVIS_ALWAYS);

VCMESH = oapiLoadMesh("ARTEMIS\\NEWARTEMISVC");
SetMeshVisibilityMode(AddMesh(VCMESH), MESHVIS_VC | MESHVIS_ALWAYS);//MESH 1

SM_MESH = oapiLoadMesh("ARTEMIS\\NEWSM1");
SetMeshVisibilityMode(AddMesh(SM_MESH), MESHVIS_VC | MESHVIS_ALWAYS);//MESH 2

COVERMESH = oapiLoadMesh("ARTEMIS\\ARTEMISCOVER");// m
SetMeshVisibilityMode(AddMesh(COVERMESH), MESHVIS_VC | MESHVIS_ALWAYS);//MESH 3

CHAIRS4MESH = oapiLoadMesh("ARTEMIS\\ARTEMIS4CHAIRDEPLOY");// mesh4
SetMeshVisibilityMode(AddMesh(CHAIRS4MESH), MESHVIS_EXTERNAL | MESHVIS_VC);

ORANGECREWMESH = oapiLoadMesh("ARTEMIS\\ARTEMIS4CREWORANGEnew");// mesh5
SetMeshVisibilityMode(AddMesh(ORANGECREWMESH), MESHVIS_EXTERNAL | MESHVIS_VC);

CHAIRSSTOWED = oapiLoadMesh("ARTEMIS\\ARTEMIS4CHAIRSTOWED");// mesh6
SetMeshVisibilityMode(AddMesh(CHAIRSSTOWED), MESHVIS_NEVER);


BLUE2CREW = oapiLoadMesh("ARTEMIS\\ARTEMIS4CREWBLUE");// mesh7
SetMeshVisibilityMode(AddMesh(BLUE2CREW), MESHVIS_NEVER);



BURNTHEATSHIELD = oapiLoadMesh("ARTEMIS\\ARTEMISHEATSHIELD");
SetMeshVisibilityMode(AddMesh(BURNTHEATSHIELD), MESHVIS_NEVER);//8

DROGUECHUTEMESH = oapiLoadMesh("ARTEMIS\\artemisdroguechute");
SetMeshVisibilityMode(AddMesh(DROGUECHUTEMESH), MESHVIS_NEVER);//9

MAINCHUTE = oapiLoadMesh("ARTEMIS\\ARTEMISMAINCHUTE");
SetMeshVisibilityMode(AddMesh(MAINCHUTE), MESHVIS_NEVER);//10

BALLONMESH = oapiLoadMesh("ARTEMIS\\ARTEMIS-balloons");
SetMeshVisibilityMode(AddMesh(BALLONMESH), MESHVIS_NEVER);//11

LASMESH = oapiLoadMesh("ARTEMIS\\ARTEMISLAS");// mesh12
SetMeshVisibilityMode(AddMesh(LASMESH), MESHVIS_NEVER);

FAIR1MESH = oapiLoadMesh("ARTEMIS\\ARTEMISFAIR_1");//13
FAIR2MESH = oapiLoadMesh("ARTEMIS\\ARTEMISFAIR_2");//14
FAIR3MESH = oapiLoadMesh("ARTEMIS\\ARTEMISFAIR_3");//15
SetMeshVisibilityMode(AddMesh(FAIR1MESH), MESHVIS_NEVER);
SetMeshVisibilityMode(AddMesh(FAIR2MESH), MESHVIS_NEVER);
SetMeshVisibilityMode(AddMesh(FAIR3MESH), MESHVIS_NEVER);

BLACKTILEMESH = oapiLoadMesh("ARTEMIS\\ARTEMISBURNTBLACK");// mesh16
SetMeshVisibilityMode(AddMesh(BLACKTILEMESH), MESHVIS_NEVER);

then based on conditions they are seen
case 10: // Orbit config
SetMeshVisibilityMode(3, MESHVIS_EXTERNAL | MESHVIS_VC);//cover
SetMeshVisibilityMode(2, MESHVIS_EXTERNAL | MESHVIS_VC);//sm
SetMeshVisibilityMode(12, MESHVIS_ALWAYS);//las
 
But in the code it has meshes loaded and not seen based on events.
Visible or not, it is still loaded.

You should save the AddMesh() value to use in SetMeshVisibilityMode(), instead of having a fixed value... having to keep in memory a few more numbers isn't going to be a performance hit, and you'll be sure of which mesh you are playing with, which will decrease the likelihood of errors.

To further isolate the problem mesh, you can try to load them in a different order, or load them separately in a simple vessel.
BTW: the issue could be a texture that a certain mesh loads.
 
Thanks. Makes sense when I run it I get 14 loaded. I made a VB version with all the meshes going to see if CTD or not. It is just odd it works for others but not him?
 
Fixed!!!!!!
It seemed he was missing 2 meshes.

============================ ERROR: ===========================
Mesh not found: .\Meshes\ARTEMIS\ARTEMIS-balloons.msh
[MeshManager::LoadMesh | .\Mesh.cpp | 1238]
===============================================================
============================ ERROR: ===========================
Mesh not found: .\Meshes\ARTEMIS\ARMETISLAS.msh
[MeshManager::LoadMesh | .\Mesh.cpp | 1238]
===============================================================

I made a VB with all the mesh and these did not load.
 
  • Like
Reactions: GLS
Back
Top