SetReentryTexture(NULL) dosn't work

Topper

Addon Developer
Addon Developer
Donator
Joined
Mar 28, 2008
Messages
669
Reaction score
32
Points
43
Hi,
why does SetReentryTexture(NULL) doesn't work?
When i unselect "Reentry flames" in the launchpad, anyway the reentry flames are showed in orbiter?
In the sdk-document is written:

If a custom texture is not explicitly set, Orbiter uses a default texture
(reentry.dds) for rendering reentry flames. To suppress reentry flames
altogether for a vessel, call SetReentryTexture(NULL).
 
Where are you putting NULL?
 
Where are you putting NULL?

In the last line:

void ShuttlePB::clbkSetClassCaps (FILEHANDLE cfg)
{
anim_x = CreateAnimation (0);

THRUSTER_HANDLE th_main;
SetSize (10);
SetEmptyMass (25.0);
//make wings
CreateAirfoil3 (LIFT_VERTICAL, _V(0,0,-0.3), VLiftCoeff, 0, 1, 1.8, 1.2);
// wing and body lift+drag components

CreateAirfoil3 (LIFT_HORIZONTAL, _V(0,0,-4), HLiftCoeff, 0, 1, 1.8, 1.2);
// vertical stabiliser and body lift and drag components

CreateControlSurface (AIRCTRL_ELEVATOR, 0.4, 2.5, _V( 0,0,-7.2), AIRCTRL_AXIS_XPOS, anim_x);
CreateControlSurface (AIRCTRL_RUDDER, 0.4, 2.5, _V( 0,0,-7.2), AIRCTRL_AXIS_YPOS, anim_x);
CreateControlSurface2 (AIRCTRL_AILERON, 0.4, 2.5, _V( 7.5,0,-7.2), AIRCTRL_AXIS_XPOS, anim_x);
CreateControlSurface2 (AIRCTRL_AILERON, 0.4, 2.5, _V(-7.5,0,-7.2), AIRCTRL_AXIS_XNEG, anim_x);
CreateControlSurface (AIRCTRL_ELEVATORTRIM, 0.4, 2.5, _V( 0,0,-7.2), AIRCTRL_AXIS_XPOS, anim_x);


PROPELLANT_HANDLE hpr = CreatePropellantResource (PB_FUELMASS);


th_main = CreateThruster (_V(0,0,-4.35), _V(0,0,1), PB_MAXMAINTH, hpr, PB_ISP);
CreateThrusterGroup (&th_main, 1, THGROUP_MAIN);

// visual specs
PARTICLESTREAMSPEC contrail_main = {
0, 5.0, 16, 200, 0.15, 1.0, 5, 3.0, PARTICLESTREAMSPEC::DIFFUSE,
PARTICLESTREAMSPEC::LVL_PSQRT, 0, 2,
PARTICLESTREAMSPEC::ATM_PLOG, 1e-4, 1
};

PARTICLESTREAMSPEC exhaust_main = {
0, 2.0, 20, 200, 0.05, 0.1, 8, 1.0, PARTICLESTREAMSPEC::EMISSIVE,
PARTICLESTREAMSPEC::LVL_SQRT, 0, 1,
PARTICLESTREAMSPEC::ATM_PLOG, 1e-5, 0.1
};
AddExhaust (th_main, 4, 0.5, _V(0,0,-1.7), _V(0,0,-1));
AddExhaustStream (th_main, _V(0,0.1,-10), &contrail_main);
AddExhaustStream (th_main, _V(0,0.1,-5), &exhaust_main);

//SetTouchdownPoints (_V(0,-1.5,-2.6), _V(-0.2,1.5,-2.6), _V(0.2,0,-1.6));
SetTouchdownPoints (_V(0,-3.5,2), _V(-1,-1.0,-1.5), _V(1,-1.0,-1.5));

AddMesh ("AAMissile");
SetReentryTexture(NULL);
}
 
What craft is this?
 
What craft is this?

Ive modified the standard ShuttlePB class from the orbiter sdk's for my AAMissile Add on:
[ame="http://www.orbithangar.com/searchid.php?ID=3289"]Search[/ame]
???
 
Topper I have noticed this as well. I think someone at M6 found a work around.
 
I do not know what o tell you. Maybe someone else can figure it out. Sorry.
 
damm ok but thx for helping me :beach:
 
I am sure that your problem will be fixed either today or tommorrow. Good luck.
 
Well it could be fixed soon though.
 
Hi,
why does SetReentryTexture(NULL) doesn't work?
When i unselect "Reentry flames" in the launchpad, anyway the reentry flames are showed in orbiter?
The reentry effect consists of 2 parts - the texture of a bow shock and a particle stream.
SetReentryTexture(NULL) works fine just as it is described, removing the shock texture, as well as Reentry flames option do. But the particle stream stays in both cases.
 
The reentry effect consists of 2 parts - the texture of a bow shock and a particle stream.
SetReentryTexture(NULL) works fine just as it is described, removing the shock texture, as well as Reentry flames option do. But the particle stream stays in both cases.

Oh ya, that's right. I remember now, the person at m6 found a way so orbiter no longer renders the particle stream, because at the moment I don't think there is any API call to turn it off. Thanks for clarifying Artlav. :)
 
Now we need to figure out who that person is.
 
Does someone found a way to turn off particles streams? I need it too.
 
Hi, saw this and figured I'd register here to help (perhaps) answer.

I believe the thread you are referring to is http://orbit.m6.net/Forum/default.aspx?g=posts&t=17615

In case the m6 forums go down at some point, here is the juicy post, replicated:
--------------------------------
So I kind of figured it out. Kind of.

I'll be the first to say that it's a hack. A terrible, blatant hack that probably should never have been thought of, but I'm crazy.

The basic thinking was thus:
"Well, Orbiter draws the particle stream only when the vessel is going fast enough to cause it to be generated. If the vessel was always standing still, it would never be going fast enough, so there would be no particle stream."

Think the Liirian Stutterwarp in Sword of the Stars. Basically, the ship is teleporting along, moving from one point to the next, but never actually (from the sim's perspective) being between those points. The ship keeps track of its own velocity vector and uses that to update its position at each timestep. From the user's perspective there's no difference at all (well, almost...more later). So, without further delay, some code:

Declared as a class variable:
Code:
...
VECTOR3 rvel;
...
In the constructor:
Code:
...
rvel = _V(0,0,0);
...
In clbkPreStep:
Code:
VESSELSTATUS2 mystat;
memset(&mystat,0,sizeof(VESSELSTATUS2));
mystat.version = 2;
GetStatusEx(&mystat);
rvel += mystat.rvel;
mystat.rvel = _V(0,0,0);
mystat.rpos += rvel * simdt;
DefSetStateEx(&mystat);
and that's it. Put that in the clbkPreStep function, possibly within an if (since there's no need to use this workaround if you wouldn't be causing a plasma trail), and your ship will happily be stuttering along, looking for all the world like it's moving smoothly.

Bonuses: each timestep, Orbiter will increase the ship's relative velocity because of gravity or thrust. You're manually adding the new velocity to the old, so that will get rolled in. Objects will naturally travel in a normal ballistic arc, affected only by gravity and their own thrust. (note: I haven't tested it with thrust, but I think it'll work.)

Downside: variable forces such as drag won't be calculated properly, but if needed you could probably pull something off in your own code and hand it to Orbiter as a force vector to apply to the ship.
 
I now this is a verry old thread, but (for those who are searching for a solution)

SetReentryTexture(NULL,-1)

will work!
I don't know if this is only working in 2010 and it's not official.
 
Last edited:
Define custom particle stream texture and make it fully transparent
 
Back
Top