Skip to main content
Skip table of contents

Viewports

A Viewport can exist completely without a Session, as a Session can exist without a Viewport. The Viewport is responsible for rendering and rendering related settings. For example, camera and light management happens here. Additionally, a Viewport has many options, as rendering options can be enabled or disabled (shadows, ambient occlusion, etc.) and scene properties can be adjusted (groundplane, grid, etc.).


Settings

By reusing the simple example from the first section, we will now disable the grid and the groundplane. The logic presented can be used for many of the standard properties.


In our next example we change the environment map and remove the lights. We do this by creating a new Light Scene which has no lights in it.


Cameras

One of the standard adaptions is to change some camera properties. We distinguish here between a Perspective Camera and an Orthographic Camera. In our next example we create an Orthographic Camera, which will be assigned as the default camera automatically.


The camera also has many capabilities that can be used to roam through the scene.


Lights

For lights, we always handle a bunch of them at once, that's why we introduce Light Scenes. A Light Scene is a grouping of lights. The lights in a Light Scene can be freely manipulated. Therefore, we now create a new Light Scene and add a few lights to it.


Additional CodeSandBoxes

  • Branding
    Adjusting (removing or changing) the logo of the viewer and setting the color and opacity of the logo background.

  • Manual Visibility
    Decide yourself when you want to show the contents of the viewport.

  • Spinner Positioning
    Adjustments to the positioning of the busy spinner.

  • Spinner Change
    The spinner that is used when the viewport is declared as busy can be changed.

  • Default Material Color Adjustment
    For geometry that does not have a material defined, the default material is used. The color of this material can be adjusted.

  • Ground Plane Shadow
    A ground plane shadow can be displayed.

Camera

Environment Map

Lights

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.