Description | Example | Return message | Group

Window3D

Create or remove a 3D Graphics window, enable zooming, edit objects, set render methods, set 3D pick modes, or drill-down to hidden objects in the 3D Graphics window *

Syntax

Window3D <ScenarioPath> {Window3dOptions}

Related commands

Description

The Window3D command allows you to:

  • Create a new 3D Graphics window, using the default 3D Graphics window properties.
  • Set render methods.
  • Set 3D pick modes.
  • Enable or disable Grease Pencil mode.
  • Remove an existing 3D Graphics window.
  • Edit area targets, facilities, places and great arc vehicles in the 3D Graphics window.
  • Zoom into a portion of the globe.
  • Drill-down to hidden objects in the 3D Graphics window.

With the Window3D command you can also control these advanced options:

  • Enable and disable the cursor.
  • Control the joystick.
  • Control view volume.
  • Enable or disable, and set parameters for, depth cone crossover.
  • Set display mode parameters.
  • Add a pop-up balloon with user information.
  • Enable or disable atmosphere and set fog density.
  • Apply post-process color correction filters.

Where applicable (see table below), include the WindowID <WinNumber> parameter to specify a 3D Graphics window. If WindowID <WinNumber> is not included then the command will effect the first 3D Graphics window.

{Window3dOption}Description
CreateWindow Type {Normal | Attitude} [Path <TruncObjectPath>] [Title "<WindowTitle>"] Creates a new 3D Graphics window or a new Attitude View window. You can specify a Path for an Attitude window only, <TruncObjectPath> is a vehicle truncated path. You can specify the window title for any type of window.

If the application is minimized this command will Nack.

* This option is only available when running STK Desktop.

Remove [WindowID <WinNumber>]Removes a 3D Graphics window.

* This option is only available when running STK Desktop.

Place <X> <Y> [WindowID <WinNumber>]Indicates X,Y position of 3D Graphics window on the screen, where 0,0 is in the upper left corner of the screen. This command will move the 3D Graphics window to the new location and activate the map window.

If your monitor configuration includes multiple monitors, use negative values in the Place command to move the window to the left or upper monitor(s).

* This option is only available when running STK Desktop.

Size <Width> <Height> [WindowID <WinNumber>] <Width> and <Height> indicates the new size of the 3D Graphics window. This command will resize the 3D Graphics window and activate the map window.

* This option is only available when running STK Desktop.

InnerSize <Width> <Height> [WindowID <WinNumber>] <Width> and <Height> indicates the new size of the 3D Graphics window, discounting the borders and frame. This command will resize the 3D Graphics window and activate the map window.

* This option is only available when running STK Desktop.

Iconify [WindowID <WinNumber>]This option is only applicable to integrated windows and the window will be iconified in the workarea. If the window is floating or docked then the command is ignored.

* This option is only available when running STK Desktop.

Raise [WindowID <WinNumber>]This command restores the 3D Graphics window to the foreground and activates the map window.

If another program has the focus it may not allow the application to be shown, but the taskbar buttons will flash. This is a function of Windows2000 and above.

* This option is only available when running STK Desktop.

Minimize [WindowID <WinNumber>]This option is only applicable to integrated windows and the window will be minimized in the workarea. If the window is floating or docked then the command is ignored.

* This option is only available when running STK Desktop.

Maximize [WindowID <WinNumber>]This option is only applicable to integrated windows and the window will be maximized in the workarea. If the window is floating or docked then the command is ignored.

* This option is only available when running STK Desktop.

SetFrame {Normal | Minimal | None} [WindowID <WinNumber>]
  • Normal. 3D Graphics window displays with a title bar and border.
  • Minimal. 3D Graphics window hides the title bar and changes the border to a re-sizing border.
  • None. 3D Graphics window hides the title bar and border for seamless graphics integration into other applications.

If the application is full-screen, just the title bar will be shown or hidden.

* This option is only available when running STK Desktop.

SetTitle "<New Title>" [WindowID <WinNumber>]Change the title of a 3D Graphics window to "<New Title>", and activate the 3D Graphics window.

* This option is only available when running STK Desktop.

Toolbar {Hide | Show} "<ToolbarName>"Hide or show the specified toolbar in the 3D Graphics window.

Specify the name of a toolbar that is valid for the selected 3D graphics window. If an invalid toolbar name is entered a message will appear in the Message Viewer.

"<ToolbarName>" is case-sensitive.

Dock {Top | Bottom | Left | Right} [WindowID <WinNumber>]Dock the window to the main application.
Integrate [WindowID <WinNumber>]Integrate the window into the main application.
Float [WindowID <WinNumber>]Float the window.
InpDevMode Mode {Edit | EditApply | EditCancel | EditOK} [Path <TruncObjectPath>] [WindowID <WinNumber>] Controls object editing. Specify one of the following:
  • Edit. Turns on object edit mode for an object. You must include Path <TruncObjectPath>.
  • EditApply. Saves changes but leaves the object in edit mode.
  • EditOK. Saves changes and turns off edit mode
  • EditCancel. Turns off edit mode without saving changes.
InpDevMode Mode {RubberBandAsyncPick | RubberBandViewLLA} [WindowID <WinNumber>] Specify one of the following:
  • RubberBandAsyncPick. This option allows you to set the input device mode when async3dpick is enabled such that you can drag out a rubberband box and return the names of objects inside the dragged box through the connect socket. The output format will depend on the asyn3dpick mode you are in. This option allows you to drag out the rubberband box once and then puts you back into normal async3dpick mode.
  • This is only valid when async mode and async3dpicking is enabled. (See ConControl and Async3dPick commands.)

  • RubberBandViewLLA. Sets the input mode to enable you to drag a rubberband box, and have STK zoom into that area on a 3D Graphics window. This option allows you to drag out the rubberband box once and then puts you back in a normal pick mode.
InpDevMode {RBLineWidth <LineWidth> [|] RBColor {Color} [|] RBCrosshairSize <Size> [|] WindowID <WinNumber>} Specify the appearance of a rubberband box. Any or all parameters can be included on one command line.
  • RBLineWidth <LineWidth> - specify the line width for the rubberband box. <LineWidth> is a value between 1.0 and 10.0.
  • RBColor {Color} - Color can be entered by name, index, rgb or hex value, for valid {Color} options see Common Options.
  • RBCrosshairSize <Size> - specify the pixel size of the crosshair in the rubberband box, <Size> must be greater than 0
  • WindowID <WinNumber>
InpDevMode Mode {Pick | AsyncPick | LastPickMode | ViewLatLonAlt | PanLLA} [WindowID <WinNumber>] Specify one of the following:
  • Pick. Sets the 3D pick mode to normal picking.
  • AsyncPick. This pick mode enables you to double-click an object or central body in a 3D Graphics window to return the path or position of that object.
  • LastPickMode. Returns the 3D pick mode to the previously used pick mode.
  • ViewLatLonAlt. This pick mode enables you to double-click with the Shift key depressed on a position on the globe to set the View To/From to LatLonAlt for that position.
  • PanLLA. Enables you to "grab" the central body to move it to the desired view position using Shift-Left Mouse Button. Set Mode to ViewLatLonAlt to turn this option off.
InpDevMode Mode {GreasePencil | GreasePencilOK} [WindowID <WinNumber>] Specify one of the following:
  • GreasePencil to enable Grease Pencil mode.
  • GreasePencilOK to disable Grease Pencil mode.

See Grease Pencil 3D Editing Tool in STK Help for more information on using this mode.

InpDevMode Mode {Measure | MeasureOK} [WindowID <WinNumber>] Specify one of the following:
  • Measure to enable the 3D Measure tool.
  • MeasureOK to disable the 3D Measure tool.

Use this tool to measure simple great arc range and bearing on the 3D globe. See 3D Measure tool in STK Help for more information on using this mode.

EditData {Options} Defines the appearance of the edit controls that appear when Object Editing is turned on (see InpDevMode Mode Edit). Any or all options can be entered on the command line.
  • Color {Color}
  • PointScale <Value>
  • AxisScale <Value>
  • LineWidth <Value>
  • LineStyle {LineStyle}
  • NegativeAltitude {Yes | No}
  • Droplines {Yes | No}

For valid {Color} and {LineStyle} options see Common Options.

LineWidth <Value> is a number between 1.0 and 10.0

PickHitMode Mode {<ClosestPickHit> | <DrillPickHit>} [WindowID <WinNumber>]Enables you to drill-down to objects that are covered by other objects in the 3D Graphics window. For example, if facility1 covers facility2 and facility2 covers facility3, the first double-click selects facility1, the second selects facility2, and the third selects facility3. The fourth double-click returns you to facility1.
SetRenderMethod Method {OpenGL | PBuffer} [WindowID <WinNumber>]Enter PBuffer to turn on offscreen rendering and set it to use a pixel buffer (PBuffer). Enter OpenGL to turn off offscreen rendering.
SetNewWindowRenderMethod Method {OpenGL | PBuffer}

This option has been deprecated in STK 11.2. This option will be maintained for backward compatibility only, and it will now have no effect.

Sets offscreen rendering method for all new windows. Enter PBuffer to turn on offscreen rendering, and enter OpenGL to turn off offscreen rendering.
PolygonMode Mode {Fill | Line} [WindowID <WinNumber>]Specify whether to display all polygons as wire-frames (line).
InpDevMode ModeID "PLLA" ModeAction {Start | End} [WindowID <WinNumber>]Using this command with the Start option, places the 3D window in lat/lon/alt view mode, and allows you to grab the central body to move it to the desired view position. To grab and rotate the Central Body, use Shift-Left Mouse Button. Once the desired view position is obtained, use the End option to turn off this mode.

Advanced Options - Cursor and Joystick

The Window3D Cursor and Window3D Joystick commands allow you to enable and disable their use. These are described in the table:

{AdvancedOption}Description
Cursor Enable {On | Off} [WindowID <WinNumber>]Enable or disable the cursor for the 3D window.
Joystick Enable {On | Off} [WindowID <WinNumber>]Enable or disable the joystick for the 3D window. If enable is set to On then a joystick can be used along with the mouse. This command will Nack if a joystick is not connected.

Advanced Options - ViewVolume

The following table describes the options for the Window3D ViewVolume command, used to set ViewVolume parameters.

Format for this command is:

Window3D <ScenarioPath> ViewVolume ({ViewVolumeOptions} ...) [WindowID <WinNumber>]
{ViewVolumeOptions}Description
FarNearRatio <Value>The <Value> is a ratio that determines the visual quality in the viewing volume. Lower values increase visual quality. Valid value is greater than or equal to 1.1. The default value is 1000, and it is recommended that this value not be changed.
FieldOfView <Value>The <Value> is a floating-point number that is the view angle, entered in degrees. Valid range is 0.1 to 160.0.
MinVisibleDist <Value>The <Value> defines the minimum viewing distance. Valid value is greater than 0.01 meters and less than the value for FarPlane. <Value> is entered in Connect distance units.
MaxVisibleDist <Value>The <Value> defines the maximum viewing distance. Valid range is greater than the value for NearPlane. <Value> is entered in Connect distance units.

Advanced Options - DepthConeCrossover

The following table describes the options for the Window3D DepthConeCrossover command, used to set depth cone crossover parameters.

Format for this command is:

Window3D <ScenarioPath> DepthConeCrossover ({DepthConeOptions} ...) [WindowID <WinNumber>]
{DepthConeOptions}Description
Enable {On | Off}It enable is On then the depth cone is used for viewing from above the crossover altitude and depth buffer is used for viewing below the crossover altitude. If enable is Off then only the depth cone is used.
Altitude <Value>The <Value> is the crossover altitude that the depth cone uses. Valid value is greater or equal to 0.0, and the value is entered in meters.

Advanced Options - DisplayMode

The following table describes the options for the Window3D DisplayMode command, used to set display mode parameters.

Format for this command is:

Window3D <ScenarioPath> DisplayMode ({DisplayModeOptions} ...) [WindowID <WinNumber>]
{DisplayModeOptions}Description
Mode {Mono | Stereo | RedBlueStereo | SideBySideStereo | LeftEye | RightEye}If the value is set to Stereo then the scene is rendered using a stereo view.

If RedBlueStereo is set this enables you to view 3D animations with red/blue 3D glasses.

If SideBySideStereo is set then the left eye and right eye images are rendered individually beside each other in the same window.

If LeftEye is set then the scene is rendered from the perspective of the left eye.

If RightEye is set then the scene is rendered from the perspective of the right eye.

If you attempt to set Stereo mode and your video card does not accept this mode, the command will Nack.

EyeSeparationFactor <Value>The default eye separation factor is 0.02. Increasing this number will increase the overall left/right eye separation, which makes the image appear to have more depth. Valid value is between 0.0 and 1.0.
ProjectionDistance <Value>The <Value> is the projection distance for the left and right eyes. Valid value is greater than 0.0.
StereoProjectionMode {FixedDistance | Automatic | Parallel}Sets the type of projection used for the left and right eyes.

FixedDistance uses the value set for ProjectionDistance. Objects at this distance will appear to have no depth. Objects further than this distance will appear to go into the screen. Objects nearer than this distance will appear to pop out of the screen

Automatic mode ignores the value set for ProjectionDistance and automatically calculates the projection distance based on the distance between From and To objects in the window.

Parallel mode ignores the value set for ProjectionDistance and instead uses a parallel projection for each eye. In this mode all objects appear to go into the screen. Head mounted stereographic systems typically require a parallel projection.

This option replaces the AutoStereoEnable option.

VirtualRealityDevice "<DeviceName>"Attaches a Virtual Reality device to the 3D window.

This command overrides all other settings specified with the Windows3D DisplayMode command. To disconnect a VR device from a 3D window, use the Windows3D DisplayMode command to set any display mode other than VirtualRealityDevice.

Use the optional WindowID <WinNumber> to specify the 3D window to attach to.

A list of available VR devices can be obtained with the VO_R AvailableVrDevices command.

Advanced Options - Balloon

The following table describes the options for the Window3D Balloon command, with which a pop-up balloon, containing user defined text, can be added to the 3D Window.

Format for this command is:

Window3D <ScenarioPath> Balloon ({BalloonOptions} ...) [WindowID <WinNumber>]
{BalloonOptions}Description
Show {On | Off}Turn on or off the display of the balloon.
Text "<String>"Specify the text in the balloon.

The Text option can be included multiple times in the command for multi-line text.

TextColor {Color}Set the text color. For valid {Color} options see Common Options.
BackColor {Color}Set the background color. For valid {Color} options see Common Options.
LLA <Latitude> <Longitude> <Altitude>Set the position of the balloon. <Latitude> and <Longitude> are entered in degrees. <Altitude> is entered in Connect distance units.
SystemDef "<System>" <X> <Y> <Z>Set the offset of the balloon from a VGT system. <X>, <Y>, and <Z> are entered in Connect distance units.

Advanced Options - Atmosphere

The following table describes the options for the Window3D Atmosphere command, used to control atmosphere visibility and fog density.

Format for this command is:

Window3D <ScenarioPath> Atmosphere {AtmosOption} [WindowID <WinNumber>]
{AtmosOption}Description
Enable {On | Off}Show or hide atmosphere on the 3D Graphics Window. The default is On.
FogDensity <Value>Enter a real number between 0.0 and 1.0. The default is 0.0.

Advanced Options - ColorCorrection

The following table describes the options for the Window3D ColorCorrection command, used to control brightness, contrast, and gamma correction post-processing effects.

Format for this command is:

Window3D <ScenarioPath> ColorCorrection {ColorCorrOption} [WindowID <WinNumber>]
{ColorCorrOption}Description
Brightness <Value>}Controls the overall brightness of the 3D Graphics Window. Enter an integer between -127 and 127. The default is 0.
Contrast <Value>Controls the contrast on the 3D Graphics Window, the difference between the darkest and lightest points. Enter an integer between -127 and 127. The default is 0.
Gamma <Value>Controls the luminance on the 3D Graphics Window, which can be used to adjust how it is viewed on different monitors. Enter real number between 0 and 16. The default is 1.0.

Examples

To create a new 3D graphics window:

Window3D * CreateWindow Type Normal

To create an attitude view window for Satellite1 and title the window:

Window3D * CreateWindow Type Attitude Path Satellite/Satellite1 Title "Satellite1 Att View"

To place 3D Graphics window #2 at x: 200, y: 200:

Window3D * Place 200 200 WindowID 2

To change the size of the first 3D Graphics window:

Window3D * Size 640 400

To remove the 3D window with an ID of 2:

Window3d * Remove WindowID 2

To set the edit controls to be red, with line width of 3 and point scale of 5:

Window3d * EditData LineWidth 3.0 PointScale 5.0 Color #ff0000

To turn on object editing for Facility1, in window 2:

Window3d * InpDevMode Mode Edit Path Facility/Facility1 WindowID 2

To apply editing for current object, and turn off edit mode:

Window3d * InpDevMode Mode EditOK

To set input mode to allow a rubberband box to be dragged on the 3D window:

Window3d * InpDevMode Mode RubberBandViewLLA

To set the RubberBand box in Window 2 to have a line width of 2 and crosshair size of 24 pixels:

Window3D * InpDevMode RBLineWidth 2 RBCrosshairSize 24 WindowID 2

To set the offscreen rendering method for the first 3d window to use a pixel buffer:

Window3d * SetRenderMethod Method PBuffer

Examples

To enable the cursor for 3D window 2:

Window3d * Cursor Enable On WindowID 2

To enable the joystick for the first 3D window:

Window3d * Joystick Enable On

To set view volume to have a minimum visible distance of 1000.0 meters and maximum visible distance of 10000000 meters:

Window3d * ViewVolume MinVisibleDist 1000.0 MaxVisibleDist 10000000.0

To enable depth cone crossover with a crossover altitude of 100 for the first 3D Window:

Window3d * DepthConeCrossover Enable On Altitude 100.0 WindowID 1

To set the display mode to Stereo, and specify an eye separation distance and projection distance:

Window3D * DisplayMode Mode Stereo EyeSeparationFactor 0.10 ProjectionDistance 145 StereoProjectionMode FixedDistance

Use the following commands to set up an asynchronous rubberband pick:

Async3DPick * On Advanced
Window3d * InpDevMode Mode RubberBandAsyncPick

Add a balloon pop-up to 3D window 2:

Window3d * Balloon Show On Text "Test Text" LLA 45 45 100000 WindowId 2

Add a multi-line balloon pop-up, that is offset from Satellite1's Body system, then set the colors of the balloon:

Window3d * Balloon Show On Text "Satellite 1 Balloon" Text "Balloons are cool" SystemDef "Satellite/Satellite1 Body" 500 500 0
Window3d * Balloon TextColor red BackColor yellow

To turn on the display of Atmosphere and then set the fog density:

Window3D * Atmosphere Enable On
Window3D * Atmosphere FogDensity 0.6

To adjust the brightness and contrast on the 3D graphics window:

Window3d * ColorCorrection Brightness -10 Contrast 25

To adjust the gamma correction to the optimal value for non-gamma corrected monitors:

Window3d * ColorCorrection Gamma 2.4

To attach the "Oculus Rift" device to 3D window 1:

Window3d * DisplayMode VirtualRealityDevice "Oculus Rift" WindowD 1

Return message

Group membership

This command belongs to the following group(s):

VO

VO Window

Version

11.3