Advertisement
Guest User

Untitled

a guest
Feb 18th, 2022
22
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.92 KB | None | 0 0
  1. ## Bidstack Viewability Debugger
  2.  
  3. ![Overview](overview.png)
  4.  
  5. ### Table of contents
  6.  
  7. 1. [How to enable data sending from the SDK](#how-to-enable-data-sending-from-the-sdk)
  8. 2. [Controls (camera)](#controls-camera)
  9. 3. [Definitions](#definitions)
  10. 4. [Parts of the scene](#parts-of-the-scene)
  11. 5. [Control options window](#control-options-window)
  12. 1. [Server options](#server-options)
  13. 2. [Display options](#display-options)
  14. 3. [Camera options](#camera-options)
  15. 6. [Info window](#info-window)
  16. 1. [Primary info / options](#primary-info-options)
  17. 2. [Cameras](#cameras)
  18. 3. [Ad spots](#ad-spots)
  19. 7. [Quad info window](#quad-info-window)
  20.  
  21. ### How to enable data sending from the SDK
  22.  
  23. Define the environment variable `BIDSTACK_VIEWABILITY_DEBUG=<host>:<port>`, and then run the executable in a way that the environment variable is applied before creating an instance of the ad client.
  24.  
  25. - `<host>` is the IP address of hostname of the computer where the viewability debugger is launched.
  26. - `<port> ` is the port which the viewability debugger is listening to.
  27.  
  28. The debugger must be running and listening to the same port before a connection from the SDK is attempted.
  29.  
  30. ### Controls (camera)
  31.  
  32. - **move mouse while holding right mouse button** - turn the camera
  33. - **W** - move forward
  34. - **S** - move backwards
  35. - **A** - move left
  36. - **D** - move right
  37. - **Q** - move up
  38. - **Z** - move down
  39. - **Shift** - move 10x faster
  40.  
  41. ### Definitions
  42.  
  43. - **Quad** - a polygon made of 4 points, typically assumed to be planar
  44. - **Ad spot** - a representation of a single advertising spot in the game world, defined by either a single quad or an array of grouped quads
  45. - each quad group denotes a single instance of a creative
  46.  
  47. ### Parts of the scene
  48.  
  49. ![Scene](scene.png)
  50.  
  51. - Grid color: gray
  52. - Camera color: green, appearance: wireframe
  53. - Ad spots:
  54. - Appearance: filled + outlined
  55. - When unselected:
  56. - Front color: light gray
  57. - Back color: dark gray
  58. - Forward/normal vector color: gray
  59. - When selected:
  60. - Front color: light orange
  61. - Back color: brown
  62. - Forward/normal vector color: dark orange
  63.  
  64. ### Control options window
  65.  
  66. This is a window where it is possible to configure the behavior and current state of the debugger.
  67.  
  68. !["Control options" window](control-options-window.png)
  69.  
  70. #### Server options
  71.  
  72. - **Port** - the server port that would be used for listening to incoming connections
  73. - **Start the server** - starts listening to the specified port for incoming connections
  74. - **Stop the server** - stops listening to the port and disconnects all current connections
  75.  
  76. #### Display options
  77.  
  78. - **Grid scale** - the size of a single grid cell (unitless)
  79. - **Draw disabled cameras** - draw the cameras whose screen occupancy value is currently 0
  80. - **Ad spots**
  81. - **Draw hidden** - draw the ad spots for which the "visible" attribute is set to false
  82. - **Draw hidden sides** - draw the sides of the ad spots (front and/or back) which are currently set to invisible
  83.  
  84. #### Camera options
  85.  
  86. - **Speed** - the base speed of the camera
  87. - **Position** - the world-space location of the camera
  88. - **Yaw** - the angle of horizontal direction of the camera
  89. - **Pitch** - the angle of vertical direction of the camera (-89 - 89)
  90. - **Direction** - displays the direction vector of the camera, computed from yaw, pitch and the up axis
  91. - **Z-up** / **Y-up** allows to select which up vector to use for the camera, (0;0;1) or (0;1;0) respectively
  92. - **FOV** - field of view in degrees (1 - 179)
  93. - **Z-near** - the distance of the near clipping plane of the camera, this is a tradeoff option between being able to see nearby things (low values) and avoiding z-fighting (high values)
  94. - **Z-far** - the distance of the far clipping plane of the camera, this can be used to show or hide the distant parts of the scene
  95.  
  96. ### Info window
  97.  
  98. This is a window that shows everything about the incoming viewability data.
  99.  
  100. !["Info" window (top)](info-window-part1.png)
  101.  
  102. #### Primary info / options
  103.  
  104. - **Current connection** - allows to select the currently displayed connection by IP address
  105. - **Camera** - allows to select using which camera the scene is rendered, there are 5 possible options:
  106. - **Debugger** - this is the user-controllable camera
  107. - **Camera 0-3** - these are the cameras set by the viewability API
  108. - **Last update time** - this is the time of the last call to update frame viewability
  109. - **Dump all data** - saves a file called `viewdbg_<timestamp>.vwdmp` to the current working directory, containing the full state of the viewability system
  110. - **Errors** - contains a list of date/time, error code (one of _ErrorCodeValues_) and call name for all detected API errors
  111.  
  112. #### Cameras
  113.  
  114. This section displays information about the currently defined cameras (0-3).
  115.  
  116. - **Screen occupancy** - the camera screen occupancy value (camera / screen area ratio), needs to be non-zero for the camera to be considered active
  117. - **VP matrix** - the camera view-projection matrix
  118.  
  119. #### Ad spots
  120.  
  121. This section displays information about the currently defined ad spots.
  122.  
  123. !["Info" window (ad spots)](info-window-part2.png)
  124.  
  125. - **Search** - allows to enter a partial name to filter the contents of the list below
  126. - **Items** - a list of currently active ad spots, optionally filtered by search text above
  127. - Each entry is in the following format: `[<id>] <name> (<x>;<y>;<z>)`
  128. - **Type** - ad spot geometry type (quad or quad array)
  129. - **Ad spot info** - shows the ad spot ID and visibility (overall + sides)
  130. - **Viewability** - shows the viewability info computed using the current camera
  131. - **V (_visibility_)** - how much of the ad spot is visible
  132. - **SO (_screen occupancy_)** - how much of the screen does the ad spot occupy
  133. - **A (_viewing angle_)** - the angle of camera position with respect to the ad spot
  134. - **Quad world matrix** (visible if ad spot type is "quad") - the matrix that defines the ad spot by transforming a [-1;1] quad into world space
  135. - **View data** (visible if ad spot type is "quad array") - opens a window listing all the quad array information
  136. - **Name** - the name of the ad spot
  137. - **Notification ID** - the notification ID of the ad spot
  138. - **Custom data** - the custom data (key-value string pairs) of the ad spot
  139.  
  140. ### Quad info window
  141.  
  142. This window displays everything about the currently observed quad array.
  143.  
  144. !["Quad info" window](quad-info-window.png)
  145.  
  146. To open it, press the "View data" button in the Info window inside a quad array ad spot info block:
  147.  
  148. ![Location of the "View data" button](quad-info-view-data.png)
  149.  
  150. Parts of the data:
  151.  
  152. - individual quads are separated by an empty line
  153. - `[Group <n>]` - marks the start of a group
  154. - `fraction: <...>` - defines the fraction of visibility that the quad contributes to the group
  155. - `center: <...>` - the center position of the quad
  156. - `normal: <...>` - the normal/forward vector of the quad
  157. - `--- vertices ---` - starts a list of 4 points that define the quad
  158.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement