Fade into the Winners Circle instead of cutting to it
The podium arrived as a hard cut: the race was still on screen one frame and the stand was there the next. The race has its own fade-to-black already, and it was being suppressed to keep the fade from blacking out the podium behind it - which threw away the transition along with the problem. Now the two are sequenced. StopMission lets the race fade out as it always did and posts the podium to itself for when that fade has landed on black; the handler stands the finishers up behind the black and ramps back in. The fade-in is the end-of-mission fade run backwards - the same multiply on the fog colour and both fog distances, from nothing up to what the Winners Circle asked for. Timings: 0.7s of fade-out and black, then a 0.45s fade in. Both come out of the 11 second hold, leaving about ten seconds of podium. RP412PODIUMFADEIN sets the ramp. Verified by measuring frame brightness across the transition. The race falls away and the screen reaches black, then the stand comes up - and with the ramp stretched to 3s to make it resolvable at a half-second sampling interval, it climbs 71.8, 77, 78.7, 79.7, 80.5 rather than stepping, so it is a real fade and not a cut arriving late. The camera also comes down and tilts up across the tiers, which is how a podium wants to be shot. It is a balance in both directions: drop it further or tilt harder and the sky takes the top half while the winner's spot slides off the bottom of the frame; tilt down instead and the shot turns into a floor plan. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1803,6 +1803,12 @@ DPLRenderer::DPLRenderer(
|
||||
mPresentationCamera = False;
|
||||
mPresentationFog = False;
|
||||
mPresentationAspect = 0.0f;
|
||||
mPresentationFadeTime = 0.0f;
|
||||
mPresentationFogRed = 0.0f;
|
||||
mPresentationFogGreen = 0.0f;
|
||||
mPresentationFogBlue = 0.0f;
|
||||
mPresentationFogNear = 0.0f;
|
||||
mPresentationFogFar = 0.0f;
|
||||
D3DXMatrixIdentity(&mPresentationView);
|
||||
dplMainView = NULL;
|
||||
dplDeathZone = NULL;
|
||||
@@ -6109,6 +6115,36 @@ void DPLRenderer::ExecuteImplementation(RendererComplexity, RendererOrigin::Inte
|
||||
lastFrameTime = mTargetRenderTime;
|
||||
currentFrameTime = Now();
|
||||
|
||||
//
|
||||
// Fade the presentation up out of black, if one is running. Same lever
|
||||
// the end-of-mission fade pulls: scale the fog colour and both fog
|
||||
// distances, here from nothing up to what the podium asked for.
|
||||
//
|
||||
if (mPresentationFadeTime > 0.0f)
|
||||
{
|
||||
Scalar remaining = mPresentationFadeEnd - Now();
|
||||
Scalar fade = 1.0f - (remaining / mPresentationFadeTime);
|
||||
if (fade >= 1.0f)
|
||||
{
|
||||
fade = 1.0f;
|
||||
mPresentationFadeTime = 0.0f; // done
|
||||
}
|
||||
if (fade < 0.0f)
|
||||
{
|
||||
fade = 0.0f;
|
||||
}
|
||||
|
||||
fogRed = mPresentationFogRed * fade;
|
||||
fogGreen = mPresentationFogGreen * fade;
|
||||
fogBlue = mPresentationFogBlue * fade;
|
||||
currentFogNear = mPresentationFogNear * fade;
|
||||
currentFogFar = mPresentationFogFar * fade;
|
||||
|
||||
mDevice->SetRenderState(D3DRS_FOGCOLOR,
|
||||
D3DCOLOR_XRGB((int)(255 * fogRed), (int)(255 * fogGreen),
|
||||
(int)(255 * fogBlue)));
|
||||
}
|
||||
|
||||
//
|
||||
// Pillarbox: black the whole target first, then narrow the viewport so
|
||||
// everything after this - clear, scene, reticle - lands inside the crop
|
||||
@@ -7010,6 +7046,28 @@ void
|
||||
Check(this);
|
||||
mPresentationCamera = False;
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
//
|
||||
// Come up out of the black. SetFogStyle(winnersCircleFogStyle) has already
|
||||
// put the target fog in place, so remember it and ramp toward it - the same
|
||||
// multiply the end-of-mission fade uses, run the other way.
|
||||
//
|
||||
void
|
||||
DPLRenderer::StartPresentationFadeIn(Scalar seconds)
|
||||
{
|
||||
Check(this);
|
||||
|
||||
mPresentationFogRed = fogRed;
|
||||
mPresentationFogGreen = fogGreen;
|
||||
mPresentationFogBlue = fogBlue;
|
||||
mPresentationFogNear = currentFogNear;
|
||||
mPresentationFogFar = currentFogFar;
|
||||
|
||||
mPresentationFadeTime = (seconds > 0.0f) ? seconds : 0.01f;
|
||||
mPresentationFadeEnd = Now();
|
||||
mPresentationFadeEnd += mPresentationFadeTime;
|
||||
}
|
||||
//
|
||||
//#############################################################################
|
||||
// Startup the implementation of the Division video renderer
|
||||
|
||||
Reference in New Issue
Block a user