Warp: faithful POVTranslocateRenderable -- eye-centered, ramp color, no spin

Deep-dived the authentic engine effect (L4VIDRND.cpp POVTranslocateRenderable, T0)
and reworked our one-shot to match it, fixing the user's "blob from my own POV /
not aligned to my orientation" + "gray, not blue" reports:

1. PLACEMENT was the misalignment. The engine parents the sphere to the VTV/eye
   ("rotated and scaled around the VTV", L4VIDRND.cpp:1812) -- it is centered on and
   oriented to the viewpoint. We world-fixed it at the mech's feet, so from your own
   camera it sat off-axis and, once expanded, engulfed the eye as a shapeless blob.
   Now: the own-respawn warp (BTStartWarpEffectPOV, from btplayer) uses
   world = Scale(s) * inverse(view) -> centered on + carried by your eye (the tunnel
   wraps you). Observing a PEER (BTStartWarpEffect from mechdmg) stays world-anchored
   at the peer's point.

2. GEOMETRY SPIN was inauthentic. myRotateY/myRotateYSpeed are set in the engine
   ctor but NEVER applied -- the swirl's rotation is entirely the material's texture
   SCROLL (bintA, SCROLL 0.0 0.0 0.1 0.5). Dropped our world-Y geometry spin.

3. COLOR (gray) fixed at the source. The blue/white is the "sky" RAMP remapping the
   grayscale bintA cloud per-texel (argb=lerp(0,0,0.6 -> .99,.99,.99, luminance),
   L4D3D.cpp:480). The port bakes exactly this but GATED it off for normal-bearing
   meshes; tsphere has normals so it arrived raw gray, and a MODULATE tint can't add
   the blue floor (it only multiplies) -> the wash-out. Un-gate the ramp for
   tsphere_mtl (bgfload.cpp) so the bound texture is already the blue-white swirl;
   draw it MODULATE by white (no tint), alpha from TFACTOR.

4. SCALE to authentic 100 (collapse) / 150 (expand end) -- correct now that it's
   eye-centered (you're meant to be inside it as it collapses through you and blasts
   back open, the "blast off into the distance").

Still deferred (higher risk / SimulationState-coupling trap): the WaitForReincarnate
Lissajous wobble + the SetIsDead world-mask (black-out during the dead hold). Noted
for follow-up; the placement/color/motion are the parts the user flagged.

Smoke-verified 2-node: own respawn logs POV(eye), observer logs world-anchored, no
crash. BT_WARP_ADDITIVE / BT_WARP_COLOR / BT_WARP_SCALE remain as live tuning knobs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
arcattack
2026-07-10 08:42:02 -05:00
co-authored by Claude Opus 4.8
parent 160b78e38d
commit a9d1534292
3 changed files with 110 additions and 54 deletions
+8 -7
View File
@@ -1142,13 +1142,14 @@ void
Mech *mech = (Mech *)playerVehicle;
mech->Reset(message->dropZoneLocation, 1 /* True */); // FUN_0049fb74 (heal+move)
// WARP (task #52): the translocation sphere at our reinsertion. A
// self-contained render one-shot -- it does NOT touch SimulationState
// (that dial drives the camera/POV + targeting; pulsing it regressed all
// of those). The effect plays its own collapse->expand.
const Point3D &p = message->dropZoneLocation.linearPosition;
extern void BTStartWarpEffect(float x, float y, float z);
BTStartWarpEffect((float)p.x, (float)p.y, (float)p.z);
// WARP (task #52): the translocation sphere at our reinsertion. This is OUR
// OWN respawn, so use the POV variant -- the sphere centres on and orients to
// our eye (the authentic VTV-parented POVTranslocateRenderable), collapsing
// through us and blasting back open. A self-contained render one-shot -- it
// does NOT touch SimulationState (that dial drives the camera/POV + targeting;
// pulsing it regressed all of those).
extern void BTStartWarpEffectPOV();
BTStartWarpEffectPOV();
}
Check_Fpu();
}