Interface GraphicsAPI
- All Known Implementing Classes:
GraphicsModule
public interface GraphicsAPI
Public API definition for the graphics module,
GraphicsModule.
The graphics module contains methods and calls that modify and query the graphics and rendering system.
-
Method Summary
Modifier and TypeMethodDescriptionvoideffect_bloom(float value) Set the strength value for the bloom effect.voideffect_chromatic_aberration(float value) Set the amount of chromatic aberration.voideffect_lens_flare(boolean state) Enable or disables the lens flare effect.voideffect_lens_flare(double value) Set the strength of the lens flare effect, in [0,1].voideffect_motion_blur(boolean state) Enable or disable the camera motion blur effect.voideffect_motion_blur(double value) Enable or disable the camera motion blur effect.voideffect_star_glow(boolean state) Enable or disable stars' light glowing and spilling over closer objects.longGet the current frame number.floatGet the current point size value in pixels.floatGet the base star opacity.floatGet the star brightness value.voidmode_cubemap(boolean state, String projection) Enable and disable the cubemap mode.voidmode_orthosphere(boolean state) Enable or disable the orthosphere view mode.voidmode_panorama(boolean state) Enable or disable the panorama mode.voidmode_planetarium(boolean state) Enable or disable the planetarium mode.voidmode_reprojection(String mode) Set the re-projection mode.voidmode_stereoscopic(boolean state) Enable or disable the stereoscopic mode.voidset_ambient_light(float value) Set the ambient light to a certain value.voidset_back_buffer_scale(float scale) Set the scaling factor for the back-buffer.voidset_cubemap_projection(String projection) Set the cubemap projection to use.voidset_cubemap_resolution(int resolution) Set the resolution (width and height are the same) of each side of the frame buffers used to capture each of the 6 directions that go into the cubemap to construct the equirectangular image for the 360 mode.voidset_exposure_tone_mapping(double level) Set the exposure level.voidset_gamma_correction(double level) Set the gamma correction level.voidset_glow_texture_index(int index) Set the texture index for the light glow effect, in [1, 6].voidset_hdr_tone_mapping(String type) Set the high dynamic range tone mapping algorithm type.voidset_image_brightness(double level) Set the brightness level of the render system.voidset_image_contrast(double level) Set the contrast level of the render system.voidset_image_hue(double level) Set the hue level of the render system.voidset_image_saturation(double level) Set the saturation level of the render system.voidset_index_of_refraction(float ior) Set index of refraction of celestial sphere in orthosphere view mode.voidset_limit_fps(double fps) Limit the frame rate of Gaia Sky to the given value, in frames per second.voidset_limit_fps(int fps) Limit the frame rate of Gaia Sky to the given value, in frames per second.voidset_orbit_solid_angle_threshold(float deg) Set the solid angle below which orbits fade and disappear.voidset_point_size(float size) Set the base point size.voidset_smooth_lod_transitions(boolean value) Set the value of smooth lod transitions, allowing or disallowing octant fade-ins of as they come into view.voidset_star_base_opacity(float opacity) Set the base star opacity.voidset_star_brightness(float value) Set the star brightness value.voidset_star_brightness_power(float value) Set the star brightness power profile value in [1.1, 0.9].voidset_star_glow_factor(float value) Set the star glow factor level value.voidset_star_set_billboard(boolean flag) Enable or disable the rendering of close stars as billboards.voidset_star_set_metadata_size(int n) Set the number of nearest stars to be processed for each star set.voidset_star_texture_index(int index) Set the texture index for star groups, in [1, 6].voidset_stereo_profile(int index) Change the stereoscopic profile.
-
Method Details
-
set_image_brightness
void set_image_brightness(double level) Set the brightness level of the render system.- Parameters:
level- The brightness level as a double precision floating point number in [-1,1]. The neutral value is 0.0.
-
set_image_contrast
void set_image_contrast(double level) Set the contrast level of the render system.- Parameters:
level- The contrast level as a double precision floating point number in [0,2]. The neutral value is 1.0.
-
set_image_hue
void set_image_hue(double level) Set the hue level of the render system.- Parameters:
level- The hue level as a double precision floating point number in [0,2]. The neutral value is 1.0.
-
set_image_saturation
void set_image_saturation(double level) Set the saturation level of the render system.- Parameters:
level- The saturation level as a double precision floating point number in [0,2]. The neutral value is 1.0.
-
set_gamma_correction
void set_gamma_correction(double level) Set the gamma correction level.- Parameters:
level- The gamma correction level in [0,3] as a floating point number. The neutral value is 1.2.
-
set_hdr_tone_mapping
Set the high dynamic range tone mapping algorithm type. The types can be:- "auto" - performs an automatic HDR tone mapping based on the current luminosity of the scene
- "exposure" - performs an exposure-based HDR tone mapping. The exposure value must be set with
set_exposure_tone_mapping(double) - "aces" - performs the ACES tone mapping
- "uncharted" - performs the tone mapping implemented in Uncharted
- "filmic" - performs a filmic tone mapping
- "none" - no HDR tone mapping
- Parameters:
type- The HDR tone mapping type. One of ["auto"|"exposure"|"aces"|"uncharted"|"filmic"|"none"].
-
set_exposure_tone_mapping
void set_exposure_tone_mapping(double level) Set the exposure level.- Parameters:
level- The exposure level in [0,n]. Set to 0 to disable exposure tone mapping.
-
mode_planetarium
void mode_planetarium(boolean state) Enable or disable the planetarium mode.- Parameters:
state- The boolean state. True to activate, false to deactivate.
-
mode_cubemap
Enable and disable the cubemap mode.- Parameters:
state- The boolean state. True to activate, false to deactivate.projection- The projection to use as a string. Accepted values are ["equirectangular"|"cylindrical"|"hammer"|"orthographic"|"orthosphere"|"orthosphere_crossye"|"azimuthal_equidistant"].
-
mode_panorama
void mode_panorama(boolean state) Enable or disable the panorama mode.- Parameters:
state- The boolean state. True to activate, false to deactivate.
-
set_cubemap_resolution
void set_cubemap_resolution(int resolution) Set the resolution (width and height are the same) of each side of the frame buffers used to capture each of the 6 directions that go into the cubemap to construct the equirectangular image for the 360 mode. This should roughly be 1/3 of the output resolution at which the 360 mode are to be captured (or screen resolution).- Parameters:
resolution- The resolution of each of the sides of the cubemap for the 360 mode.
-
set_cubemap_projection
Set the cubemap projection to use.Accepted values are:
- "equirectangular" - spherical projection.
- "cylindrical" - cylindrical projection.
- "hammer" - Hammer projection.
- "orthographic" - orthographic projection, with the two hemispheres side-by-side.
- "orthosphere" - orthographic projection, with the two hemispheres overlaid. That gives an outside view of the camera's celestial sphere.
- "orthosphere_crosseye" - same as orthosphere, but duplicated to produce a stereoscopic cross-eye image (side by side).
- "azimuthal_equidistant" - azimuthal equidistant projection, used in Planetarium mode.
CubmeapProjectionEffectfor possible values.- Parameters:
projection- The projection, in ["equirectangular"|"cylindrical"|"hammer"|"orthographic"|"orthosphere"|"orthosphere_crossye"|"azimuthal_equidistant"].
-
mode_orthosphere
void mode_orthosphere(boolean state) Enable or disable the orthosphere view mode.- Parameters:
state- The state, true to activate and false to deactivate.
-
set_index_of_refraction
void set_index_of_refraction(float ior) Set index of refraction of celestial sphere in orthosphere view mode.- Parameters:
ior- The index of refraction.
-
mode_stereoscopic
void mode_stereoscopic(boolean state) Enable or disable the stereoscopic mode.- Parameters:
state- The boolean state. True to activate, false to deactivate.
-
set_stereo_profile
void set_stereo_profile(int index) Change the stereoscopic profile.- Parameters:
index- The index of the new profile:- 0 - VR_HEADSET
- 1 - HD_3DTV
- 2 - CROSSEYE
- 3 - PARALLEL_VIEW
- 4 - ANAGLYPHIC (red-cyan)
-
mode_reprojection
Set the re-projection mode. Possible modes are:- "disabled"
- "default"
- "accurate"
- "stereographic_screen"
- "stereographic_long"
- "stereographic_short"
- "stereographic_180"
- "lambert_screen"
- "lambert_long"
- "lambert_short"
- "lambert_180"
- "orthographic_screen"
- "orthographic_long"
- "orthographic_short"
- "orthographic_180"
- Parameters:
mode- The re-projection mode, as a string.
-
set_back_buffer_scale
void set_back_buffer_scale(float scale) Set the scaling factor for the back-buffer.- Parameters:
scale- The back-buffer scaling factor.
-
get_current_frame_number
long get_current_frame_number()Get the current frame number. Useful for timing actions in scripts.- Returns:
- The current frame number.
-
effect_lens_flare
void effect_lens_flare(boolean state) Enable or disables the lens flare effect.- Parameters:
state- Activate (true) or deactivate (false).
-
effect_lens_flare
void effect_lens_flare(double value) Set the strength of the lens flare effect, in [0,1].Set to 0 to disable the effect.
- Parameters:
value- The strength or intensity of the lens flare, in [0,1].
-
effect_motion_blur
void effect_motion_blur(boolean state) Enable or disable the camera motion blur effect.- Parameters:
state- Activate (true) or deactivate (false).
-
effect_motion_blur
void effect_motion_blur(double value) Enable or disable the camera motion blur effect.- Parameters:
value- The strength of camera the motion blur effect, in [Constants.MOTIONBLUR_MIN,Constants.MOTIONBLUR_MAX].
-
effect_star_glow
void effect_star_glow(boolean state) Enable or disable stars' light glowing and spilling over closer objects.- Parameters:
state- Enable (true) or disable (false).
-
effect_bloom
void effect_bloom(float value) Set the strength value for the bloom effect.- Parameters:
value- Bloom strength between 0 and 100. Set to 0 to deactivate the bloom.
-
effect_chromatic_aberration
void effect_chromatic_aberration(float value) Set the amount of chromatic aberration. Set to 0 to disable the effect.- Parameters:
value- Chromatic aberration amount in [0,0.05].
-
set_smooth_lod_transitions
void set_smooth_lod_transitions(boolean value) Set the value of smooth lod transitions, allowing or disallowing octant fade-ins of as they come into view.- Parameters:
value- Activate (true) or deactivate (false).
-
set_ambient_light
void set_ambient_light(float value) Set the ambient light to a certain value.- Parameters:
value- The value of the ambient light in [0,1].
-
get_star_brightness
float get_star_brightness()Get the star brightness value.- Returns:
- The brightness value, between 0 and 100.
-
set_star_brightness
void set_star_brightness(float value) Set the star brightness value.- Parameters:
value- The brightness value, between 0 and 100.
-
set_star_brightness_power
void set_star_brightness_power(float value) Set the star brightness power profile value in [1.1, 0.9]. Default value is 1. The power is applied to the star solid angle (from camera), before clamping, as sa = pow(sa, r).- Parameters:
value- The power value in [0, 100].
-
set_star_glow_factor
void set_star_glow_factor(float value) Set the star glow factor level value. This controls the amount of glow light when the camera is close to stars. Must be betweenConstants.MIN_STAR_GLOW_FACTORandConstants.MAX_STAR_GLOW_FACTOR.Default is 0.06.
- Parameters:
value- The new glow factor value.
-
get_point_size
float get_point_size()Get the current point size value in pixels.- Returns:
- The size value, in pixels.
-
set_point_size
void set_point_size(float size) Set the base point size.- Parameters:
size- The size value, betweenConstants.MIN_STAR_POINT_SIZEandConstants.MAX_STAR_POINT_SIZE.
-
get_star_base_opacity
float get_star_base_opacity()Get the base star opacity.- Returns:
- The base opacity value.
-
set_star_base_opacity
void set_star_base_opacity(float opacity) Set the base star opacity.- Parameters:
opacity- The base opacity value, betweenConstants.MIN_STAR_MIN_OPACITYandConstants.MAX_STAR_MIN_OPACITY.
-
set_star_texture_index
void set_star_texture_index(int index) Set the texture index for star groups, in [1, 6].- horizontal spike
- god rays
- horizontal and vertical spikes
- simple radial profile
- diagonal spikes
- detailed glow
- Parameters:
index- The new star texture index.
-
set_glow_texture_index
void set_glow_texture_index(int index) Set the texture index for the light glow effect, in [1, 6].- horizontal spike
- god rays
- horizontal and vertical spikes
- simple radial profile
- diagonal spikes
- detailed glow
- Parameters:
index- The new glow effect texture index.
-
set_star_set_metadata_size
void set_star_set_metadata_size(int n) Set the number of nearest stars to be processed for each star set. Use this method with caution, it is mainly intended for internal purposes.- Parameters:
n- The new number of nearest stars.
-
set_star_set_billboard
void set_star_set_billboard(boolean flag) Enable or disable the rendering of close stars as billboards.- Parameters:
flag- The state flag.
-
set_orbit_solid_angle_threshold
void set_orbit_solid_angle_threshold(float deg) Set the solid angle below which orbits fade and disappear.- Parameters:
deg- The threshold angle in degrees.
-
set_limit_fps
void set_limit_fps(double fps) Limit the frame rate of Gaia Sky to the given value, in frames per second.- Parameters:
fps- The new maximum frame rate as a double-precision floating point number. Set zero or negative to unlimited.
-
set_limit_fps
void set_limit_fps(int fps) Limit the frame rate of Gaia Sky to the given value, in frames per second.- Parameters:
fps- The new maximum frame rate as an integer number. Set zero or negative to unlimited.
-