Skip to main content

WebGL API

NovoRender.RenderSettings

Render settings

Remarks

These settings controls various visual aspects of the 3D view.

Hierarchy​

Properties​

background​

• Readonly background: Object

Settings for rendering of background.

Type declaration​

NameTypeDescription
colorReadonlyVec4Background color. Remarks Setting the alpha component < 1 will generate a transparent background. If undefined, background will use image from environment map, or default color if no environment is set.

clippingPlanes​

• Readonly clippingPlanes: Object

Clipping planes settings.

Deprecated

Use clippingVolume instead.

Remarks

Clipping planes allows for an axis alligned box to define what volume will be rendered or not. This is useful for rendering various cross sections and revealing internal geometry.

Type declaration​

NameTypeDescription
boundsAABBThe axis aligned bounding volume.
enabledbooleanWhether to clip geometry by the actual bounding box or not.
highlightnumberHighlighted side.
insidebooleanWhether to clip geometry inside or outside the actual bounding box.
showBoxbooleanWhether to show the actual bounding box or not.

clippingVolume​

• Readonly clippingVolume: Object

Clipping volume settings.

Remarks

Clipping volume allows for a set of up to 6 planes to define a volume that excluded from rendering. This is useful for rendering various cross sections and revealing internal geometry.

Type declaration​

NameTypeDescription
enabledbooleanWhether to clip geometry by the actual bounding box or not.
mode"intersection" | "union"How multiple clipping planes are combined. Default: "union"
planesreadonly ReadonlyVec4[]List of clipping planes (max 6), expressed as plane normal (x,y,z) and offset from origo (w) in a 4D world space vector.

display​

• Readonly display: Object

Display settings

Type declaration​

NameTypeDescription
heightnumberDisplay height in pixels.
widthnumberDisplay width in pixels.

environment​

• Optional environment: Environment

Current background/IBL environment.

Remarks

Environments are a pre-baked set of textures for background and lighting information. For retrieving a list of available environments, see availableEnvironments. An environment must be loaded before it can be assigned here, via View.loadEnvironment. Assigning an environment impacts lighting if no light.sun is defined, and also background images background if no color is defined. Image based lighting (IBL) uses light information from HDRI panoramic images to create a more natural looking light and ambience. If undefined, a basic directional sun lighting model will be used instead, allowing for dynamic changes in light color and direction at the expense of esthetics.


exposure​

• Optional exposure: number

Camera light exposure as stops of power of 2.

Remarks

Negative values darkens the image, while positive ones brightens it. The default value is 0.0.


grid​

• Readonly grid: Object

Grid settings

Type declaration​

NameTypeDescription
axisXvec3X axis of the grid, length determines the distance between lines
axisYvec3Y axis of the grid, length determines the distance between lines
enabledbooleanEnable grid plane.
majorColorReadonlyVec3Color of major grid lines
majorLineCountnumberNumber of major lines, odd number needed to have lines go through origo.
minorColorReadonlyVec3Color of minor grid lines
minorLineCountnumberNumber of minor lines between major lines.
origovec3Origo of the grid

light​

• Readonly light: Object

Light settings

Type declaration​

NameTypeDescription
ambient{ brightness: number }Ambient hemisphere light, emulating indirect light scattered from atmosphere.
ambient.brightnessnumberBrightness expressed as a scalar from 0.0 (none), to 1.0 (max).
camera{ brightness: number ; distance: number }Camera local light.
camera.brightnessnumberBrightness expressed as a scalar from 0.0 (none), to 1.0 (bright).
camera.distancenumberFall-off distance, beyond which this light is effectively disabled.
sun{ brightness: number ; position: { azimuth: number ; inclination: number } ; time?: Date }Direct sunlight.
sun.brightnessnumberBrightness expressed as a scalar from 0.0 (none), to 1.0 (sunny).
sun.position{ azimuth: number ; inclination: number }Sun position on the sky.
sun.position.azimuthnumberSolar azimuth angle in degrees, where 0° is due north, 90° is due east and 270° due west.
sun.position.inclinationnumberSolar elevation angle in degrees, where 0° at the horizon and 90° is straight up.
sun.time?DateIf set then sun position on the sky will be calculated automatically based on scene location, timezone and this time.

objectHighlights​

• objectHighlights: readonly Highlight[]

Color transforms for various highlighting groups.

Remarks

These highlights are used by the scene.objectHighlighter. Modifing the highlights is done by assigning a new array, rather than mutating the existing one. The maximum number of highlights supported is currently 256, whereof the last (255) is reserved for hidden objects. The highlight at index 0 is the initial default for all objects and can be used to e.g. highlight all objects that are not selected or otherwise part of another highlighting group.


ocean​

• Readonly ocean: Object

Ocean render settings

Remarks

If undefined, ocean geometry will not be rendered.

Type declaration​

NameTypeDescription
colorReadonlyVec3Ocean color
enabledbooleanEnable ocean rendering (default false).
opacitynumberOcean opacity (default 0.5).

pickBuffer​

• Readonly pickBuffer: Object

Type declaration​

NameType
includeTransparentbool

points​

• Readonly points: Object

Point cloud settings.

Remarks

The sizes are cumulative and computed as follows: effective_point_pixel_size = max(1, pixelSize + projectedSizeOf(metricSize + tolerance * toleranceFactor)). Metric size is projected as a 3D sphere at the point origo to deterine pixel size. The term pixel refers to the size of a pixel in the target canvas element, which resolution may differ from that of the render buffer.

Type declaration​

NameTypeDescription
deviation{ colors: readonly DeviationColorGradientNode[] ; mode: "on" | "off" | "mix" }-
deviation.colorsreadonly DeviationColorGradientNode[]-
deviation.mode"on" | "off" | "mix"-
intensity{ colors: readonly IntensityColorGradientNode[] ; mode: "on" | "off" | "mix" }-
intensity.colorsreadonly IntensityColorGradientNode[]-
intensity.mode"on" | "off" | "mix"-
shape"disc" | "square"Point shape. Default is "disc".
size{ maxPixel: number ; metric: number ; pixel: number ; toleranceFactor: number }-
size.maxPixelnumberMax point size in pixels.
size.metricnumberPoint size in meters.
size.pixelnumberPoint size in pixels.
size.toleranceFactornumberThe scaling factor for applying the tolerance of the current level of detail to point size. Remarks Different levels of detail (LOD) will have different point densities. Taking this difference into account may result in a more uniform point coverage and visually pleasing result. The tolerance of each LOD reflects the point merging distance threshold in meters used to reduce # points, or 0 for the original level of detail.

quality​

• Readonly quality: Object

Render quality settings for adjusting performance to various devices

Type declaration​

NameTypeDescription
detail{ autoAdjust: { enabled: boolean ; max: number ; min: number } ; maxLodTextureBytes?: number ; maxLodTriangles?: number ; value: number }Geometry detail settings.
detail.autoAdjust{ enabled: boolean ; max: number ; min: number }Auto adjustment based on current device's rendering performance.
detail.autoAdjust.enabledbooleanIs automatic adjustment enabled?
detail.autoAdjust.maxnumberUpper bound for automatic adjustment.
detail.autoAdjust.minnumberLower bound for automatic adjustment.
detail.maxLodTextureBytes?numberMax limit for # of bytes used for textures in static LOD geometry. Remarks Adjust this to accomodate memory constraints on your device. Default value is undefined, which disables enforcement of this limit. The # bytes refers to the textxure image and does not include memory used for mipmapping or device specific format conversions. Hardware compressed textures only count for the compressed byte size. Textures from DynamicObjects are not included in the triangle count and thus not contrained by this value.
detail.maxLodTriangles?numberMax limit for # of triangles used for static LOD geometry. Remarks Adjust this to enforce memory and performance constraints on your device. Default value is undefined, which disables enforcement of this limit. Triangles from DynamicObjects are not included in the triangle count and thus not contrained by this value.
detail.valuenumberLevel of geometry detail. 1.0 = reasonable default, >1 more detail, <1 less detail.
resolution{ autoAdjust: { enabled: boolean ; max: number ; min: number } ; value: number }Resolution settings.
resolution.autoAdjust{ enabled: boolean ; max: number ; min: number }Auto adjustment based on current device's rendering performance.
resolution.autoAdjust.enabledbooleanIs automatic adjustment enabled?
resolution.autoAdjust.maxnumberUpper bound for automatic adjustment.
resolution.autoAdjust.minnumberLower bound for automatic adjustment.
resolution.valuenumberLevel of pixel resolution, where 1.0 = 1:1 ratio (default) and values lesser than 1 will render in lower resolution than screen and scale up for increased performance.

terrain​

• terrain: Object

Terrain render settings

Remarks

If undefined, terrain geometry will not be rendered.

Type declaration​

NameTypeDescription
asBackgroundbooleanDraw terrain as background
elevationColorsreadonly ElevationColorGradientNode[]Elevation gradient color curve, defined by a list of nodes. Remarks Nodes must be sorted in ascending order of elevation! Elevations are defined as in meters above/below sea level (using negative values for sub sea terrain). At least two nodes are required for any sort of gradient. Nodes do not have to be uniformly distributed elevation-wise. To create a discontinuity in the gradient, two adjacent nodes with identical elevation, but different colors may be used. Any elevation outside the min/max range defined by this list will be clamped to the color of the nearest node (min or max), i.e., no extrapolation will occur.