Trailer: HUD takes showed the phone's screen; cut.py renders in parallel

- The trailer, BotCapture and PhoneScreen picked "any" UIDocument; since the phone has
  its own (drawn into its screen in the hand) the first-person takes captured the
  phone's home screen instead of the HUD. They take UIRoot's document now.
- cut.py renders a whole film in GC_CUT_WORKERS processes (20 by default), each a
  stretch of frames as near-lossless x264, joined and encoded once on NVENC with the
  sound. Shake and grain are seeded by frame, so the result does not depend on the
  split. Main trailer 57 -> 13 min.
- polden.py and story.py read the single rolls folder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
NiemandKG
2026-12-01 21:31:02 +06:00
parent 9f6b749bad
commit dd0430048b
6 changed files with 62 additions and 14 deletions

View File

@ -27,7 +27,7 @@ namespace GrassCutter
var cam = CameraFx.Cam ? CameraFx.Cam : Camera.main;
if (cam) cam.targetTexture = _scene;
_cam = cam;
var doc = Object.FindAnyObjectByType<UIDocument>();
var doc = UIRoot.I ? UIRoot.I.GetComponent<UIDocument>() : Object.FindAnyObjectByType<UIDocument>();
if (doc && doc.panelSettings)
{
doc.panelSettings.targetTexture = _ui;

View File

@ -18,7 +18,8 @@ namespace GrassCutter
void Eyes(bool on)
{
var fx = _cam.GetComponent<CameraFx>();
var doc = FindAnyObjectByType<UIDocument>();
// the HUD's own document: the phone has one of its own, drawn into its screen in the hand
var doc = UIRoot.I ? UIRoot.I.GetComponent<UIDocument>() : null;
if (on)
{
_cam.transform.SetParent(Me.head, false);

View File

@ -71,7 +71,7 @@ namespace GrassCutter
Tex.Create();
Web = new PhoneWeb((float)WebH / W, (float)H / W);
var main = UnityEngine.Object.FindAnyObjectByType<UIDocument>(FindObjectsInactive.Include);
var main = UIRoot.I ? UIRoot.I.GetComponent<UIDocument>() : UnityEngine.Object.FindAnyObjectByType<UIDocument>(FindObjectsInactive.Include);
var ps = UnityEngine.Object.Instantiate(main.panelSettings);
ps.targetTexture = Tex;
ps.scaleMode = PanelScaleMode.ConstantPixelSize;