FUSION · FULL ARTICLE
AutoGain
Finds the current darkest and brightest values automatically and linearly remaps them to the selected Low/High output range; Do Z applies the same logic to Z/Depth.
Overview
AutoGain analyzes the incoming image automatically and finds its current extreme values. The darkest value maps to Low, the brightest value maps to High, and intermediate values are redistributed linearly between them. With the default Low 0.0 / High 1.0, the useful range is stretched from black to white.
Low and High must be read as target output Range endpoints. They are not input clipping thresholds and they do not manually choose which source values count as black and white. AutoGain chooses the input extrema itself.
Blackmagic documents a simple reference test: feed a horizontal gradient from 0.2 to 0.8, then set Low to 0.0 and High to 0.5. The darkest end lands at 0.0, the brightest end lands at 0.5, and the remaining values scale between those endpoints.
Automatic extrema detection is both the convenience and the temporal hazard. If a bright object leaves an otherwise dark shot, the new maximum becomes lower and the remaining scene is stretched more aggressively. In playback this appears as global brightness/contrast pumping even though no AutoGain parameter is animated.
The same issue exists at the dark end. A very dark object, shadow, clipped region, or technical outlier entering or leaving can change the detected minimum and shift the rest of the range. A single hero frame is therefore not evidence of temporal stability.
Do Z applies the AutoGain operation to Z/Depth channels. Blackmagic describes this as useful for matching the ranges of Z channels or making floating-point depth easier to inspect. It does not generate depth; the upstream image must already contain valid Z data.
Do Z needs special care in production. If a near or far object enters or leaves the scene, the automatically discovered depth range changes and existing objects can receive different normalized Z values on the next frame. That can be destructive for downstream depth-dependent work even when the Viewer looks easier to read.
For that reason, AutoGain with Do Z is best treated as a diagnostic or controlled range-matching branch rather than mandatory preparation for every depth pass. The Resolve manual also notes that the Viewer's normalized-image option is generally more suitable when the task is simply to inspect the full range of floating-point imagery because it does not have to become part of the processed image path.
Effect Mask is a separate blue input. Resolve 21 explicitly states that the mask is applied after the tool has processed the image and limits the final AutoGain adjustment spatially. That means it should not be documented as a guaranteed selector for the statistics used to discover the extrema.
The post-process mask semantics matter in practice. A mask can restrict where the AutoGain result contributes, but the automatic normalization remains sensitive to the input frame. Do not build a workflow around the assumption that a Rectangle makes AutoGain 'measure only the face' unless that exact behavior has been verified live in the target build.
AutoGain is valuable for quick technical work: expanding a narrow grayscale pass, checking whether floating-point imagery contains meaningful range, making low-contrast diagnostic material easier to read, or comparing controlled depth passes. Creative exposure, contrast, and shot matching are usually better handled by tools with explicit stable parameters.
A very bright specular, hot pixel, noise spike, or isolated extremely dark value can become an extremum and force most of the image into a small portion of the target Range. If the result unexpectedly looks flat, investigate outliers before simply raising High.
HDR and float workflows can contain values far outside 0–1. AutoGain can remap that range into something easier to inspect, but it still changes data. Keep Viewer normalization conceptually separate from an actual pixel/depth remap in the composition.
Low/High do not have to be 0–1. A High below 1.0 preserves upper headroom in the output representation; a Low above 0.0 raises the lower endpoint. The operation remains the same: current input min/max map to the chosen output endpoints.
Common Settings such as Blend and channel-processing controls belong to Fusion's shared Settings infrastructure and are not additional dedicated AutoGain controls. The captured Controls panel for this article contains only Do Z and the two Range values, Low and High.
The main production test is frame-to-frame continuity. Scrub and play through the largest lighting changes, appearing/disappearing highlights, and—when Do Z is enabled—near/far geometry changes. If global levels or depth values drift, replace automatic normalization with a more stable explicit pipeline.
When to use it
- Quickly expand a low-contrast technical image for diagnosis.
- Inspect the full range of floating-point imagery without manually tuning gain/offset.
- Normalize a controlled grayscale/matte test pass before analysis.
- Match the ranges of controlled Z passes on a dedicated technical branch.
- Confirm that useful Z/Depth data exists and inspect its dynamic range through Do Z.
- Teach or verify automatic min/max to Low/High remapping.
Article screenshots
Inputs & outputs
AutoGain: Input → automatic min/max analysis → Low/High remap → Output; Effect Mask is applied after processing
AutoGain accepts a normal 2D image, discovers the current tonal minimum/maximum on every frame, and linearly maps those extrema into the selected Low/High output Range. It is not a fixed Gain and not a threshold node. The blue Effect Mask gates the processed result after the operation and should not be treated as a selector for auto-range statistics.
Automatically measures the current frame extrema and stretches/compresses the intermediate range into Low/High; with Do Z, applies the same logic to Z/Depth data.
Inputs
- Input
Primary 2D image for automatic range analysis
Receives: A 2D image from MediaIn, Loader, Background, Merge, or another image processor. For Do Z, the upstream stream must genuinely contain a Z/Depth auxiliary channel.
Inside the node: AutoGain discovers the current extrema automatically and remaps the detected range into Low/High. Because extrema are recalculated per frame, changing scene content can change the entire result.
Typical sources: MediaIn · Loader · Background · Merge result · render pass / EXR with Z
A bright/dark outlier, hot pixel, or object entering/leaving frame can change the extrema and create global pumping. With Do Z, the same mechanism changes normalized depth values.
- Effect Mask
Optional post-process coverage input
Receives: A normal Fusion mask from Rectangle, Ellipse, Polygon, B-Spline, Bitmap, or another mask node.
Inside the node: According to the Resolve reference, the mask is applied after AutoGain processing and spatially gates the final adjustment.
Typical sources: Rectangle · Ellipse · Polygon · B-Spline · Bitmap
Do not document Effect Mask as the region guaranteed to drive min/max statistics. Exact statistics-domain behavior requires live verification in the target build.
Outputs and destination
Output
A 2D image after automatic min/max → Low/High remapping. With Do Z, the corresponding operation is applied to Z/Depth data carried by the image stream.
Next step: Viewer / diagnostic branch · Color Corrector · Merge · MediaOut · another 2D processor
Do not feed frame-dependent normalized Z into production Depth Blur/Fog as though it were stable geometric depth. For ordinary footage, review playback for brightness/contrast pumping.
- Output
- 2D image after automatic remapping of the discovered range into Low/High; with Do Z, the corresponding operation is applied to Z/Depth data.
Processing order
- Input supplies a 2D image and, when Do Z is used, existing auxiliary Z/Depth data.
- AutoGain discovers the current darkest/brightest values for the selected operation.
- The detected minimum maps to Low and the detected maximum maps to High; intermediate values are remapped linearly between them.
- Do Z switches the automatic range operation to Z/Depth data; the node does not generate depth itself.
- If connected, Effect Mask is applied after processing and spatially gates the final adjustment.
- Output passes the processed 2D image downstream; if extrema change between frames, image levels/Z can pump even with static controls.
Documented gradient test
Gradient 0.2–0.8 → AutoGain (Low 0.0 / High 0.5) → Output
AutoGain discovers 0.2 as the minimum and 0.8 as the maximum, maps them to 0.0 and 0.5, and scales intermediate values between those output endpoints.
Low/High are output endpoints, not input thresholds. Extrema are automatic and per-frame. Do Z works on existing Z/Depth; it does not create depth. Effect Mask is post-process coverage. Always check temporal pumping.
Parameters
AutoGain · Inspector reference
Read AutoGain as a statistics-driven linear remap. There are only three dedicated Controls: Do Z and Range Low/High. The node discovers input extrema on every frame, so Low/High are target output endpoints rather than input thresholds. That makes AutoGain a fast diagnostic tool and a potential source of temporal pumping when extrema change.
- Input
- 2D image · optional existing Z
- Analyze
- frame min/max extrema
- Map
- min → Low · max → High
- Mode
- RGB/image or Do Z
- Coverage
- Effect Mask after processing
- Temporal
- extrema may change each frame
- Output
- remapped 2D image/data
Mode · Do Z
Do Z applies the auto-range operation to an existing Z/Depth channel. It does not create depth and does not make it temporally stable.
- Do Z
Mode > Do ZApplies the AutoGain operation to Z/Depth channels. Upstream must already contain valid Z. Because the range is discovered automatically per frame, changing near/far extrema can change normalized depth values over time.
Check / distinguish: Use it on a copy/technical branch and compare several frames with different near/far geometry.
- Do Z requires existing depth
Controls > Do ZDo Z does not infer depth from RGB. It applies AutoGain to Z/Depth data that already exists.
Check / distinguish: Confirm upstream auxiliary Z before enabling Do Z.
- Do Z can match controlled Z ranges
Controls > Do ZBlackmagic lists matching the range of one Z channel to another as a valid use case, but temporal consistency remains your responsibility.
Check / distinguish: Compare the same reference objects across several frames rather than one frame's histogram.
- Do Z can destabilize depth
Controls > Do Z > temporalWhen a new near/far extreme appears, normalization changes and existing objects can receive different Z values.
Check / distinguish: Measure/compare the same object before/after a new extreme appears.
- Depth effects expect meaningful geometry
Workflow boundary > Depth Blur / FogDepth Blur/Fog generally expect depth whose numeric relationships preserve geometric/compositing meaning. Frame-adaptive AutoGain can change that meaning.
Check / distinguish: Before downstream depth FX, A/B original Z and auto-normalized Z over a moving section.
- Diagnostic Z branch is safer
Workflow > branch designIf Do Z is only for inspection, keep AutoGain on a separate copy branch and leave production Z untouched.
Check / distinguish: Verify the diagnostic output is not reconnected into the final depth pipeline.
- Z viewing needs the right Viewer channel
Viewer > auxiliary channelsDo Z can change Z data, but the normal RGB Viewer does not necessarily show the auxiliary Z representation.
Check / distinguish: Switch the Viewer to Z/aux representation and inspect RGB separately.
Range · Low · High
Low/High are output endpoints. Detected minimum → Low, detected maximum → High, with intermediate values scaled between them.
- Low
Range > LowSets the lower endpoint of the target output Range. The currently detected darkest input value maps to Low. This is an output endpoint, not an input threshold for selecting shadows.
Check / distinguish: Start at 0.0 so auto-range behavior is easy to read, then change Low independently from High.
- High
Range > HighSets the upper endpoint of the target output Range. The currently detected brightest input value maps to High, with intermediate values scaled linearly between Low and High.
Check / distinguish: Inspect extreme highlights/outliers before reducing High; one hot pixel can dominate the automatic stretch.
- AutoGain is not fixed Gain
Concept > automatic extremaAutoGain discovers the input minimum/maximum on each frame before building the remap. Identical Low/High settings do not guarantee the same transform on two frames with different extrema.
Check / distinguish: Compare two frames with different brightest pixels while keeping Low/High unchanged.
- Low is an output endpoint
Controls > Range > LowLow is the value that receives the detected minimum. It is not a threshold telling AutoGain to ignore source values below Low.
Check / distinguish: On a test gradient, change Low with the source fixed and watch the output black endpoint.
- High is an output endpoint
Controls > Range > HighHigh is the value that receives the detected maximum. It does not select an input highlight threshold.
Check / distinguish: On a 0.2–0.8 gradient, compare High 1.0 and 0.5.
- Intermediate values are remapped
Controls > RangeAfter assigning endpoints, intermediate values are linearly redistributed between Low and High; this is range stretching/compression rather than a binary clip.
Check / distinguish: Measure a test-gradient midpoint before/after and verify continuous mapping.
- Documented 0.2–0.8 example
Reference > Range exampleBlackmagic: source gradient 0.2–0.8, Low 0.0, High 0.5 → darkest 0.0, brightest 0.5.
Check / distinguish: Reproduce this controlled test before working on real footage.
- Default 0–1 maximizes display range
Controls > RangeLow 0 / High 1 stretches the currently detected range to black/white. It is a neutral target range, but not a no-op when source extrema are not already 0/1.
Check / distinguish: Bypass AutoGain on a low-contrast shot: 0–1 can still change the image dramatically.
- High below 1 preserves headroom
Controls > Range > HighHigh < 1 compresses the brightest detected value below display white and leaves output headroom. Temporal auto-detection still remains.
Check / distinguish: Compare High 1.0 and 0.8 on one fixed frame, then repeat on another frame.
- Low above 0 raises the floor
Controls > Range > LowLow > 0 raises the detected minimum above black. This is an output remap, not a fixed lift transform relative to absolute source values.
Check / distinguish: Compare the same Low on two frames with different minima.
- Extreme highlight drives the whole scale
Temporal behavior > maximumA single specular/hot pixel can become the detected maximum and force all other values into a smaller part of the Range.
Check / distinguish: Find the brightest pixel and temporarily remove/fix it upstream for A/B.
- Extreme shadow drives the lower scale
Temporal behavior > minimumAn extremely dark outlier similarly changes the minimum and remaps the entire frame.
Check / distinguish: Compare frames before/after a deep shadow or black object appears.
- Noise can become statistics
Input quality > outliersNoise spikes and isolated dead/hot pixels can become extrema even when visually insignificant.
Check / distinguish: Inspect pixel-level extrema before trying to 'fix' the AutoGain Range.
- Frame-to-frame pumping is expected
Temporal behavior > image levelsIf a bright object leaves a dark shot, the new maximum drops and the remaining scene becomes brighter. The manual explicitly describes this as a consequence of the architecture.
Check / distinguish: Loop the section around the highlight leaving and watch the whole frame, not only the object.
- One still is insufficient
QC > temporalAutoGain can look perfect on a hero frame and pump visibly on adjacent frames.
Check / distinguish: Check start/middle/end and frame-step around extrema changes.
- Shot matching needs stable transforms
Workflow boundary > gradingRepeatable shot matching usually needs an explicit fixed transform rather than frame-adaptive normalization.
Check / distinguish: A/B against BrightnessContrast/ColorCorrector where identical settings produce a stable mapping.
- AutoGain is useful for diagnostics
Workflow > diagnosticsThe node is especially useful when you need to see whether meaningful range exists in a float/grayscale pass without manually tuning gain.
Check / distinguish: Keep the diagnostic branch separate from the production result.
- Viewer normalization is a different tool
Workflow boundary > ViewerThe Resolve manual notes View Normalized Image as generally more suitable when the task is simply to see the full float range. A Viewer transform and a processed-pixel remap are different things.
Check / distinguish: Compare an AutoGain branch with Viewer normalization that leaves graph data unchanged.
- Effect Mask is applied after processing
Effect MaskResolve 21 describes Effect Mask as post-process: it gates the already processed AutoGain result.
Check / distinguish: Use a hard Rectangle mask and compare inside/outside with Low/High unchanged.
- Effect Mask is not a statistics selector
Effect Mask > statistics boundaryPost-process semantics do not imply that the mask constrains extrema analysis. Do not promise 'measure only inside the mask'.
Check / distinguish: If the workflow depends on masked statistics, run a live target-build test with a controlled outlier outside the mask.
- Masked output can mix transforms
Effect Mask > boundaryAt the mask edge, processed and unprocessed regions blend spatially. This is a coverage transition, not a soft change in statistics.
Check / distinguish: Inspect the edge at 100% and in playback, especially with a strong automatic stretch.
- Common Blend is separate
Settings > BlendBlend belongs to common Settings and mixes final node contribution. It does not turn AutoGain into manual gain or stabilize extrema.
Check / distinguish: Compare Blend and High; they solve different problems.
- Channel processing is separate
Settings > Process R G B ACommon channel checkboxes belong to shared Settings infrastructure and are not part of the three dedicated AutoGain Controls on the captured panel.
Check / distinguish: Document Controls and Settings separately so the effect-specific inventory stays accurate.
- Float/HDR data may exceed 0–1
Input range > floatAutoGain can make out-of-range float data easier to inspect, but the remap genuinely changes processed values.
Check / distinguish: Compare a numeric sample before/after and do not confuse this with display-only normalization.
- Auto range can compress useful midtones
Input range > outlier dominanceIf extrema sit far from most pixels, useful midtones can be compressed into a narrow interval despite a 'full' 0–1 output.
Check / distinguish: Inspect representative midtones/histogram, not only endpoints.
- Range animation adds a second variable
Controls > Range > animationAnimating Low/High adds user animation on top of frame-dependent input extrema, making diagnosis substantially harder.
Check / distinguish: Confirm static behavior first, then add animation only when explicitly needed.
- Bypass is the quickest truth test
QC > bypassThe eye quickly adapts to automatic normalization. Regular bypass restores a reference to original contrast/exposure.
Check / distinguish: Toggle bypass on the same frame and then during playback.
- Use known-value test images
QC > measurementAutoGain is easiest to validate on controlled gradients/ramps with known numeric endpoints rather than subjective imagery.
Check / distinguish: Before a production shot, verify the node on a 0.2–0.8 test ramp.
- Temporal QC beats screenshot QC
Final QCThe Inspector screenshot verifies controls and captured values but cannot prove frame-dependent behavior.
Check / distinguish: Perform final acceptance in motion and use the screenshot only as UI evidence.
Before adjusting the node
- First reproduce the documented 0.2–0.8 → Low 0 / High 0.5 gradient test; it is the clearest way to understand Range semantics.
- Do not call Low/High thresholds: they do not choose input black/white points; they set output endpoints.
- A/B several frames before/after an extreme highlight or shadow appears; a static still does not reveal pumping.
- If the result suddenly looks flat, first look for a hot pixel/specular/noise outlier that captured the maximum/minimum.
- Enable Do Z only when upstream contains a valid Z/Depth channel.
- Do not treat normalized Z as stable production depth: changing near/far extrema can shift existing object values between frames.
- For simple float-data inspection, compare Viewer normalization; diagnosis does not have to modify working values.
- Effect Mask is applied after processing; use it as a coverage gate, not a presumed statistics selector.
- Common Settings/Blend are not additional dedicated AutoGain Controls.
- Perform final QC in playback across the most difficult lighting/depth-change section.
Reference documentation
- Blackmagic Design · Fusion Visual Effects
Official Blackmagic learning material for Fusion logic, masks, compositing and core tools.
- Blackmagic Design · DaVinci Resolve support
Current Resolve/Fusion manuals and support material. Exact control names and placement can vary by version.
Examples
AutoGain: official 0.2–0.8 → 0.0–0.5 range test
Understand the core semantic: Low/High are output endpoints while AutoGain discovers the input minimum and maximum automatically.
Starting conditions
DaVinci Resolve / Fusion Target: Resolve 21/21.1; AutoGain semantics cross-checked against the Resolve 21 Color Nodes reference and the captured current Inspector · Built-in Fusion Color tool; no third-party plugins required · Cross-platform reference; live Resolve execution was not run in this package
1920 × 1080 · 24 fps · 120 frames · 2D image processing. Treat AutoGain as a frame-dependent min/max remap; keep diagnostic Z work separate from production depth unless explicitly intended.
- Exercise 1 needs a grayscale test image whose darkest value is about 0.2 and brightest value is about 0.8.
- Exercise 2 needs a low-key shot where a bright object enters or leaves frame so temporal pumping is easy to observe.
- Exercise 3 needs an image stream that genuinely contains a floating-point Z/Depth auxiliary channel.
Source material
- SRC
A horizontal grayscale gradient with a minimum near 0.2 and maximum near 0.8.
Generate it with a Background node or import a linear 32-bit test image with known values.
Nodes and connections
SRC— SOURCE · MediaInAG— AUTO GAIN · AutoGainOUT— OUTPUT · MediaOut
| Source | Destination | Data |
|---|---|---|
SOURCE (SRC)Output | AUTO GAIN (AG)Input | image |
AUTO GAIN (AG)Output | OUTPUT (OUT)Input | image |
Graph output: OUTPUT (OUT)
Parameter values
- AUTO GAIN (AG) / Controls / Do Z
falseKeep the first exercise on ordinary image values.
- AUTO GAIN (AG) / Controls / Low
0Map the detected darkest input value to black.
- AUTO GAIN (AG) / Controls / High
0.5Map the detected brightest input value to 0.5, matching the Blackmagic example.
Reproduce the example
- Feed the known gradient into AutoGain and set Do Z = Off, Low = 0.0, High = 0.5.
This reproduces the documented mapping without creative variables and makes it clear that Range defines output endpoints.
Check: The darkest end lands near 0.0, the brightest near 0.5, and midtones occupy the interval between them.
- Return High from 0.5 to 1.0 and compare again.
Only the target output range changes; the 0.2–0.8 source does not become an input-threshold pair.
Check: The gradient now stretches roughly 0–1 while preserving the ordering of intermediate values.
Expected result
- OUTPUT (OUT) · frame 60
AutoGain linearly maps the detected 0.2–0.8 range into the selected 0.0–0.5 Range; this is an automatic stretch, not threshold clipping.
Alpha: Alpha is not the target of this exercise; verify it did not change unexpectedly through common Settings.
When the result differs
- The endpoints do not match the expected 0.0/0.5.
Cause: The test image contains additional bright/dark pixels, color management changes values, or the wrong channel/view is being measured.
Correction: Use a clean linear test gradient and measure known points without overlays or upstream processing.
References
- Blackmagic Design — DaVinci Resolve 21 Reference Manual: Color Nodes / Auto Gain
Fusion Page Effects > Color Nodes > Auto Gain [AG]: Input and Effect Mask; Do Z; Range Low/High; automatic darkest/brightest remap; frame-to-frame level/depth variation warning; 0.2–0.8 gradient example.
- Blackmagic Design — The Visual Effects Guide to DaVinci Resolve 20
Fusion fundamentals and MediaIn/MediaOut image-pipeline behavior used by the practice graphs.
AutoGain: expose frame-dependent pumping
See why automatic extrema detection cannot be judged from one frame: a bright object leaving changes normalization of the entire remaining scene.
Starting conditions
DaVinci Resolve / Fusion Target: Resolve 21/21.1; AutoGain semantics cross-checked against the Resolve 21 Color Nodes reference and the captured current Inspector · Built-in Fusion Color tool; no third-party plugins required · Cross-platform reference; live Resolve execution was not run in this package
1920 × 1080 · 24 fps · 120 frames · 2D image processing. Treat AutoGain as a frame-dependent min/max remap; keep diagnostic Z work separate from production depth unless explicitly intended.
- Exercise 1 needs a grayscale test image whose darkest value is about 0.2 and brightest value is about 0.8.
- Exercise 2 needs a low-key shot where a bright object enters or leaves frame so temporal pumping is easy to observe.
- Exercise 3 needs an image stream that genuinely contains a floating-point Z/Depth auxiliary channel.
Source material
- SRC
A low-key shot where a very bright lamp/window/specular is present in the first half and then leaves frame completely.
Any clip with a large change in its maximum or minimum between adjacent sections.
Nodes and connections
SRC— SOURCE · MediaInAG— AUTO GAIN · AutoGainOUT— OUTPUT · MediaOut
| Source | Destination | Data |
|---|---|---|
SOURCE (SRC)Output | AUTO GAIN (AG)Input | image |
AUTO GAIN (AG)Output | OUTPUT (OUT)Input | image |
Graph output: OUTPUT (OUT)
Parameter values
- AUTO GAIN (AG) / Controls / Do Z
falseKeep the pumping test on normal image values.
- AUTO GAIN (AG) / Controls / Low
0Use the default lower target so changes come from detected extrema.
- AUTO GAIN (AG) / Controls / High
1Use the default upper target so changes come from detected extrema.
Reproduce the example
- Find a frame where the bright object is still present and judge the level of the rest of the dark scene.
The bright object defines the current detected maximum and therefore affects the scale of every other pixel.
Check: Note how dark the mid/shadow regions appear while the highlight is present.
- Move to the adjacent section after the bright object leaves and compare the same regions.
The new maximum is lower, so AutoGain stretches the remaining range more strongly—the documented temporal side effect.
Check: Look for a global brightness/contrast jump even though AutoGain parameters are not animated.
- Bypass AutoGain and decide whether this adaptation is acceptable for the real task.
Final grading usually needs a stable transform rather than content-dependent auto exposure on every frame.
Check: If pumping is distracting, AutoGain remains a diagnostic helper rather than a final processing node.
Expected result
- OUTPUT (OUT) · frame 60
When extrema change, AutoGain changes the entire tonal stretch frame by frame; this is expected node behavior, not an accidental keyframe.
Alpha: Inspect alpha separately; the temporal pumping in this exercise concerns automatically stretched image levels.
When the result differs
- The pumping is barely visible.
Cause: Extrema barely change in the selected clip or other persistent highlights continue to define the maximum.
Correction: Choose a shot with a genuinely disappearing extreme highlight/shadow or build a controlled test source.
References
- Blackmagic Design — DaVinci Resolve 21 Reference Manual: Color Nodes / Auto Gain
Fusion Page Effects > Color Nodes > Auto Gain [AG]: Input and Effect Mask; Do Z; Range Low/High; automatic darkest/brightest remap; frame-to-frame level/depth variation warning; 0.2–0.8 gradient example.
- Blackmagic Design — The Visual Effects Guide to DaVinci Resolve 20
Fusion fundamentals and MediaIn/MediaOut image-pipeline behavior used by the practice graphs.
AutoGain Do Z: inspect depth without corrupting production Z
Understand Do Z and its main boundary: auto-normalized depth can help inspection/range matching but may change the same object's value across frames.
Starting conditions
DaVinci Resolve / Fusion Target: Resolve 21/21.1; AutoGain semantics cross-checked against the Resolve 21 Color Nodes reference and the captured current Inspector · Built-in Fusion Color tool; no third-party plugins required · Cross-platform reference; live Resolve execution was not run in this package
1920 × 1080 · 24 fps · 120 frames · 2D image processing. Treat AutoGain as a frame-dependent min/max remap; keep diagnostic Z work separate from production depth unless explicitly intended.
- Exercise 1 needs a grayscale test image whose darkest value is about 0.2 and brightest value is about 0.8.
- Exercise 2 needs a low-key shot where a bright object enters or leaves frame so temporal pumping is easy to observe.
- Exercise 3 needs an image stream that genuinely contains a floating-point Z/Depth auxiliary channel.
Source material
- SRC
A 2D image stream with a valid floating-point Z/Depth auxiliary channel and near/far geometry that changes over time.
An EXR render pass or Renderer3D result with a correctly populated Z channel.
Nodes and connections
SRC— SOURCE · MediaInAG— AUTO GAIN · AutoGainOUT— OUTPUT · MediaOut
| Source | Destination | Data |
|---|---|---|
SOURCE (SRC)Output | AUTO GAIN (AG)Input | image |
AUTO GAIN (AG)Output | OUTPUT (OUT)Input | image |
Graph output: OUTPUT (OUT)
Parameter values
- AUTO GAIN (AG) / Controls / Do Z
trueApply AutoGain to Z/Depth for this diagnostic exercise.
- AUTO GAIN (AG) / Controls / Low
0Normalize the detected near/far span to a simple lower endpoint for inspection.
- AUTO GAIN (AG) / Controls / High
1Normalize the detected near/far span to a simple upper endpoint for inspection.
Reproduce the example
- Before AutoGain, confirm through Viewer/aux-channel inspection that upstream genuinely contains Z/Depth.
Do Z processes an existing depth channel; it does not derive depth from RGB.
Check: Z shows meaningful spatial structure rather than an empty/constant channel.
- Enable Do Z with a 0–1 Range on a separate diagnostic branch; inspect the Z/Depth representation rather than only the normal RGB Viewer.
The AutoGain remap makes the current depth span easier to compare but actually changes values in the processed depth data.
Check: Within one frame, depth stretches across the Range without any expectation that AutoGain repairs missing/incorrect Z.
- Compare the Z of the same object before and after a new near/far extreme enters the scene.
The manual warns that automatic depth-range changes can push existing objects forward/backward when extrema change.
Check: If the object's numeric/visual Z drifts, do not feed this normalized branch into production Depth Blur/Fog without an explicit reason.
Expected result
- OUTPUT (OUT) · frame 60
Do Z automatically remaps an existing depth range, but changing near/far extrema can change normalized Z values between frames; the branch remains diagnostic.
Alpha: Alpha remains a separate channel and does not substitute for Z; inspect it independently.
When the result differs
- Do Z shows nothing meaningful.
Cause: Upstream does not contain valid Z/Depth, or the Viewer is showing normal RGB instead of the auxiliary channel.
Correction: Verify source EXR/Renderer3D auxiliary channels before AutoGain and switch the Viewer to the relevant representation.
References
- Blackmagic Design — DaVinci Resolve 21 Reference Manual: Color Nodes / Auto Gain
Fusion Page Effects > Color Nodes > Auto Gain [AG]: Input and Effect Mask; Do Z; Range Low/High; automatic darkest/brightest remap; frame-to-frame level/depth variation warning; 0.2–0.8 gradient example.
- Blackmagic Design — The Visual Effects Guide to DaVinci Resolve 20
Fusion fundamentals and MediaIn/MediaOut image-pipeline behavior used by the practice graphs.
Other outlines from the article
Official gradient test
A 0.2 to 0.8 gradient with Low 0.0 / High 0.5 demonstrates that the detected input extrema map automatically to the selected output endpoints.
- Gradient 0.2-0.8
- AutoGain Low 0 / High 0.5
- Viewer
Low-contrast technical pass
A narrow grayscale range is expanded for inspection, then AutoGain is bypassed or replaced with a more controlled transform for production.
- Technical Pass
- AutoGain
- Viewer
Temporal pumping test
A bright object leaves a dark shot; AutoGain recalculates the maximum and the remaining scene becomes brighter.
- Low-key footage
- AutoGain
- Playback QC
Z diagnostic branch
Do Z is enabled on a copy of a valid depth-pass branch for range inspection, without assuming the normalized result is safe production Z.
- Image + Z
- AutoGain Do Z
- Z Viewer
Local coverage
Effect Mask limits the visible contribution of AutoGain after processing; the mask is not treated as a selector for min/max statistics.
- MediaIn
- AutoGain + Rectangle
- MediaOut
Mistakes
- Treating Low/High as input thresholds. They are output endpoints for the automatically discovered min/max.
- Treating AutoGain like a fixed Gain/Contrast transform even though its input anchors move with frame content.
- Tuning one frame and never checking playback, which is the fastest route to brightness pumping.
- Trying to cure pumping by changing High without finding the bright/dark outlier that changes the statistics.
- Enabling Do Z without valid upstream Z and expecting AutoGain to generate depth.
- Normalizing Z frame by frame and then using it as stable geometric depth for Depth Blur/Fog.
- Treating Effect Mask as the region used to measure extrema; the Resolve manual describes it as post-process coverage.
- Using AutoGain only to view float data when Viewer normalization would avoid changing working values.
- Treating captured Low 0 / High 1 values as a universal creative preset rather than a neutral target Range state.
- Ignoring isolated hot pixels/noise spikes that can become a new maximum or minimum.
- Using automatic normalization for shot matching where a repeatable exposure transform is required.
- Confusing common Settings/Blend with dedicated AutoGain Controls.
Tips
- Reproduce Blackmagic's 0.2-0.8 to 0.0-0.5 gradient example; it explains Range semantics immediately.
- Keep Range at 0-1 while diagnosing the node so automatic detection is separated from additional output remapping.
- Check extrema on several frames that represent the most difficult lighting states.
- If AutoGain is only diagnostic, keep it on a separate branch so normalized data cannot accidentally reach the production chain.
- Compare Viewer normalization for float/Z inspection; visual diagnosis and actual pixel modification are different tasks.
- Stress-test Do Z with objects entering/leaving near and far depth because that is where frame-dependent remapping becomes obvious.
- Use Effect Mask as a coverage gate, not as a presumed statistics selector unless the target build is verified live.
- If one specular dominates the stretch, isolate it temporarily and confirm it is the real cause before changing the Range.
- For stable creative work, prefer explicit Color/Gain/Curves controls where identical settings produce a repeatable transform.
- A High value below 1.0 can demonstrate output headroom but does not remove temporal instability of automatic extrema.
- A/B bypass both on stills and during playback; AutoGain can look excellent on frame 60 and wrong on frame 61.
- Document whether AutoGain is final processing or only a Viewer/diagnostic helper when handing the comp to another artist.
Workflow order
- Decide whether the task is diagnostic normalization, controlled range matching, or creative correction. AutoGain is rarely the best final creative tool.
- Connect a 2D image to Input and begin with Do Z off, Low 0.0, High 1.0.
- Inspect the source minimum/maximum behavior on several representative frames, not just one still.
- Enable AutoGain and A/B how the whole range stretches to Low/High.
- If one highlight or shadow dominates the result, identify the outlier upstream before randomly changing Range.
- If headroom is required, move Low/High deliberately as output endpoints and re-check midtones.
- For local coverage, connect Effect Mask while remembering that the mask is applied after processing and is not a statistics-selection control.
- For Z diagnosis, work on a separate branch, verify that the source really contains Z, and only then enable Do Z.
- With Do Z, inspect frames before and after near/far objects appear; do not silently feed auto-normalized depth into downstream production depth effects.
- If the goal is only to view float/Z data, compare Viewer normalization or a static diagnostic pipeline that leaves working data untouched.
- Play the full section and look for global pumping, flicker, and shot-to-shot jumps.
- Keep AutoGain in the final graph only when its frame-dependent automatic behavior is intentionally part of the task.
