Problem Multistage2 - Payloads With the Same Mesh Crash Orbiter

Zane

New member
Joined
Jun 13, 2009
Messages
41
Reaction score
0
Points
0
Location
Dublin, Ohio
I came across this bug just a little bit ago... In a Multistage2 vessel, payloads with identical meshes crash Orbiter... Does anyone know if there is a workaround for this, or am I making some dumb mistake?

Here's the payload part of the Multistage2 ini file:
Code:
[PAYLOAD_1]
MeshName="burchismo\BM230"
off=(0.,0.,57.5)
name="CoreNode01"
Module="BM230"
Height=25
Diameter=10
Mass=10000

[PAYLOAD_2]
MeshName="burchismo\BP101"
off=(0.,0.,65)
name="BP102"
Module="Spacecraft\spacecraft3"
Height=15
Diameter=5
Mass=500

[PAYLOAD_3]
MeshName="burchismo\BP101"
off=(0.,0.,72.5)
name="BP101"
Module="Spacecraft\spacecraft3"
Height=15
Diameter=5
Mass=500
Could anyone shed some light on this? It'd be really appreciated. Thanks. :)
 
Last edited:

Zane

New member
Joined
Jun 13, 2009
Messages
41
Reaction score
0
Points
0
Location
Dublin, Ohio
I already realized that... The INI files are different, they are just the same mesh.

This occurs with pretty much any spacecraft being placed in the payload, not just Spacecraft3 ones. For example, this payload with two DeltaGliders causes the same problem:

Code:
[PAYLOAD_1]
MeshName="dg\deltaglider"
off=(0.,0.,57.5)
name="GL-01"
Module="deltaglider"
Height=25
Diameter=10
Mass=27700

[PAYLOAD_2]
MeshName="dg\deltaglider"
off=(0.,0.,57.5)
name="GL-02"
Module="deltaglider"
Height=25
Diameter=10
Mass=27700
 

Usonian

Historic Ship & Base Developer
Addon Developer
Donator
Joined
Mar 23, 2008
Messages
220
Reaction score
1
Points
18
Location
Asheville, NC
The workaround would be to open the mesh file with a text editor and "saveas" BP101-copy.msh (or whatever distinctive name you care to give it). Then edit your MS2 .ini file accordingly: MeshName="burchismo\BP101" in PAYLOAD_2, and MeshName="burchismo\BP101-copy" in PAYLOAD_3.

The PAYLOAD MeshName is simply window dressing, telling Orbiter which mesh to render as a payload before the payload is jettisoned (I don't know why MS2 can't do this more than once for a given mesh - just on of those things.) After Jettison, a new vessel is "spawned" - in your case named "BP101" and then "BP102" and Orbiter will use whatever meshes are called for in their .ini files.
 

Zane

New member
Joined
Jun 13, 2009
Messages
41
Reaction score
0
Points
0
Location
Dublin, Ohio
Thanks for the info. That's what I eventually ended up doing.

Now I've got another question, though. Is there a way to rotate a payload?
 

MJR

C++ developer in the mix
Addon Developer
Tutorial Publisher
Donator
Joined
Mar 19, 2008
Messages
2,460
Reaction score
5
Points
0
Location
United States
You have to rotate it via axes coordinates. What do you specifically want to do?
 

Usonian

Historic Ship & Base Developer
Addon Developer
Donator
Joined
Mar 23, 2008
Messages
220
Reaction score
1
Points
18
Location
Asheville, NC
If I understand your question, I think the answer is "No." As far as I know, all Multistage vessel meshes will be oriented the same way -- all meshes having Z+ axis facing forward, and Y+ axis facing up. And when Multistage "spawns" a new vessel, by staging or jettisoning, the new vessel will, of course, be oriented the same way.

You could make a special mesh to represent the payload, using Shipedit.exe (found in the Orbiter SDK Utils folder) to rotate the mesh. Your payload will look the way you want it to while it is part of the Multistage booster, but when you jettison the Payload I suspect the vessel will appear to "flip" -- the new vessel will be spawned with axis orientation matching the Multistage booster.

It is always possible that MJR has some trick that I don't know. I am happy to be proved wrong, feast on crow, and learn something new!

You may also want to look at Velcro Rockets. I know that Sputink's CVEL Titans permitted a payload to be rotated (I did it with my ClemintineDSPSE addon). Velcro supports CVEL payloads, so maybe the same payload rotation trick will work with Velcro. Maybe this offers a solution to your problem.

Worrisome Aside:
I downloaded the latest Beta for Orbiter 2009 and found that Multistage2 is not fully compatible. Orbiter fails to render (make visible) vessels relying on the Stage.dll. The stage and fairing meshes are visible while they are part of the Multistage bosster, but they disappear when spawned as separate vessels. The spent stage and fairing vessels using Stage.dll appear in the F3 listing, you can change focus to those vessels, those vessels are rendered as white dots (like all Orbiter vessels) if you zoom out a good distance in exterior view, and those vessels show up in the Scenario file when you exit Orbiter. Their meshes just aren't rendered in exterior view.

I posted a comment on the Beta development Forum, and sent a PM to Vinka. I am hoping some other Multistage fans will verify my finding and bring some pressure to bear for a fix. Otherwise, we will lose Multistage2 with the next release of Orbiter!

BTW, Spacecraft3.dll appears to function just fine with the Orbiter 2009 Beta.
 

MJR

C++ developer in the mix
Addon Developer
Tutorial Publisher
Donator
Joined
Mar 19, 2008
Messages
2,460
Reaction score
5
Points
0
Location
United States
Reading your comment Usonian about the multistage2 incompatibility. How will this be most likely fixed? Will vinka simple make a new multistage or edit the original one and work from there? I really hope that we will still have multistage because I learned to make addons with multistage ones.
 

Usonian

Historic Ship & Base Developer
Addon Developer
Donator
Joined
Mar 23, 2008
Messages
220
Reaction score
1
Points
18
Location
Asheville, NC
Reading your comment Usonian about the multistage2 incompatibility. How will this be most likely fixed?

I don't know what will happen -- haven't gotten any replies yet. I suspect that the problem is with Multistage2 because it is pretty old (by Orbiter standards). Perhaps Orbiter is using some new 3D graphics standard for rendering the meshes. But I am in way over my head when it comes to getting under a computer's hood.

About a year ago I suggested making Spacecraft and Multistage part of the regular Orbiter download, arguing that it was a vital development tool every bit as important as TransX. But that idea got the cold shoulder.

Well, we paid nothing for all this fun, so us C++ illiterates have no ground to stand on. If Vinka is burned out and Martin is uninterested we will just have to wait for someone else to fill the void.
 

MJR

C++ developer in the mix
Addon Developer
Tutorial Publisher
Donator
Joined
Mar 19, 2008
Messages
2,460
Reaction score
5
Points
0
Location
United States
That's pretty disappointing to hear. I find that multistage is a good stepping stone for newcomers because it gets them ready for other things in the future such as C++.
 

cinder1992

Random failhurricane.
Addon Developer
Tutorial Publisher
Joined
Jul 5, 2009
Messages
350
Reaction score
1
Points
0
Website
cinder1992.blogspot.com
I have a way to work around the Multistage2 incompatability. when the payload is jettesoned instead of it flipping to i'ts default mesh position, write a dll that tells the spacecraft that unless specified in the scenario, flip the spacecraft 90 degrees along the Z axis (is this correct?). this would orent the spacecraft correctly after jetteson.. i think.
 

Zane

New member
Joined
Jun 13, 2009
Messages
41
Reaction score
0
Points
0
Location
Dublin, Ohio
Is the source available anywhere?
I've got a little C++ experience and tons of C# experience (with database applications, though, less game/simulator stuff), and I might be able to take a look at it and add a parameter for rotation of payloads/stages, plus fix any 2009 incompatibilities.

Anyway, how would such a workaround work, Cinder1992?
I haven't done any addon stuff, but I always assumed that the only way code in a separate DLL could be executed was when the active MFDs update, and when the ships are updated, by only the DLLs associated with the ships currently loaded.
 

cinder1992

Random failhurricane.
Addon Developer
Tutorial Publisher
Joined
Jul 5, 2009
Messages
350
Reaction score
1
Points
0
Website
cinder1992.blogspot.com
well, I dont have mutch experience with c++ so I cant tell you how,but I know there is a variable in orbiter that can be accsessed from a dll that controlls the vehicals attitude.
 
Top