Difference between revisions of "UM:Appendix Monitorgrids Spec"
m (Text replacement - "|Platform:" to "|UM:") |
|||
Line 393: | Line 393: | ||
</td> | </td> | ||
<td style="width:476px; border: solid 1px #999999;" valign="top" width="476"><p class="p_DVTableText"><span class="f_DVTableText">Description</span></p> | <td style="width:476px; border: solid 1px #999999;" valign="top" width="476"><p class="p_DVTableText"><span class="f_DVTableText">Description</span></p> | ||
+ | </td> | ||
+ | </tr> | ||
+ | <tr style="text-align:left;vertical-align:top;"> | ||
+ | <td style="width:307px; border: solid 1px #999999;" valign="top" width="307"><p class="p_DVTableText"><span class="f_DVFConfigFile">##masterLocation</span></p> | ||
+ | </td> | ||
+ | <td style="width:476px; border: solid 1px #999999;" valign="top" width="476"><p class="p_DVTableText"><span class="f_DVTableText">Source file location (path on disk)</span></p> | ||
</td> | </td> | ||
</tr> | </tr> | ||
Line 398: | Line 404: | ||
<td style="width:307px; border: solid 1px #999999;" valign="top" width="307"><p class="p_DVTableText"><span class="f_DVFConfigFile">##srcLocation</span></p> | <td style="width:307px; border: solid 1px #999999;" valign="top" width="307"><p class="p_DVTableText"><span class="f_DVFConfigFile">##srcLocation</span></p> | ||
</td> | </td> | ||
− | <td style="width:476px; border: solid 1px #999999;" valign="top" width="476"><p class="p_DVTableText"><span class="f_DVTableText"> | + | <td style="width:476px; border: solid 1px #999999;" valign="top" width="476"><p class="p_DVTableText"><span class="f_DVTableText">Current image location (path on disk)</span></p> |
</td> | </td> | ||
</tr> | </tr> |
Latest revision as of 16:30, 26 June 2019
Overlay lines, rectangles and layout information.
The HUD specification also use Grid files (.grids) but with a location set as per the general.prefs monitorHeadUpDisplayDir parameter. |
File Specification
• | A grids file must end in the extension '.grids', e.g. test.grids |
• | It should be a plain text file |
Each specification file specifies one or more grids, each identified by unique name (a name parameter).
Format
The grid file format is as follows :
monitorGrids 1.0 -1 { monitorGrid 1.0 -1 { <grid specification> }
monitorGrid 1.0 -1 { <grid specification> } ... } |
The grid specification section is described below.
NOTE
• | Grid specification lines must end with a semi-colon ";" character. |
• | A '#' character at line start delimits a comment. Rest of line is ignored. |
• | Strings should be quoted i.e. "string". |
• | There should be a space between each identifier and before the terminating semi-colon. |
Grid Specification
The following identifiers are used.
name
name "<STRING>" ; |
This is the name of the grid as shown in the GUI drop-down list.
Grid names should be unique.
units
units "<UNITS>" ; |
where UNITS are :
pixels |
By default the coordinate system is absolute image pixels, lower left to top right. Elements are drawn relative to the lower left corner of a pixel. |
normalised |
Normalised coordinates map the range 0.0..1.0 to the monitor source full image pixel size in x and y. |
unitsImageAspect
unitsImageAspect <FLOAT> ; |
The normalised region may be mapped to an image aspect extraction of the monitor source full image (pre or post monitor mask).
This is achieved by specifying the target image aspect. Given the monitor source image and aspect ratio, the normalised region will automatically be adjusted for 'letterbox' or 'pillarbox' display of the target aspect ratio.
unitsObeyMask
unitsObeyMask <INT> ; |
where INT can be 0 or 1.
The normalised region may be mapped to the visible (post monitor mask) image pixel size in x and y.
line
line <FLOAT x0> <FLOAT y0> <FLOAT x1> <FLOAT y1>; |
Draws a line from coordinates x0,y0 to coordinates x1,y1 using the current coordinate system and draw style.
lineWeight
lineWeight <FLOAT> ; |
How wide to draw lines, in pixels.
ellipse
ellipse <INT x0> <INT y0> <INT Rx> <INT Ry> ; |
where Rx is X radius and Ry is Y radius.
Draws an ellipse with centre at coordinates (x0,y0) and size 2*Rx by 2*Ry, using the current coordinate system and draw style.
polygon
polygon <INT x0> <INT y0> .. <INT xN> <INT yN> ; |
Draws a multi-point polygon from (x0,y0) to (x1,y1) to .. (xN,yN), using the current coordinate system and draw style. If the draw style is filled and the polygon is convex, it will be filled on the inside.
rectExtraction
rectExtraction <INT x0> <INT y0> <INT x1> <INT y1> ; |
Draws a rectangle from (x0,y0) to (x1,y1) using the current coordinate system and draw style.
If the draw style is filled the rectangle will be filled on the outside, up to the outer limit of the monitor source image. This element is intended for use when a solid or semi-transparent 'masking' or 'blanking' region is required.
If the draw style is not filled, an open rectangle will be drawn with the current line style.
text
text <INT x> <INT y> "<STRING>" ; |
Draws the specified string at (x,y) using the current coordinate system and draw style.
Note that you can use text macros, which will be expanded on display. See below.
textSize
textSize <FLOAT> ; |
Set the size of text drawn.
color
color <FLOAT R> <FLOAT G> <FLOAT B> <FLOAT A> ; |
Set the color (Red Green Blue Alpha) for drawing.
fill
fill "<FILL>" ; |
where FILL is solid or open.
Set the fill mode.
anchor
anchor "<VERT>" "<HORIZ>" ; |
where :
String |
Values |
VERT |
bottom, middle , top |
HORIZ |
left, center , right |
This defines the horizontal and vertical positioning for :
• | text elements |
• | image elements |
image
image <INT x> <INT y> "<PATH>" ; |
where PATH is full path to image file.
Draw specified image at (x,y) using the current coordinate system and draw style.
Images should be in PNG format. The image path can be relative (to specification file) or given as an absolute path. |
origin
origin "<VERT>" "<HORIZ>" ; |
where :
String |
Values |
VERT |
bottom , top |
HORIZ |
left , right |
Define the coordinate origin for all drawing operations.
Macro Expansion
Macros are available for use with the text operator and will be expanded to the associated information.
Macro Format
To specify a macro, use a text element e.g.
text 20 50 "Name: ##srcName" ; text 220 80 "Frame: ##recTimeFrames" ; |
Available Macros
Macro Text |
Meaning |
Source Information |
|
##srcTime |
Source time (auto-set from project) |
##srcTimeFrames |
Source time in frames |
##srcTimeTimecode |
Source time as timecode |
##srcKeycode |
Source time as keycode (if available) |
##srcTape |
Tape name |
##srcFilm |
Film name |
##srcClip |
Clip name |
##srcScene |
Scene name |
##srcName |
Material Name |
##srcDescription |
Description |
##masterLocation |
Source file location (path on disk) |
##srcLocation |
Current image location (path on disk) |
Record Information |
|
##recTime |
Record time (auto-set from project) |
##recTimeFrames |
Record time in frames |
##recTimeTimecode |
Record time as timecode |
##segmentVersion |
Version number of segment |
Audio Information |
|
##audioName |
Audio material name |
##audioOriginator |
Audio originator/creator (e.g. Pro Tools) |
##audioTimecode |
Audio timecode |
##audioTimeFrames |
Audio timecode as frames |
##audioReference |
Audio reference as per originator |
##audioChannels |
Number of audio channels |
##audioSampleRate |
Sample rate of audio |
Miscellaneous |
|
##headLength |
Length of segment head in frames |
##tailLength |
Length of segment tail in frames |
##clipLength |
Length of visible segment in frames |
Example Grids
For further examples, see the grids file in folder :
C:\Nucoda\2014_1\root\monitorGrids\
and HUD's in folder :
C:\Nucoda\2014_1\root\monitorHUDs\
monitorGrid 1.0 -1 { name "DV Logo" ; units "normalised" ; textSize 64.0 ; color 1.0 0.0 0.0 0.8 ; text 0.1 0.05 "Digital Vision" ; } |
monitorGrid 1.0 -1 { name "Poly" ; units "normalised" ; fill "solid" ; color 1.0 0.0 0.0 0.33 ; lineWeight 3.0 ; polygon 0.5 0.0 1.0 0.5 0.5 0.5 ; } |
monitorGrid 1.0 -1 { name "Poly2" ; units "normalised" ; fill "open" ; color 0.0 0.0 1.0 1.0 ; lineWeight 3.0 ; polygon 0.5 0.0 1.0 0.5 0.5 0.5 ; } |
monitorGrid 1.0 -1 { name "AS Rect" ; units "normalised" ; fill "solid" ; color 1.0 0.0 0.0 0.33 ; rectExtraction 0.25 0.25 0.75 0.75 ; } |
monitorGrid 1.0 -1 { name "Center Cross" ; lineWeight 3.0 ; units "normalised" ; color 1.0 1.0 1.0 1.0 ; polygon 0.0 0.0 0.0 1.0 1.0 1.0 1.0 0.0 ; polygon 0.0 0.0 0.0 0.5 1.0 0.5 1.0 0.0 ; polygon 0.0 0.0 0.0 1.0 0.5 1.0 0.5 0.0 ; } |
monitorGrid 1.0 -1 { name "Safe Areas" ; lineWeight 2.0 ; units "normalised" ; color 1.0 1.0 1.0 1.0 ; polygon 0.05 0.05 0.05 0.95 0.95 0.95 0.95 0.05 ; polygon 0.1 0.1 0.1 0.9 0.9 0.9 0.9 0.1 ; polygon 0.0 0.0 0.0 1.0 1.0 1.0 1.0 0.0 ; lineWeight 3.0 ; line 0.45 0.5 0.55 0.5 ; line 0.5 0.45 0.5 0.55 ; anchor "top" "left" ; origin "top" "left" ; textSize 20.0 ; color 0.9 0.9 0.9 0.9 ; text 0.056 0.06 "PICTURE SAFE" ; text 0.106 0.11 "TITLE SAFE" ; } |
monitorGrid 1.0 -1 { name "Greyscale" ; units "pixels" ; color 1.0 1.0 1.0 1.0 ; anchor "bottom" "left" ; origin "bottom" "left" ; image 0 0 "greyscale2.png" ; } |
monitorGrid 1.0 -1 { name "full info all" ; units "pixelsFullWindow" ;
anchor "top" "left" ; origin "top" "left" ; textSize 14.0 ; text 20 20 "##segmentVersion" ; text 20 50 "Name: ##srcName" ; text 20 80 "Description: ##srcDescription" ; text 20 110 "Tape Name: ##srcTape" ; text 20 140 "Keycode: ##srcKeycode" ;
anchor "bottom" "left" ; origin "bottom" "left" ; textSize 14.0 ; ... ...
anchor "top" "right" ; origin "top" "right" ; textSize 14.0 ; text 20 20 "audio: ##audioName" ; text 20 50 "originator: ##audioOriginator" ; ... } |