Bridge: pre-movement camera, munga yaw fix, fogged background; net conf plasma
- fp_cam works before the first vehicle articulation (a freshly dropped mech sends no 0x1f until it moves; bailing out left the raw chain convention showing the inside of the mech at every drop) - The FLYK stand-in +90-deg yaw correction no longer applies to munga content (it yawed the player's own mech -- and every animated model -- 90 degrees: "looking through the right shoulder") - With fog on, the clear colour saturates to the fog colour (background at infinite distance); the pre-drop hold is FULLY black, as period pilots confirm - net_full.conf: COM2 plasma passthrough + setenv plasma flag Networked console session verified live: black hold at ready, flash + fade on console launch, drop-bay doors present, own mech visible, and the full death sequence captured on the wire (fade-to-black, escape-pod interior via near-fog exemption, world reload, white flash, blue-violet respawn fade = the blue swirly's home). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -827,7 +827,12 @@ class Renderer:
|
||||
'fog': (500, 4000, 0.05, 0.1, 0.12)}
|
||||
|
||||
V = np.linalg.inv(self.cam_matrix(board))
|
||||
back = np.array(vp['back']) * 255
|
||||
# fogged background: at infinite distance the clear must be the fog
|
||||
# colour (pre-drop hold is FULLY black; flash covers the sky band)
|
||||
if vp['fog_on'] and vp['fog'][1] > vp['fog'][0]:
|
||||
back = np.array(vp['fog'][2:5]) * 255
|
||||
else:
|
||||
back = np.array(vp['back']) * 255
|
||||
img = np.empty((H, W, 3), np.float32); img[:] = back
|
||||
zbuf = np.full((H, W), np.inf, np.float32)
|
||||
|
||||
@@ -855,7 +860,12 @@ class Renderer:
|
||||
if (NEARCULL and inst.get('gated') and not inst.get('hud')
|
||||
and np.linalg.norm(M[3, :3]) + inst.get('radius', 0) < 10.0):
|
||||
continue
|
||||
if inst['chain'] and inst['chain'][0] in board.anim:
|
||||
# FIX is the FLYK stand-in shark's +90-deg yaw correction (the
|
||||
# replacement model was authored nose-along-+X). BT/munga models
|
||||
# are authored correctly -- applying it yawed the player's own
|
||||
# mech 90 degrees ("looking through the right shoulder").
|
||||
if (not getattr(board, 'munga', False)
|
||||
and inst['chain'] and inst['chain'][0] in board.anim):
|
||||
M = FIX @ M
|
||||
if inst['billboard']:
|
||||
# spherical billboard: keep scale + eye position, face the camera
|
||||
|
||||
@@ -429,7 +429,11 @@ class GLRenderer(vrview.Renderer):
|
||||
ctx.viewport = (0, 0, W, H)
|
||||
ctx.enable(mgl.DEPTH_TEST)
|
||||
ctx.disable(mgl.BLEND)
|
||||
back = vp['back']
|
||||
# With fog on, the background sits at infinite distance and must
|
||||
# saturate to the FOG colour (the pod's pre-drop hold is FULLY black
|
||||
# and the start flash covers the sky band too -- period-pilot
|
||||
# confirmed); raw back_color left a clear blue stripe.
|
||||
back = vp['fog'][2:5] if fog_on else vp['back']
|
||||
fbo.clear(back[0], back[1], back[2], depth=1.0)
|
||||
|
||||
# frame-constant uniforms
|
||||
@@ -473,7 +477,9 @@ class GLRenderer(vrview.Renderer):
|
||||
if (vrview.NEARCULL and inst.get('gated') and not inst.get('hud')
|
||||
and np.linalg.norm(M[3, :3]) + inst.get('radius', 0) < 10.0):
|
||||
continue
|
||||
if inst['chain'] and inst['chain'][0] in board.anim:
|
||||
# FLYK-only +90 yaw stand-in correction (see vrview draw loop)
|
||||
if (not getattr(board, 'munga', False)
|
||||
and inst['chain'] and inst['chain'][0] in board.anim):
|
||||
M = FIX @ M
|
||||
if inst['billboard']:
|
||||
s = np.linalg.norm(M[0, :3])
|
||||
|
||||
@@ -40,7 +40,7 @@ blocksize=1024
|
||||
prebuffer=60
|
||||
[serial]
|
||||
serial1=directserial realport:COM1 rxpollus:100 rxburst:16
|
||||
serial2=disabled
|
||||
serial2=directserial realport:COM2
|
||||
[autoexec]
|
||||
mount c "C:\VWE\TeslaRel410\ALPHA_1"
|
||||
mount d "C:\VWE\TeslaRel410\emulator\net-boot"
|
||||
@@ -60,7 +60,7 @@ set BLASTER=A220 I5 D1 H5 P330 T6
|
||||
set TEMP=c:\
|
||||
set HEAPSIZE=15000000
|
||||
set L4GAUGE=640x480x16
|
||||
call setenv.bat r f s g
|
||||
call setenv.bat r f s p
|
||||
echo === launching game via NetNub (RIO + sound; no -egg; waits for console) ===
|
||||
32rtm.exe -x
|
||||
netnub -p -f btl4opt > nn.log
|
||||
|
||||
@@ -83,12 +83,17 @@ def fp_cam(board, cache):
|
||||
h = chain[-1]
|
||||
elif anim:
|
||||
h = max(anim, key=lambda k: float(np.abs(np.array(anim[k][9:12])).sum()))
|
||||
if h is None:
|
||||
return None
|
||||
fp_cam.root = h # player vehicle root DCS (for the pick backchannel)
|
||||
f = anim[h]
|
||||
R = np.array(f[:9]).reshape(3, 3)
|
||||
t = np.array(f[9:12])
|
||||
# h may be None before the FIRST vehicle articulation arrives (a freshly
|
||||
# dropped mech that hasn't moved sends no 0x1f yet -- both -egg and the
|
||||
# console flow). The CHAIN camera below works fine without it; bailing
|
||||
# out here left the raw default chain convention on screen, which put
|
||||
# the pre-movement view inside the mech's own geometry.
|
||||
R = t = None
|
||||
if h is not None:
|
||||
fp_cam.root = h # player vehicle root DCS (for the pick backchannel)
|
||||
f = anim[h]
|
||||
R = np.array(f[:9]).reshape(3, 3)
|
||||
t = np.array(f[9:12])
|
||||
worldup = np.array([0.0, 1.0, 0.0])
|
||||
eye = fwd = None
|
||||
if os.environ.get('FP_CAM', 'chain') != 'vehicle':
|
||||
@@ -97,11 +102,13 @@ def fp_cam(board, cache):
|
||||
ec, fc = Mc[3, :3], Mc[2, :3] # eye row; look = +Z row here
|
||||
n = np.linalg.norm(fc)
|
||||
if (np.isfinite(ec).all() and n > 1e-6 and
|
||||
np.linalg.norm(ec - t) < 100.0): # sane cockpit offset
|
||||
(t is None or np.linalg.norm(ec - t) < 100.0)):
|
||||
eye = ec + worldup * UPOFF[0]
|
||||
fwd = fc / n
|
||||
except Exception:
|
||||
pass
|
||||
if eye is None and R is None:
|
||||
return None
|
||||
if eye is None:
|
||||
# vehicle-root fallback: -Z row rendered forward (user-verified);
|
||||
# FP_FWD_SIGN flips it back if needed.
|
||||
|
||||
Reference in New Issue
Block a user