ALS technical notes: Difference between revisions

Jump to navigation Jump to search
Line 383: Line 383:
== Chute animation effect ==
== Chute animation effect ==


The chute animation effect is designed to provide a natural appearance of the deformation and the fluttering motion of a piece of cloth under stress.
The chute animation effect is designed to provide a natural appearance of the deformation and the fluttering motion of a piece of cloth under changing stress.


[[File:Chute seq01.jpg|300px|Drag chute separation sequence 1]] [[File:Chute seq03.jpg|300px|Drag chute separation sequence 2]]
[[File:Chute seq01.jpg|300px|Drag chute separation sequence 1]] [[File:Chute seq03.jpg|300px|Drag chute separation sequence 2]]
Line 411: Line 411:
</PropertyList>
</PropertyList>
</syntaxhighlight>
</syntaxhighlight>
The meaning of these parameters is as follows:
<syntaxhighlight lang="xml">
<chute_projection_z>0.0</chute_projection_z>
</syntaxhighlight>
This is the distance of the branching point of the various lines leading to the canopy (at model coordinate zero) to the edge of the canopy. All transformations affecting the shape of the canopy (in particular the collapse of the canopy if the force is gone) will be applied with respect to this reference plane.
<syntaxhighlight lang="xml">
          <chute_force><use>Aircraft/MyAircraft/myforce</use></chute_force>
</syntaxhighlight>
This is a normalized force applied to the canopy. The chute should be modeled with a deformation corresponding to a force parameter of 1 - any higher value will narrow the chute's radius, deepen the chute's deformation along the z-axis and increase the motion, any lower value will widen chute radius (compare screenshots above) and lessen its depth and slow down motion. The normal parameter range should be from [0:2], any higher or lower may look odd.
<syntaxhighlight lang="xml">
        <chute_fold>0.0</chute_fold>
<chute_bend>0.0</chute_bend>
</syntaxhighlight>
These are deformation modes used to animate a chute after jettison when it is no longer pulled into shape and can flutter through the air. The first one [0:1] is a general collapse into the projection plane with random deformations around, the second one [-1:1] is a gross bending mode of the projection plane itself. Before jettison, these parameters should default to 0.
A complete animated jettison sequence is quite complex and would usually require a Nasal sequence taking the chute through a deceleration trajectory (utilizing translation and rotation animations), bending ad folding oscillations and finally some unfolding as it sinks through the air. The Space Shuttle chute uses the following control loop for 10 seconds of jettison dynamics:
<syntaxhighlight lang="nasal">
var drag_chute_jettison_animation = func (time) {
var dt = getprop("/sim/time/delta-sec");
time = time + dt;
# horizontal motion
var x = 0.0;
if (time > 2.0)
{x = -16.0 + 20.0 * time;}
else
{x = 2.0 * time + 5.0 * time * time;}
setprop("/controls/shuttle/drag-chute-dist",x);
# vertical motion
var y = 0.0;
if (time > 5.0)
{
y = -2.5 + 0.6 * (time-5.0) * (time-5.0);
}
else
{
y = -0.2 * time;
}
if (y > 12.5) {y=12.5;}
setprop("/controls/shuttle/drag-chute-down",y);
# fold
var f = 0.5 * time;
if (f> 1.0) {f = 1.0;}
if (time > 9.5)
{f = 0.25 + 1.5 + (time-9.5);}
if (time > 6.0)
{
f = f -0.3* (time-7.0);
if (f<0.1) {f=0.1;}
}
setprop("/controls/shuttle/drag-chute-fold", f);
# rotate
var r = (time - 2.0) * 18.0;
if (r>90.0) {r=90.0;}
if (r<0.0) {r=0.0;}
setprop("/controls/shuttle/drag-chute-slant", r);
# bend
var b = 0;
if (time > 7.5)
{b = 0;}
else if (time >6.0)
{b = 0.75 - 0.5 * (time - 6.0);}
else if (time > 4.5)
{b = (time - 4.5) * 0.5;}
else {b=0;}
setprop("/controls/shuttle/drag-chute-bend", b);
if (time > 10.0)
{
print("Exiting...");
settimer (func { setprop("/controls/shuttle/drag-chute-deploy-timer", 0); }, 0.5);
return;
}
setprop("/test/timer", time);
settimer( func{ drag_chute_jettison_animation (time); }, 0);
}
</syntaxhiglight>


== ALS glass effect ==
== ALS glass effect ==
1,360

edits

Navigation menu