SSU Development Thread (2.0 to 3.0)

Status
Not open for further replies.
This is the very latest iteration:

Code:
// ***** Elevon upward animation *****
  static UINT LAileronGrp_up[2] = {GRP_LEFT_INBOARD_ELEVON,GRP_LEFT_OUTBOARD_ELEVON};
  static MGROUP_ROTATE LAileron_up (midx, LAileronGrp_up, 2,
    _V(0,-4.61,-10.51), _V(0.995261553294495, 0.097218629773975, 0.001725850138444), (float)(34.0*RAD));
  static UINT LAileronDoorGrp_up[2] = {GRP_LEFT_INBOARD_ELEVON_SEAL_PANEL,GRP_LEFT_OUTBOARD_ELEVON_SEAL_PANEL};
  static MGROUP_ROTATE LAileronDoor_up (midx, LAileronDoorGrp_up, 2,
    _V(0,-4,-10), _V(-0.998913, 0.0465805, 0.00183875), (float)(22.0*RAD));

  static UINT RAileronGrp_up[2] = {GRP_RIGHT_INBOARD_ELEVON,GRP_RIGHT_OUTBOARD_ELEVON};
  static MGROUP_ROTATE RAileron_up (midx, RAileronGrp_up, 2,
    _V(0,-3.9,-10.54), _V(-0.995259638999982, 0.001726197889982, -0.097238218918646), (float)(34.0*RAD));
  static UINT RAileronDoorGrp_up[2] = {GRP_RIGHT_INBOARD_ELEVON_SEAL_PANEL,GRP_RIGHT_OUTBOARD_ELEVON_SEAL_PANEL};
  static MGROUP_ROTATE RAileronDoor_up (midx, RAileronDoorGrp_up, 2,
    _V(0,-4,-10), _V(0.998913, 0.0465805, 0.00183875), (float)(22.0*RAD));
  
  // ***** Elevon downward animation *****
  static UINT LAileronGrp_down[2] = {GRP_LEFT_INBOARD_ELEVON,GRP_LEFT_OUTBOARD_ELEVON};
  static MGROUP_ROTATE LAileron_down (midx, LAileronGrp_down, 2,
    _V(0,-3.9,-10.54), _V(-0.995259638999982, 0.001726197889982, -0.097238218918646), (float)(18.0*RAD));
  static UINT LAileronDoorGrp_down[2] = {GRP_LEFT_INBOARD_ELEVON_SEAL_PANEL,GRP_LEFT_OUTBOARD_ELEVON_SEAL_PANEL};
  static MGROUP_ROTATE LAileronDoor_down (midx, LAileronDoorGrp_down, 2,
    _V(0,-3.4,-10), _V(-0.998913, 0.0465805, 0.00183875), (float)(5*RAD));

  static UINT RAileronGrp_down[2] = {GRP_RIGHT_INBOARD_ELEVON,GRP_RIGHT_OUTBOARD_ELEVON};
  static MGROUP_ROTATE RAileron_down (midx, RAileronGrp_down, 2,
    _V(0,-3.9,-10.54), _V(-0.995259638999982, 0.001726197889982, -0.097238218918646), (float)(18.0*RAD));
  static UINT RAileronDoorGrp_down[2] = {GRP_RIGHT_INBOARD_ELEVON_SEAL_PANEL,GRP_RIGHT_OUTBOARD_ELEVON_SEAL_PANEL};
  static MGROUP_ROTATE RAileronDoor_down (midx, RAileronDoorGrp_down, 2,
    _V(0,-3.4,-10), _V(0.998913, 0.0465805, 0.00183875), (float)(5*RAD));
The aileron animations aren't used anymore. I've deleted the unused aileron animations, and created separate animations for the left and right elevons. The elevon animation position/direction vectors need some tweaking; can you fix this?
 
How come they aren't used ?
 
The aileron animations aren't used anymore. I've deleted the unused aileron animations, and created separate animations for the left and right elevons. The elevon animation position/direction vectors need some tweaking; can you fix this?
Just to make sure my end is as expected right now: the elevons become detached from the wings with the current (1570) revision?
 
Just to make sure my end is as expected right now: the elevons become detached from the wings with the current (1570) revision?
Yes. I think the animation position ref (and possibly the direction ref as well) need to be changed.

---------- Post added at 08:17 PM ---------- Previous post was at 08:14 PM ----------

How come they aren't used ?
The shuttle elevons are used as both elevators (to control pitch) and ailerons (to control roll). In the past, we had separate elevator and aileron animations; the elevator animations moved both elevons in the same direction, and the aileron animations moved the elevons in opposite directions. At some point, we stopped using the aileron animation, and only animated the elevators. The latest revision of the code has separate animations for each elevon, and the left and right elevon positions are set separately.
 
I see, thanks.
 
Seems like something is seriously wrong with the FCS C/O Aerosurface drive code. It seems to drive the left/right elevons in different directions when they should drive in the same direction. The SPI shows the elevons on both being driven in the same direction.

It seems like the left side is at fault as the SPI shows the elevons being driven downward as they should while the actual animation of the left side elevons are being driven upward.
 
Seems like something is seriously wrong with the FCS C/O Aerosurface drive code. It seems to drive the left/right elevons in different directions when they should drive in the same direction. The SPI shows the elevons on both being driven in the same direction.

It seems like the left side is at fault as the SPI shows the elevons being driven downward as they should while the actual animation of the left side elevons are being driven upward.
That sounds like the left side animation is in the wrong direction. Changing the sign of the rotation angle should fix this.
 
That sounds like the left side animation is in the wrong direction. Changing the sign of the rotation angle should fix this.
I tried that, copying the the vectors and angle data from the right side with no effect.
 
Both parameters?
If you mean both the vectors and rotation angle, then yes. When the right side drives down, the left drives up and vice-versa.
 
Here it is:

Code:
// ***** 4. Elevator animation of elevons *****

  static UINT LElevGrp[2] = {GRP_LEFT_INBOARD_ELEVON,GRP_LEFT_OUTBOARD_ELEVON};
  static UINT RElevGrp[2] = {GRP_RIGHT_INBOARD_ELEVON,GRP_RIGHT_OUTBOARD_ELEVON};
  static UINT LElevDoorGrp[2] = {GRP_LEFT_INBOARD_ELEVON_SEAL_PANEL,GRP_LEFT_OUTBOARD_ELEVON_SEAL_PANEL};
  static UINT RElevDoorGrp[2] = {GRP_RIGHT_INBOARD_ELEVON_SEAL_PANEL,GRP_RIGHT_OUTBOARD_ELEVON_SEAL_PANEL};
  static MGROUP_ROTATE LElevator_up (midx, LElevGrp, 2,
	_V(0,-3.9,-10.44), _V(0.995261553294495, 0.097218629773975, 0.001725850138444), (float)(-34.0*RAD));
  static MGROUP_ROTATE RElevator_up (midx, RElevGrp, 2,
	_V(0,-3.9,-10.44), _V(0.995261553294495, 0.097218629773975, 0.001725850138444), (float)(-34.0*RAD));
  static MGROUP_ROTATE LElevatorDoor_up (midx, LElevDoorGrp, 2,
    _V(0,-4,-10), _V(-0.998913, 0.0465805, 0.00183875), (float)(22.0*RAD));
  static MGROUP_ROTATE RElevatorDoor_up (midx, RElevDoorGrp, 2,
    _V(0,-4,-10), _V(-0.998913, 0.0465805, 0.00183875), (float)(22.0*RAD));
  static MGROUP_ROTATE LElevator_down (midx, LElevGrp, 2,
    _V(0,-3.6,-10.44), _V(-0.995033, -0.0995452, 0.000434106), (float)(-18.0*RAD));
  static MGROUP_ROTATE RElevator_down (midx, RElevGrp, 2,
    _V(0,-3.6,-10.44), _V(0.995259638999982, 0.001726197889982, 0.097238218918646), (float)(-18.0*RAD));
  static MGROUP_ROTATE LElevatorDoor_down (midx, LElevDoorGrp, 2,
    _V(0,-3.4,-10), _V(-0.998913, 0.0465805, 0.00183875), (float)(5*RAD));
  static MGROUP_ROTATE RElevatorDoor_down (midx, RElevDoorGrp, 2,
    _V(0,-3.4,-10), _V(-0.998913, 0.0465805, 0.00183875), (float)(5*RAD));
  anim_lelevon = CreateAnimation (0.5);
  anim_relevon = CreateAnimation (0.5);
  LogAnim("anim_lelevon", anim_lelevon);
  LogAnim("anim_relevon", anim_relevon);
  AddAnimationComponent (anim_lelevon, 0.5, 1, &LElevator_down);
  AddAnimationComponent (anim_lelevon, 0, 0.5, &LElevator_up);
  AddAnimationComponent (anim_lelevon, 0.5, 1, &LElevatorDoor_down);
  AddAnimationComponent (anim_lelevon, 0, 0.5, &LElevatorDoor_up);
  AddAnimationComponent (anim_relevon, 0.5, 1, &RElevator_down);
  AddAnimationComponent (anim_relevon, 0, 0.5, &RElevator_up);
  AddAnimationComponent (anim_relevon, 0.5, 1, &RElevatorDoor_down);
  AddAnimationComponent (anim_relevon, 0, 0.5, &RElevatorDoor_up);
 
Corrected code:
Code:
  static UINT LElevGrp[2] = {GRP_LEFT_INBOARD_ELEVON,GRP_LEFT_OUTBOARD_ELEVON};
  static UINT RElevGrp[2] = {GRP_RIGHT_INBOARD_ELEVON,GRP_RIGHT_OUTBOARD_ELEVON};
  static UINT LElevDoorGrp[2] = {GRP_LEFT_INBOARD_ELEVON_SEAL_PANEL,GRP_LEFT_OUTBOARD_ELEVON_SEAL_PANEL};
  static UINT RElevDoorGrp[2] = {GRP_RIGHT_INBOARD_ELEVON_SEAL_PANEL,GRP_RIGHT_OUTBOARD_ELEVON_SEAL_PANEL};
  static MGROUP_ROTATE LElevator_up (midx, LElevGrp, 2,
	_V(0,-3.9,-10.44), _V(0.995261553294495, 0.097218629773975, 0.001725850138444), (float)(-34.0*RAD));
  static MGROUP_ROTATE RElevator_up (midx, RElevGrp, 2,
	_V(0,-3.9,-10.44), _V(0.995261553294495, 0.097218629773975, 0.001725850138444), (float)(-34.0*RAD));
  static MGROUP_ROTATE LElevatorDoor_up (midx, LElevDoorGrp, 2,
    _V(0,-4,-10), _V(-0.998913, 0.0465805, 0.00183875), (float)(22.0*RAD));
  static MGROUP_ROTATE RElevatorDoor_up (midx, RElevDoorGrp, 2,
    _V(0,-4,-10), _V(-0.998913, 0.0465805, 0.00183875), (float)(22.0*RAD));
  static MGROUP_ROTATE LElevator_down (midx, LElevGrp, 2,
    _V(0,-3.6,-10.44), _V(-0.995033, -0.0995452, 0.000434106), (float)(18.0*RAD));
  static MGROUP_ROTATE RElevator_down (midx, RElevGrp, 2,
    _V(0,-3.6,-10.44), _V(0.995259638999982, 0.001726197889982, 0.097238218918646), (float)(-18.0*RAD));
  static MGROUP_ROTATE LElevatorDoor_down (midx, LElevDoorGrp, 2,
    _V(0,-3.4,-10), _V(-0.998913, 0.0465805, 0.00183875), (float)(5*RAD));
  static MGROUP_ROTATE RElevatorDoor_down (midx, RElevDoorGrp, 2,
    _V(0,-3.4,-10), _V(-0.998913, 0.0465805, 0.00183875), (float)(5*RAD));
  anim_lelevon = CreateAnimation (0.5);
  anim_relevon = CreateAnimation (0.5);
  LogAnim("anim_lelevon", anim_lelevon);
  LogAnim("anim_relevon", anim_relevon);
  AddAnimationComponent (anim_lelevon, 0.5, 1, &LElevator_down);
  AddAnimationComponent (anim_lelevon, 0, 0.5, &LElevator_up);
  AddAnimationComponent (anim_lelevon, 0.5, 1, &LElevatorDoor_down);
  AddAnimationComponent (anim_lelevon, 0, 0.5, &LElevatorDoor_up);
  AddAnimationComponent (anim_relevon, 0.5, 1, &RElevator_down);
  AddAnimationComponent (anim_relevon, 0, 0.5, &RElevator_up);
  AddAnimationComponent (anim_relevon, 0.5, 1, &RElevatorDoor_down);
  AddAnimationComponent (anim_relevon, 0, 0.5, &RElevatorDoor_up);
The only change is the sign of the left elevon down animation (it used to be negative, now it's positive).
 
There seems to be a small gap between the OMS pod and the main shuttle mesh. I'm not sure if the offsets are wrong or if this is a mesh issue.

OMS.jpg
 
Last edited:
There seems to be a small gap between the OMS pod and the main shuttle mesh. I'm not sure if the offsets are wrong or if this is a mesh issue.
Confirmed as a mesh issue. I'm working on it now. Thanks for the report.

---------- Post added at 09:17 AM ---------- Previous post was at 01:34 AM ----------

The OMS pods have been fixed and checked in, so please confirm that everything is good now.

---------- Post added at 01:32 PM ---------- Previous post was at 09:17 AM ----------

The right ET umbilical door on the new mesh seems to be animated improperly. It seems to rotate the opposite way so it is never closed.

Open:
ET_umb_door_open.jpg


Closed:
ET_umb_door_closed.jpg
 
The OMS pod issue has been fixed.

I can't reproduce the ET umbilical door issue; it works fine for me.
 
The OMS pod issue has been fixed.

I can't reproduce the ET umbilical door issue; it works fine for me.
Weird. Here's the ET umbilical door code in my Atlantis.cpp:

Code:
// ***** 11 ET Umb Door animation *****
  static UINT ETUmbLGrp[1] = {GRP_ET_DOOR_LEFT};
  static UINT ETUmbRGrp[1] = {GRP_ET_DOOR_RIGHT};
  static MGROUP_ROTATE EtumbdoorL (midx, ETUmbLGrp, 1,
      _V(-1.339, -4.749, -9.935), _V(0, -0.05, 0.99875), (float)(+180.0*RAD));
  static MGROUP_ROTATE EtumbdoorR (midx, ETUmbRGrp, 1,
      _V(1.339, -4.749, -9.935), _V(0, -0.05, 0.99875), (float)(-180.0*RAD));

  static VECTOR3 etumbdoor_dummyvec[4];
  static UINT ETUmbLDDMAftGrp[1] = {GRP_ET_DOOR_LEFT_DDM_ARM_AFT};
  static UINT ETUmbLDDMAftRodGrp[1] = {GRP_ET_DOOR_LEFT_DDM_LINK_ROD_AFT};
  static MGROUP_ROTATE ETUmbLDDMAft (midx, ETUmbLDDMAftGrp, 1, _V(-1.258, -4.675, -9.822), _V(0, 0.060757, -0.998152), static_cast<float>(-125.0*RAD));
  static MGROUP_ROTATE ETUmbLDDMAftRod1 (LOCALVERTEXLIST, MAKEGROUPARRAY(etumbdoor_dummyvec), 1, _V(-1.414, -4.492, -9.81), _V(0, 0, -1), static_cast<float>(14.0*RAD));
  static MGROUP_ROTATE ETUmbLDDMAftRod2 (midx, ETUmbLDDMAftRodGrp, 1, _V(-1.414, -4.492, -9.81), _V(0, 0, -1), static_cast<float>(-33*RAD));
  static UINT ETUmbLDDMFwdGrp[1] = {GRP_ET_DOOR_LEFT_DDM_ARM_FWD};
  static UINT ETUmbLDDMFwdRodGrp[1] = {GRP_ET_DOOR_LEFT_DDM_LINK_ROD_FWD};
  static MGROUP_ROTATE ETUmbLDDMFwd (midx, ETUmbLDDMFwdGrp, 1, _V(-1.257, -4.738, -8.787), _V(0, 0.060757, -0.998152), static_cast<float>(-125.0*RAD));
  static MGROUP_ROTATE ETUmbLDDMFwdRod1 (LOCALVERTEXLIST, MAKEGROUPARRAY(etumbdoor_dummyvec+1), 1, _V(-1.414, -4.553, -8.776), _V(0, 0, -1), static_cast<float>(14.0*RAD));
  static MGROUP_ROTATE ETUmbLDDMFwdRod2 (midx, ETUmbLDDMFwdRodGrp, 1, _V(-1.414, -4.553, -8.776), _V(0, 0, -1), static_cast<float>(-33.0*RAD));
  anim_letumbdoor = CreateAnimation(0);
  LogAnim("anim_letumbdoor", anim_letumbdoor);
  parent = AddAnimationComponent(anim_letumbdoor, 0, 1, &EtumbdoorL);
  parent = AddAnimationComponent(anim_letumbdoor, 0, 1, &ETUmbLDDMFwd);
  parent = AddAnimationComponent(anim_letumbdoor, 0, 0.5, &ETUmbLDDMFwdRod1, parent);
  AddAnimationComponent(anim_letumbdoor, 0.5, 1, &ETUmbLDDMFwdRod2, parent);
  parent = AddAnimationComponent(anim_letumbdoor, 0, 1, &ETUmbLDDMAft);
  parent = AddAnimationComponent(anim_letumbdoor, 0, 0.5, &ETUmbLDDMAftRod1, parent);
  AddAnimationComponent(anim_letumbdoor, 0.5, 1, &ETUmbLDDMAftRod2, parent);
  AddAnimationComponent(anim_retumbdoor, 0, 1, &EtumbdoorR);

  static UINT ETUmbRDDMAftGrp[1] = {GRP_ET_DOOR_RIGHT_DDM_ARM_AFT};
  static UINT ETUmbRDDMAftRodGrp[1] = {GRP_ET_DOOR_RIGHT_DDM_LINK_ROD_AFT};
  static MGROUP_ROTATE ETUmbRDDMAft (midx, ETUmbRDDMAftGrp, 1, _V(1.258, -4.675, -9.822), _V(0, 0.060757, -0.998152), static_cast<float>(125.0*RAD));
  static MGROUP_ROTATE ETUmbRDDMAftRod1 (LOCALVERTEXLIST, MAKEGROUPARRAY(etumbdoor_dummyvec+2), 1, _V(1.414, -4.492, -9.81), _V(0, 0, -1), static_cast<float>(-14.0*RAD));
  static MGROUP_ROTATE ETUmbRDDMAftRod2 (midx, ETUmbRDDMAftRodGrp, 1, _V(1.414, -4.492, -9.81), _V(0, 0, -1), static_cast<float>(33*RAD));
  static UINT ETUmbRDDMFwdGrp[1] = {GRP_ET_DOOR_RIGHT_DDM_ARM_FWD};
  static UINT ETUmbRDDMFwdRodGrp[1] = {GRP_ET_DOOR_RIGHT_DDM_LINK_ROD_FWD};
  static MGROUP_ROTATE ETUmbRDDMFwd (midx, ETUmbRDDMFwdGrp, 1, _V(1.257, -4.738, -8.787), _V(0, 0.060757, -0.998152), static_cast<float>(125.0*RAD));
  static MGROUP_ROTATE ETUmbRDDMFwdRod1 (LOCALVERTEXLIST, MAKEGROUPARRAY(etumbdoor_dummyvec+3), 1, _V(1.414, -4.553, -8.776), _V(0, 0, -1), static_cast<float>(-14.0*RAD));
  static MGROUP_ROTATE ETUmbRDDMFwdRod2 (midx, ETUmbRDDMFwdRodGrp, 1, _V(1.414, -4.553, -8.776), _V(0, 0, -1), static_cast<float>(33.0*RAD));
  anim_retumbdoor = CreateAnimation(0);
  LogAnim("anim_retumbdoor", anim_retumbdoor);
  parent = AddAnimationComponent(anim_retumbdoor, 0, 1, &EtumbdoorR);
  parent = AddAnimationComponent(anim_retumbdoor, 0, 1, &ETUmbRDDMFwd);
  parent = AddAnimationComponent(anim_retumbdoor, 0, 0.5, &ETUmbRDDMFwdRod1, parent);
  AddAnimationComponent(anim_retumbdoor, 0.5, 1, &ETUmbRDDMFwdRod2, parent);
  parent = AddAnimationComponent(anim_retumbdoor, 0, 1, &ETUmbRDDMAft);
  parent = AddAnimationComponent(anim_retumbdoor, 0, 0.5, &ETUmbRDDMAftRod1, parent);
  AddAnimationComponent(anim_retumbdoor, 0.5, 1, &ETUmbRDDMAftRod2, parent);
 
That's the same code I have. I've attached a compiled version of the latest revision (rev. 1576); see if this works on your computer.
 

Attachments

That's the same code I have. I've attached a compiled version of the latest revision (rev. 1576); see if this works on your computer.
No change.
 
You need to switch to the 2.1-newmesh branch to get the new meshes/textures.
 
Status
Not open for further replies.
Back
Top